Re: Generating space group general positions - issues implementing Shmueli (1984)

2022-11-08 Thread reinhard.neder

Hi Matthew,

I am glad to hear my answer helped. Yes, Giacovazzo is a good read.

The detail on the order of a rotoinversion is correct, I had forgotten that.

Fd-3c should have five + two generators: (as used in the International 
Tables)


(the identity operation )
a two-fold (screw-)axis parallel z
a two fold (screw-)axis parallel y
a three fold axis parallel [111]
a two fold (screw-)axis parallel [110]
the inversion center

plus the two generators for the face centering.

With the smaller number of generators, using the four-fold axis you need 
to keep in mind the  individual multiplicative applications  and may 
have to use a recursive algorithm to generate all positions. The longer 
list of the ITA needs to use the three fold axis twice, but no recursion 
is needed.


Best

Reinhard

Am 08.11.22 um 15:16 schrieb Matthew Rowles:

Thanks for that Reinhard.

The order of the -3 operation being 6 was the key to fix all (most) of 
my problems. I'll probably implement the augmented matrix methodology 
in my code, as it looks like it simplifies keeping track of the 
translation vector.
 I've also just reserved my library's copy of Giacovazzo for me; I've 
been told that should help out.


Just for completeness, and the record: From another email I got, in 
general, the order of a rotation N is N. The order of a rotoinversion 
-N is N if N is even, otherwise it is of order 2N.


I'm following the generation algorithm outlined by Shumeli (corrected 
page numbers in [1]); for Fd-3c:1, the three generators are I3Q999, 
P4C993, and P2D939 == -z -x -y; 3/4 3/4 3/4, -y x z; 3/4 0 1/4, and y 
x -z; 3/4 1/4 3/4


I'll see if I can figure out how to alter the generated position order 
to match the ITA; at this point in time, the fact that I have the 
correct positions is enough, but it would be good to fix the order for 
completeness


Ta a lot!



Matthew


[1] Acta Cryst (1984), A40, 559-567

On Tue, 8 Nov 2022 at 18:06, Reinhard Neder  wrote:

Hi Matthew,

Your initial description of the symmetry operations and their
multiplication is just fine.

Your error is at the assumption that the triple application of a
3bar rotation is the unit matrix.

The 3bar operation ( you call it 3Q) is the combination of the
3-fold rotation with a center of symmetry
into a single symmetry operation. The cycle for this operations is
actually of length six.
To "visualize" this, take a regular cube with the 3-fold rotation
axis along the body diagonal.
For a normal 3-fold rotation you turn the cube around the body
diagonal by 120 degrees and after
3 such operation you are back at the original position.
For the 3bar rotation the first operation moves a side of the cube
by 120 degrees and then "inverts" it
to the opposite side. Try it out with a dice, with all even sides
up. The first operation of the "6" then
ends up on the lower side of the dice at at the "5"; then the "5"
is copied into the "4" etc.

The matrix formalism actually becomes easier if you follow the
augmented notation, as described in more recent issues of the IT,
or in the teaching edition.

A symmetry operation in these issues uses letters W and w as P and
Q are used for unit cell transformations
but that is a trivial, irrelevant detail. Anyway, a symmetry
operation (W,w) can be written as a single
4x4 matrix in the form :


( W11 W12 W13 w1 )
( W21 W22 W23 w2 )
( W31 W32 W33 w3 )
( 0      0      0     1 )

This "augmented" matrix allows to use the standard matrix
multiplications rules for matrices of rank two.

So with two symmetry operations W and M in augmented form, the
combination is simply

O = W*M

Cyclic application of the 3bar symmetry operation with translation
vectors : -z -x -y; 3/4 3/4 3/4 will give :

    0    0   -1  |  0.75
   -1    0    0  |  0.75
    0   -1    0  |  0.75

    0    1    0  |  0.00
    0    0    1  |  0.00
    1    0    0  |  0.00

   -1    0    0  |  0.75
    0   -1    0  |  0.75
    0    0   -1  |  0.75

    0    0    1  |  0.00
    1    0    0  |  0.00
    0    1    0  |  0.00

    0   -1    0  |  0.75
    0    0   -1  |  0.75
   -1    0    0  |  0.75

    1    0    0  |  0.00
    0    1    0  |  0.00
    0    0    1  |  0.00

Where the translation components are restricted to the interval
[-1,1]

Another few points:

Several space groups Fd-3c included are listed in the ITA with two
origin choices. Origin choice 1 has
the origin at the intersection of the higher symmetry elements
like the rotation axes, while choice
two has the origin at the center of symmetry. This will change
several of the generator matrices.


-z -x -y; 3/4 3/4 3/4 is usually not a generator matrix for Fd-3c
(228); origin choice 1.

If you want to reproduce the atom coordinates in the exact

Re: Generating space group general positions - issues implementing Shmueli (1984)

2022-11-08 Thread Matthew Rowles
Thanks for that Reinhard.

The order of the -3 operation being 6 was the key to fix all (most) of my
problems. I'll probably implement the augmented matrix methodology in my
code, as it looks like it simplifies keeping track of the translation
vector.
 I've also just reserved my library's copy of Giacovazzo for me; I've been
