Transformation of thermal parameters

This area is a space for discussions about programming, scripting, algorithms... related to crystallography. Bash, Python, C, Fortran are welcome but also R, gnuplot and other scientific scripting languages.

Transformation of thermal parameters

Postby rkaminski » 26 Feb 2012, 23:35

Hi All,

Have been looking at the literature but did not found a simple way to do it. How to transform themal parameters expressed as 's or 's which were rotated along some arbitrary axis and arbitrary angle? I mean I have a, for example, rotation matrix along some Cartesian X-axis (I know the transformation from crystallographic system of course). How one should transform thermal parameters respectively?

Thanks in advance,

Radek
rkaminski
Sealed Tube
 
Posts: 22
Joined: 11 Apr 2009, 17:35
Location: Warsaw, Poland

Re: Transformation of thermal parameters

Postby oleg » 27 Feb 2012, 01:47

Assuming your U is in the Cartesian frame and M is the rotation matrix:

U' = M*U*Mt, where Mt is the transpose of M,

Cheers,

o
User avatar
oleg
Olex2 Boffin
 
Posts: 366
Joined: 24 Nov 2008, 21:34

Re: Transformation of thermal parameters

Postby pascalp » 27 Feb 2012, 09:48

It will work in any basis for a symmetry operation (the coordinate system does not change). So, you don't need to be in a cartesian coordinate system.

For a more general case (change of basis), you need the dimensionless mean-square displacement tensor and the metric tensor.
pascalp
Rotating Anode With Optics
 
Posts: 288
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Transformation of thermal parameters

Postby rkaminski » 19 Mar 2012, 20:00

Imagine I would like to change the basis as my rotation matrix is given in the Cartesian system. For example like:



How should I then transform matrix. Is it something like this below?



where transforms coordinates from fractional to Cartesian system.
rkaminski
Sealed Tube
 
Posts: 22
Joined: 11 Apr 2009, 17:35
Location: Warsaw, Poland

Re: Transformation of thermal parameters

Postby pascalp » 19 Mar 2012, 20:59

is in a cartesian basis
is in the crystal basis
is dimensionless, this is important, as in:

is the inverse
is the transpose
is the inverse transpose

To transform a vector of coordinates using M


To transform a tensor:


Then you apply your rotation:


If you want go back into the crystal system:


After simplification:



I thought I explained this in a publication but not this case, not when the transformation is defined in a diferent basis.
http://scripts.iucr.org/cgi-bin/paper?S0108767311018216

I forgot to mention that this is valid for beta but not for U as in the cif file. There are couple of steps more.
pascalp
Rotating Anode With Optics
 
Posts: 288
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Transformation of thermal parameters

Postby pascalp » 19 Mar 2012, 21:16

one more thing, you may have noticed:

the transformed beta tensor is


and the new rotation matrix:


Formula are differents because beta is a doubly contravariant second rank tensor and R a mixed second rank tensor.
pascalp
Rotating Anode With Optics
 
Posts: 288
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Transformation of thermal parameters

Postby rkaminski » 20 Mar 2012, 01:51

To the answer below, problem solved:) It was a stupid error in the Excel worksheet. Above transformations work perfectly.

Radek

*********

Thank you. This is basically the result I have obtained a bit later. However, after putting everything in Excel I get ADPs that after visualization the ellipsoids differ a bit in their shape. I always thought that such transformation should retain the principal axes magnitudes. How sensitive are those operations for numerical errors? Or maybe being much too tired I miss some stupid error...
rkaminski
Sealed Tube
 
Posts: 22
Joined: 11 Apr 2009, 17:35
Location: Warsaw, Poland

Re: Transformation of thermal parameters

Postby pascalp » 20 Mar 2012, 09:04

It is the case, the eigenvalues and eigen vectors remains the same. But the formula is different in the crystal basis. You need to use the general formula:
http://en.wikipedia.org/wiki/Generalize ... ue_problem
A is your tensor, B is the metric tensor.

In python you need to use scipy.linalg.eig and not numpy.linalg.eig I don't think excel can do that.

If the matrices are ill conditioned you can have some problems but it should not be the case.

I can have a look at your xls sheet if your want.
pascalp
Rotating Anode With Optics
 
Posts: 288
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK


Return to Scientific Programming

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests