[ccp4bb] AW: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-08 Thread Herman . Schreuder
Dear Chen,

You have more definitions which are not clearly defined: what do you mean with 
pseudo-NCS? Either you have NCS or you don’t. Did you mean pseudo 
crystallographic NCS? In the latter case, you will not have an arbitrary 
rotational relationship, but a rotation which is (almost) crystallographic, 
e.g. 60, 90, 120 or 180°. To analyze these, I would use polar rotation angles, 
which give the direction of the rotation axis (which should be almost parallel 
to one of the cell axis) and the rotation. When dealing with pseudo 
crystallographic NCS, you have to be very careful with your definitions, 
otherwise you can easily get lost.

Herman



Von: CCP4 bulletin board [mailto:CCP4BB@JISCMAIL.AC.UK] Im Auftrag von Chen Zhao
Gesendet: Freitag, 5. September 2014 21:46
An: CCP4BB@JISCMAIL.AC.UK
Betreff: Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

I am sorry for my carelessness on the definition of Euler angles. I am just 
thinking of an Euler angle equivalent. Sorry for the confusion I have made.

On Fri, Sep 5, 2014 at 3:34 PM, Eleanor Dodson 
eleanor.dod...@york.ac.ukmailto:eleanor.dod...@york.ac.uk wrote:
I don't think Eulerian angles are defined for a non-orthogonal axis system? ?

They are defined relative to perpendicular axes X Y Z
e.g.
Rotate coordinates by gamma about Z, beta about Y', alpha about Z.


Eleanor




On 5 September 2014 16:27, Chen Zhao c.z...@yale.edumailto:c.z...@yale.edu 
wrote:
Thank you Eleanor for your reply. I am actually considering how to describe a 
pseudo-NCS with an arbitrary rotational and translational relationship. I don't 
have to do this but I am just curious. It is more straightforward if I say how 
the two molecules are related by a rotation around unit cell axis than around 
orthogonal coordinate axis, which does not have an absolute physical meaning.
The command line output after coot superpose prints out the rotational and 
translational matrices for both the orthogonal and fractional coordinate system.
For using coordconv, my concern is that if I deal with a low-symmetry unit 
cell, which is not orthogonal by itself, the Euler angles for the fractional 
coordinate system and the orthogonal coordinate system should be different. If 
I just feed some numbers into coordconv, will it consider them as orthogonal 
coordinates?
Thank you,
Chen

On Fri, Sep 5, 2014 at 6:24 AM, Eleanor Dodson 
eleanor.dod...@york.ac.ukmailto:eleanor.dod...@york.ac.uk wrote:
Rotation matrices are rarely specified in a fractional coordinate system?  The 
criteria for checking such a matrix is Is the determinant 1? and this only 
holds for orthogonal matrices.


I guess the way I would do this though.
You presumably have two sets of fractional coordinates, before and after 
rotation?
There is a ccp4 program - coordconv which will read the fractional coordinates 
and generate pdb format with the convention ncode = 1 (You may need to fudge 
the fractional format I suppose..)
You can then use superpose to match the two sets of coordinates and the output 
will tell you the Eulerian angles used for the rotation!
Lots of ways to kill cats!
  Eleanor



On 4 September 2014 21:21, Phil Jeffrey 
pjeff...@princeton.edumailto:pjeff...@princeton.edu wrote:
The orthogonal/fractional matrix is outlined here:
http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_06_cowtan_coordinate_frames.pdf

Sorry to say I apparently ditched my old Fortran o2f and f2o programs to do 
that.

Bear in mind, however, that orthogonal has no fixed orientation with respect to 
fractional - for most space groups ncode 1 is often used but for primitive 
monoclinic ncode 3 is sometimes used, and I think the matrix shown in Kevin 
Cowtan's document above corresponds to ncode 1.

Phil Jeffrey
Princeton


On 9/4/14 3:55 PM, Chen Zhao wrote:
I am sorry, just to clarify, the fractional coordinate matrix I referred
to is a rotational matrix in the fractional coordinate system.