told that should help out.

Just for completeness, and the record: From another email I got, in
general, the order of a rotation N is N. The order of a rotoinversion -N is
N if N is even, otherwise it is of order 2N.

I'm following the generation algorithm outlined by Shumeli (corrected page
numbers in [1]); for Fd-3c:1, the three generators are I3Q999, P4C993, and
P2D939 == -z -x -y; 3/4 3/4 3/4, -y x z; 3/4 0 1/4, and y x -z; 3/4 1/4 3/4

I'll see if I can figure out how to alter the generated position order to
match the ITA; at this point in time, the fact that I have the correct
positions is enough, but it would be good to fix the order for completeness

Ta a lot!



Matthew


[1] Acta Cryst (1984), A40, 559-567

On Tue, 8 Nov 2022 at 18:06, Reinhard Neder  wrote:

> Hi Matthew,
>
> Your initial description of the symmetry operations and their
> multiplication is just fine.
>
> Your error is at the assumption that the triple application of a 3bar
> rotation is the unit matrix.
> The 3bar operation ( you call it 3Q) is the combination of the 3-fold
> rotation with a center of symmetry
> into a single symmetry operation. The cycle for this operations is
> actually of length six.
> To "visualize" this, take a regular cube with the 3-fold rotation axis
> along the body diagonal.
> For a normal 3-fold rotation you turn the cube around the body diagonal by
> 120 degrees and after
> 3 such operation you are back at the original position.
> For the 3bar rotation the first operation moves a side of the cube by 120
> degrees and then "inverts" it
> to the opposite side. Try it out with a dice, with all even sides up. The
> first operation of the "6" then
> ends up on the lower side of the dice at at the "5"; then the "5" is
> copied into the "4" etc.
>
> The matrix formalism actually becomes easier if you follow the augmented
> notation, as described in more recent issues of the IT, or in the teaching
> edition.
> A symmetry operation in these issues uses letters W and w as P and Q are
> used for unit cell transformations
> but that is a trivial, irrelevant detail. Anyway, a symmetry operation
> (W,w) can be written as a single
> 4x4 matrix in the form :
>
>
> ( W11 W12 W13 w1 )
> ( W21 W22 W23 w2 )
> ( W31 W32 W33 w3 )
> ( 0  0  0 1 )
>
> This "augmented" matrix allows to use the standard matrix multiplications
> rules for matrices of rank two.
>
> So with two symmetry operations W and M in augmented form, the combination
> is simply
>
> O = W*M
>
> Cyclic application of the 3bar symmetry operation with translation vectors
> : -z -x -y; 3/4 3/4 3/4 will give :
>
> 00   -1  |  0.75
>-100  |  0.75
> 0   -10  |  0.75
>
> 010  |  0.00
> 001  |  0.00
> 100  |  0.00
>
>-100  |  0.75
> 0   -10  |  0.75
> 00   -1  |  0.75
>
> 001  |  0.00
> 100  |  0.00
> 010  |  0.00
>
> 0   -10  |  0.75
> 00   -1  |  0.75
>-100  |  0.75
>
> 100  |  0.00
> 010  |  0.00
> 001  |  0.00
>
> Where the translation components are restricted to the interval [-1,1]
>
> Another few points:
> Several space groups Fd-3c included are listed in the ITA with two origin
> choices. Origin choice 1 has
> the origin at the intersection of the higher symmetry elements like the
> rotation axes, while choice
> two has the origin at the center of symmetry. This will change several of
> the generator matrices.
>
>
> -z -x -y; 3/4 3/4 3/4 is usually not a generator matrix for Fd-3c (228);
> origin choice 1.
>
> If you want to reproduce the atom coordinates in the exact sequence as in
> the ITA, you need to use the
>
> generators as listed in the ITA BUT apply the centering operations last!
>
> For F3-3c the standard generators are:
>
> !2  (  0,   0, 1/2)  0,1/4,z
> !2  (  0, 1/2,   0)  1/4,y,0
> !3   x,x,x
> !2  (1/2, 1/2,   0)  x,x-1/4,3/8
> !   -1   3/8,3/8,3/8
> !t  (0  , 1/2, 1/2)
> !t  (1/2,   0, 1/2)
>
>
>
> for Origin choice 2:
>
> !2  (  0,   0, 1/2)  1/8,3/8,z
> !2  (  0, 1/2,   0)  3/8,y,1/8
> !3   x,x,x
> !2  (1/2, 1/2,   0)  x,x-1/4,0
> !   -1   0,0,0
> !t  (0  , 1/2, 1/2)
> !t  (1/2,   0, 1/2)
> Note for example the difference in the 5th generator -1 = 1bar.
>
> Another note, the generators in the ITA are listed such that starting from
> coordinates x,y,z you apply
> the 1st generator to these coordinates. Then you can apply the second
> generator to all 

Re: Generating space group general positions - issues implementing Shmueli (1984)

2022-11-08 Thread Reinhard Neder

Hi Matthew,

