Interchanging unit cell axes in Triclinic system

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.
Sealed Tube
Posts: 37
Joined: 22 Nov 2007, 20:44
Location: Trivandrum

Interchanging unit cell axes in Triclinic system

Post by sunil » 02 May 2016, 06:33

Dear All,

I am having a series of systems with comparable structures. So I wanted to compare the structures with respect to their unit cell dimensions as one of the factors. But in a couple of systems their a- and b-axes got interchanged, making the comparison irrelevant. Is it possible to interchange the unit cell axes. Since being a triclinic system, theoretically it should possible to interchange the parameters, but I am not sure about the strategy involved. Can anyone help me to resolve this issue?

Thank you very much.



User avatar
Olex2 Boffin
Posts: 694
Joined: 24 Nov 2008, 21:34

Re: Interchanging unit cell axes in Triclinic system

Post by oleg » 03 May 2016, 10:01


you can use Olex's 'sgs' command ( ... up-setting)for swapping axes. The generic syntax for the command is:

Code: Select all

sgs a11 a12 a13 a21 a22 a23 a31 a32 a33 SG [out.hkl]
where aij - elements of the transformation matrix, SG - the space group the transformation leads to and optionally the transformed HKL file name for output.

So to swap a and b axes yo may try the following (if you do not need transformed HKL for the refinement):

Code: Select all

sgs 0 1 0 -1 0 0 0 0 1 P-1

Return to “Scientific Programming”