On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao 
c.z...@yale.edumailto:c.z...@yale.edu
mailto:c.z...@yale.edumailto:c.z...@yale.edu wrote:

Hi all,

I am just curious whether there are some tools extracting the Euler
angles from a fractional coordinate matrix. I have no luck searching
it online.

Alternatively, I found the analytical solution for the Euler angles
from an orthogonal coordinate matrix. So in the worst case, my
problem reduces to calculating the transformation matrix between the
fractional and orthogonal coordinate system. I feel a little bit at
a loss because it is 6 years since I last studied linear algebra.
How can I calculate this for a specific unit cell?

Thanks a lot in advance!

Sincerely,
Chen







Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-05 Thread Eleanor Dodson
Rotation matrices are rarely specified in a fractional coordinate system?
The criteria for checking such a matrix is Is the determinant 1? and this
only holds for orthogonal matrices.



I guess the way I would do this though.

You presumably have two sets of fractional coordinates, before and after
rotation?

There is a ccp4 program - coordconv which will read the fractional
coordinates and generate pdb format with the convention ncode = 1 (You may
need to fudge the fractional format I suppose..)

You can then use superpose to match the two sets of coordinates and the
output will tell you the Eulerian angles used for the rotation!

Lots of ways to kill cats!
  Eleanor





On 4 September 2014 21:21, Phil Jeffrey pjeff...@princeton.edu wrote:

 The orthogonal/fractional matrix is outlined here:
 http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_
 06_cowtan_coordinate_frames.pdf

 Sorry to say I apparently ditched my old Fortran o2f and f2o programs to
 do that.

 Bear in mind, however, that orthogonal has no fixed orientation with
 respect to fractional - for most space groups ncode 1 is often used but
 for primitive monoclinic ncode 3 is sometimes used, and I think the
 matrix shown in Kevin Cowtan's document above corresponds to ncode 1.

 Phil Jeffrey
 Princeton


 On 9/4/14 3:55 PM, Chen Zhao wrote:

 I am sorry, just to clarify, the fractional coordinate matrix I referred
 to is a rotational matrix in the fractional coordinate system.


 On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu
 mailto:c.z...@yale.edu wrote:

 Hi all,

 I am just curious whether there are some tools extracting the Euler
 angles from a fractional coordinate matrix. I have no luck searching
 it online.

 Alternatively, I found the analytical solution for the Euler angles
 from an orthogonal coordinate matrix. So in the worst case, my
 problem reduces to calculating the transformation matrix between the
 fractional and orthogonal coordinate system. I feel a little bit at
 a loss because it is 6 years since I last studied linear algebra.
 How can I calculate this for a specific unit cell?

 Thanks a lot in advance!

 Sincerely,
 Chen





Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-05 Thread Eugene Krissinel
This is just a petty function in CCP4's MMDB library -- Eugene

On 4 Sep 2014, at 20:52, Chen Zhao wrote:

 Hi all,
 
 I am just curious whether there are some tools extracting the Euler angles 
 from a fractional coordinate matrix. I have no luck searching it online. 
 
 Alternatively, I found the analytical solution for the Euler angles from an 
 orthogonal coordinate matrix. So in the worst case, my problem reduces to 
 calculating the transformation matrix between the fractional and orthogonal 
 coordinate system. I feel a little bit at a loss because it is 6 years since 
 I last studied linear algebra. How can I calculate this for a specific unit 
 cell?
 
 Thanks a lot in advance!
 
 Sincerely,
 Chen


-- 
Scanned by iCritical.



Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-05 Thread Chen Zhao
Thank you Eleanor for your reply. I am actually considering how to describe
a pseudo-NCS with an arbitrary rotational and translational relationship. I
don't have to do this but I am just curious. It is more straightforward if
I say how the two molecules are related by a rotation around unit cell axis
than around orthogonal coordinate axis, which does not have an absolute
physical meaning.

The command line output after coot superpose prints out the rotational and
translational matrices for both the orthogonal and fractional coordinate
system.