Your initial description of the symmetry operations and their 
multiplication is just fine.


Your error is at the assumption that the triple application of a 3bar 
rotation is the unit matrix.


The 3bar operation ( you call it 3Q) is the combination of the 3-fold 
rotation with a center of symmetry
into a single symmetry operation. The cycle for this operations is 
actually of length six.
To "visualize" this, take a regular cube with the 3-fold rotation axis 
along the body diagonal.
For a normal 3-fold rotation you turn the cube around the body diagonal 
by 120 degrees and after

3 such operation you are back at the original position.
For the 3bar rotation the first operation moves a side of the cube by 
120 degrees and then "inverts" it
to the opposite side. Try it out with a dice, with all even sides up. 
The first operation of the "6" then
ends up on the lower side of the dice at at the "5"; then the "5" is 
copied into the "4" etc.


The matrix formalism actually becomes easier if you follow the augmented 
notation, as described in more recent issues of the IT, or in the 
teaching edition.


A symmetry operation in these issues uses letters W and w as P and Q are 
used for unit cell transformations
but that is a trivial, irrelevant detail. Anyway, a symmetry operation 
(W,w) can be written as a single

4x4 matrix in the form :


( W11 W12 W13 w1 )
( W21 W22 W23 w2 )
( W31 W32 W33 w3 )
( 0      0      0     1 )

This "augmented" matrix allows to use the standard matrix 
multiplications rules for matrices of rank two.


So with two symmetry operations W and M in augmented form, the 
combination is simply


O = W*M

Cyclic application of the 3bar symmetry operation with translation 
vectors : -z -x -y; 3/4 3/4 3/4 will give :


    0    0   -1  |  0.75
   -1    0    0  |  0.75
    0   -1    0  |  0.75

    0    1    0  |  0.00
    0    0    1  |  0.00
    1    0    0  |  0.00

   -1    0    0  |  0.75
    0   -1    0  |  0.75
    0    0   -1  |  0.75

    0    0    1  |  0.00
    1    0    0  |  0.00
    0    1    0  |  0.00

    0   -1    0  |  0.75
    0    0   -1  |  0.75
   -1    0    0  |  0.75

    1    0    0  |  0.00
    0    1    0  |  0.00
    0    0    1  |  0.00

Where the translation components are restricted to the interval [-1,1]

Another few points:

Several space groups Fd-3c included are listed in the ITA with two 
origin choices. Origin choice 1 has
the origin at the intersection of the higher symmetry elements like the 
rotation axes, while choice
two has the origin at the center of symmetry. This will change several 
of the generator matrices.



-z -x -y; 3/4 3/4 3/4 is usually not a generator matrix for Fd-3c (228); 
origin choice 1.


If you want to reproduce the atom coordinates in the exact sequence as 
in the ITA, you need to use the


generators as listed in the ITA BUT apply the centering operations last!

For F3-3c the standard generators are:

!    2  (  0,   0, 1/2)  0,1/4,z
!    2  (  0, 1/2,   0)  1/4,y,0
!    3   x,x,x
!    2  (1/2, 1/2,   0)  x,x-1/4,3/8
!   -1   3/8,3/8,3/8
!    t  (0  , 1/2, 1/2)
!    t  (1/2,   0, 1/2)

for Origin choice 2:

!    2  (  0,   0, 1/2)  1/8,3/8,z
!    2  (  0, 1/2,   0)  3/8,y,1/8
!    3   x,x,x
!    2  (1/2, 1/2,   0)  x,x-1/4,0
!   -1   0,0,0
!    t  (0  , 1/2, 1/2)
!    t  (1/2,   0, 1/2)

Note for example the difference in the 5th generator -1 = 1bar.

Another note, the generators in the ITA are listed such that starting 
from coordinates x,y,z you apply
the 1st generator to these coordinates. Then you can apply the second 
generator to all previously
generated position and so on. You do not need a recursive algorithm to 
generate all positions. for
special positions, you can terminate once a previous coordinate is 
reproduced.


Feel free to check out the generators and the generation of symmetry 
matrices in my DISCUS code
(generate_mod.f90 and spcgr_apply.f90 at 
https://github.com/tproffen/DiffuseCode




Hope this helps
Reinhard Neder


Am 08.11.22 um 04:42 schrieb Matthew Rowles:

Hi all

For various reasons, I'm writing some code to generate the general 
positions of the space groups. I'm trying to follow the implementation 
of Shmueli in their 1984 paper and ITB chapter[1]


My generated positions are fine for all except about 10 settings, and 
I think that I might have an issue with how I'm generating the various 
matrices which have improper rotations with translation vectors.


I've deduced that a matrix, P, with translation vector, t, multiplied 
by Q and u,  can be represented as (P,t)*(Q,u) = (PQ, Pu + t), and so 
I assume that (P,t)^2 is just (PP, Pt+t).


Following equation 12 from the 1984 paper, I can see that, (for 
example) from space group P4(1)32, one of the generating matrices is 
(4C, 393), and if I follow the above schema, I can generate (4C, 393), 
(4C, 393)^2, (4C,