For using coordconv, my concern is that if I deal with a low-symmetry unit
cell, which is not orthogonal by itself, the Euler angles for the
fractional coordinate system and the orthogonal coordinate system should be
different. If I just feed some numbers into coordconv, will it consider
them as orthogonal coordinates?

Thank you,
Chen

On Fri, Sep 5, 2014 at 6:24 AM, Eleanor Dodson eleanor.dod...@york.ac.uk
wrote:

 Rotation matrices are rarely specified in a fractional coordinate system?
 The criteria for checking such a matrix is Is the determinant 1? and this
 only holds for orthogonal matrices.



 I guess the way I would do this though.

 You presumably have two sets of fractional coordinates, before and after
 rotation?

 There is a ccp4 program - coordconv which will read the fractional
 coordinates and generate pdb format with the convention ncode = 1 (You may
 need to fudge the fractional format I suppose..)

 You can then use superpose to match the two sets of coordinates and the
 output will tell you the Eulerian angles used for the rotation!

 Lots of ways to kill cats!
   Eleanor





 On 4 September 2014 21:21, Phil Jeffrey pjeff...@princeton.edu wrote:

 The orthogonal/fractional matrix is outlined here:
 http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_
 06_cowtan_coordinate_frames.pdf

 Sorry to say I apparently ditched my old Fortran o2f and f2o programs to
 do that.

 Bear in mind, however, that orthogonal has no fixed orientation with
 respect to fractional - for most space groups ncode 1 is often used but
 for primitive monoclinic ncode 3 is sometimes used, and I think the
 matrix shown in Kevin Cowtan's document above corresponds to ncode 1.

 Phil Jeffrey
 Princeton


 On 9/4/14 3:55 PM, Chen Zhao wrote:

 I am sorry, just to clarify, the fractional coordinate matrix I referred
 to is a rotational matrix in the fractional coordinate system.


 On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu
 mailto:c.z...@yale.edu wrote:

 Hi all,

 I am just curious whether there are some tools extracting the Euler
 angles from a fractional coordinate matrix. I have no luck searching
 it online.

 Alternatively, I found the analytical solution for the Euler angles
 from an orthogonal coordinate matrix. So in the worst case, my
 problem reduces to calculating the transformation matrix between the
 fractional and orthogonal coordinate system. I feel a little bit at
 a loss because it is 6 years since I last studied linear algebra.
 How can I calculate this for a specific unit cell?

 Thanks a lot in advance!

 Sincerely,
 Chen






Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-05 Thread Eleanor Dodson
I don't think Eulerian angles are defined for a non-orthogonal axis system?
?

They are defined relative to perpendicular axes X Y Z
e.g.
Rotate coordinates by gamma about Z, beta about Y', alpha about Z.


Eleanor





On 5 September 2014 16:27, Chen Zhao c.z...@yale.edu wrote:

 Thank you Eleanor for your reply. I am actually considering how to
 describe a pseudo-NCS with an arbitrary rotational and translational
 relationship. I don't have to do this but I am just curious. It is more
 straightforward if I say how the two molecules are related by a rotation
 around unit cell axis than around orthogonal coordinate axis, which does
 not have an absolute physical meaning.

 The command line output after coot superpose prints out the rotational and
 translational matrices for both the orthogonal and fractional coordinate
 system.

 For using coordconv, my concern is that if I deal with a low-symmetry unit
 cell, which is not orthogonal by itself, the Euler angles for the
 fractional coordinate system and the orthogonal coordinate system should be
 different. If I just feed some numbers into coordconv, will it consider
 them as orthogonal coordinates?

 Thank you,
 Chen

 On Fri, Sep 5, 2014 at 6:24 AM, Eleanor Dodson eleanor.dod...@york.ac.uk
 wrote:

 Rotation matrices are rarely specified in a fractional coordinate
 system?  The criteria for checking such a matrix is Is the determinant 1?
 and this only holds for orthogonal matrices.



 I guess the way I would do this though.

 You presumably have two sets of fractional coordinates, before and after
 rotation?

 There is a ccp4 program - coordconv which will read the fractional
 coordinates and generate pdb format with the convention ncode = 1 (You may
 need to fudge the fractional format I suppose..)

 You can then use superpose to match the two sets of coordinates and the
 output will tell you the Eulerian angles used for the rotation!

 Lots of ways to kill cats!
   Eleanor





 On 4 September 2014 21:21, Phil Jeffrey pjeff...@princeton.edu wrote:

 The orthogonal/fractional matrix is outlined here:
 http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_
 06_cowtan_coordinate_frames.pdf

 Sorry to say I apparently ditched my old Fortran o2f and f2o programs to
 do that.

 Bear in mind, however, that orthogonal has no fixed orientation with
 respect to fractional - for most space groups ncode 1 is often used but
 for primitive monoclinic ncode 3 is sometimes used, and I think the
 matrix shown in Kevin Cowtan's document above corresponds to ncode 1.

 Phil Jeffrey
 Princeton


 On 9/4/14 3:55 PM, Chen Zhao wrote:

 I am sorry, just to clarify, the fractional coordinate matrix I referred
 to is a rotational matrix in the fractional coordinate system.


 On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu
 mailto:c.z...@yale.edu wrote:

 Hi all,

 I am just curious whether there are some tools extracting the Euler
 angles from a fractional coordinate matrix. I have no luck searching
 it online.

 Alternatively, I found the analytical solution for the Euler angles
 from an orthogonal coordinate matrix. So in the worst case, my
 problem reduces to calculating the transformation matrix between the
 fractional and orthogonal coordinate system. I feel a little bit at
 a loss because it is 6 years since I last studied linear algebra.
 How can I calculate this for a specific unit cell?

 Thanks a lot in advance!

 Sincerely,
 Chen







Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-05 Thread Chen Zhao
I am sorry for my carelessness on the definition of Euler angles. I am just
thinking of an Euler angle equivalent. Sorry for the confusion I have made.


On Fri, Sep 5, 2014 at 3:34 PM, Eleanor Dodson eleanor.dod...@york.ac.uk
wrote:

 I don't think Eulerian angles are defined for a non-orthogonal axis
 system? ?

 They are defined relative to perpendicular axes X Y Z
 e.g.
 Rotate coordinates by gamma about Z, beta about Y', alpha about Z.


 Eleanor





 On 5 September 2014 16:27, Chen Zhao c.z...@yale.edu wrote:

 Thank you Eleanor for your reply. I am actually considering how to
 describe a pseudo-NCS with an arbitrary rotational and translational
 relationship. I don't have to do this but I am just curious. It is more
 straightforward if I say how the two molecules are related by a rotation
 around unit cell axis than around orthogonal coordinate axis, which does
 not have an absolute physical meaning.

 The command line output after coot superpose prints out the rotational
 and translational matrices for both the orthogonal and fractional
 coordinate system.

 For using coordconv, my concern is that if I deal with a low-symmetry
 unit cell, which is not orthogonal by itself, the Euler angles for the
 fractional coordinate system and the orthogonal coordinate system should be
 different. If I just feed some numbers into coordconv, will it consider
 them as orthogonal coordinates?

 Thank you,
 Chen

 On Fri, Sep 5, 2014 at 6:24 AM, Eleanor Dodson eleanor.dod...@york.ac.uk
  wrote:

 Rotation matrices are rarely specified in a fractional coordinate
 system?  The criteria for checking such a matrix is Is the determinant 1?
 and this only holds for orthogonal matrices.



 I guess the way I would do this though.

 You presumably have two sets of fractional coordinates, before and after
 rotation?

 There is a ccp4 program - coordconv which will read the fractional
 coordinates and generate pdb format with the convention ncode = 1 (You may
 need to fudge the fractional format I suppose..)

 You can then use superpose to match the two sets of coordinates and the
 output will tell you the Eulerian angles used for the rotation!

 Lots of ways to kill cats!
   Eleanor





 On 4 September 2014 21:21, Phil Jeffrey pjeff...@princeton.edu wrote:

 The orthogonal/fractional matrix is outlined here:
 http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_
 06_cowtan_coordinate_frames.pdf

 Sorry to say I apparently ditched my old Fortran o2f and f2o programs
 to do that.

 Bear in mind, however, that orthogonal has no fixed orientation with
 respect to fractional - for most space groups ncode 1 is often used but
 for primitive monoclinic ncode 3 is sometimes used, and I think the
 matrix shown in Kevin Cowtan's document above corresponds to ncode 1.

 Phil Jeffrey
 Princeton


 On 9/4/14 3:55 PM, Chen Zhao wrote:

 I am sorry, just to clarify, the fractional coordinate matrix I
 referred
 to is a rotational matrix in the fractional coordinate system.


 On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu
 mailto:c.z...@yale.edu wrote:

 Hi all,

 I am just curious whether there are some tools extracting the Euler
 angles from a fractional coordinate matrix. I have no luck
 searching
 it online.

 Alternatively, I found the analytical solution for the Euler angles
 from an orthogonal coordinate matrix. So in the worst case, my
 problem reduces to calculating the transformation matrix between
 the
 fractional and orthogonal coordinate system. I feel a little bit at
 a loss because it is 6 years since I last studied linear algebra.
 How can I calculate this for a specific unit cell?

 Thanks a lot in advance!

 Sincerely,
 Chen








[ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-04 Thread Chen Zhao
Hi all,

I am just curious whether there are some tools extracting the Euler angles
from a fractional coordinate matrix. I have no luck searching it online.

Alternatively, I found the analytical solution for the Euler angles from an
orthogonal coordinate matrix. So in the worst case, my problem reduces to
calculating the transformation matrix between the fractional and orthogonal
coordinate system. I feel a little bit at a loss because it is 6 years
since I last studied linear algebra. How can I calculate this for a
specific unit cell?

Thanks a lot in advance!

Sincerely,
Chen


Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-04 Thread Chen Zhao
I am sorry, just to clarify, the fractional coordinate matrix I referred to
is a rotational matrix in the fractional coordinate system.


On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu wrote:

 Hi all,

 I am just curious whether there are some tools extracting the Euler angles
 from a fractional coordinate matrix. I have no luck searching it online.

 Alternatively, I found the analytical solution for the Euler angles from
 an orthogonal coordinate matrix. So in the worst case, my problem reduces
 to calculating the transformation matrix between the fractional and
 orthogonal coordinate system. I feel a little bit at a loss because it is 6
 years since I last studied linear algebra. How can I calculate this for a
 specific unit cell?

 Thanks a lot in advance!

 Sincerely,
 Chen



Re: [ccp4bb] Extract Euler angles from fractional coordinate matrix

2014-09-04 Thread Phil Jeffrey

The orthogonal/fractional matrix is outlined here:
http://www.iucr.org/__data/assets/pdf_file/0009/7011/19_06_cowtan_coordinate_frames.pdf

Sorry to say I apparently ditched my old Fortran o2f and f2o programs to 
do that.


Bear in mind, however, that orthogonal has no fixed orientation with 
respect to fractional - for most space groups ncode 1 is often used 
but for primitive monoclinic ncode 3 is sometimes used, and I think 
the matrix shown in Kevin Cowtan's document above corresponds to ncode 1.


Phil Jeffrey
Princeton


On 9/4/14 3:55 PM, Chen Zhao wrote:

I am sorry, just to clarify, the fractional coordinate matrix I referred
to is a rotational matrix in the fractional coordinate system.


On Thu, Sep 4, 2014 at 3:52 PM, Chen Zhao c.z...@yale.edu
mailto:c.z...@yale.edu wrote:

Hi all,

I am just curious whether there are some tools extracting the Euler
angles from a fractional coordinate matrix. I have no luck searching
it online.

Alternatively, I found the analytical solution for the Euler angles
from an orthogonal coordinate matrix. So in the worst case, my
problem reduces to calculating the transformation matrix between the
fractional and orthogonal coordinate system. I feel a little bit at
a loss because it is 6 years since I last studied linear algebra.
How can I calculate this for a specific unit cell?

Thanks a lot in advance!

Sincerely,
Chen