Hi Yuan You might want to look at the 'exponential map' as an alternative to quaternions. This article evaluates all the various representations of rotations, including Eulerian angles, polar angles, rotation matrices, quaternions etc:
http://webhome.cs.uvic.ca/~blob/courses/485c/notes/pdf/expmap.pdf The advantage of the exponential map representation is that only 3 variables are used, which, as for the Eulerian & polar angle representations, is exactly the number that are needed to represent an arbitrary rotation in 3-D so it's an optimally parsimonious representation. However it doesn't suffer from the well-known singularities as Eulerian & polar angles (it suffers from different singularities but it's possible to "sweep them under the carpet"). Quaternions, as you say, require 4 variables but a constraint is needed (i.e. normalisation of the vector) to reduce it back to 3. Cheers -- Ian On Mon, Sep 13, 2010 at 4:21 PM, 商元 <shangyuan5...@gmail.com> wrote: > Dear CCP4 members, > I have finally used Eleanor's idea, and it works very well. After > applying SSM, we can get a rotation matrix(M), and a displacement vector N: > (Xnew,Ynew,Znew)'=M*(X,Y,Z)'+N > Then, from the rotation matrix M, we can get its another representative > format-----quaternion number. The quaternion number has 4 elements, the > first element(w) of which represents the cosine value of half of the > rotation anger, and the next 3 elements(x0,y0,z0) represent the rotation > vector. That means the molecule rotates an angle of acos(w)*2*180/pi degrees > around the vector (x0,y0,z0). > The attached file is the matlab program i wrote to translate M into a > quaternion number. That should be very easy to be translated into other > language formats. > > Best & regards, > Yuan SHANG > > > > On Thu, Aug 19, 2010 at 7:34 PM, Frances C. Bernstein > <f...@bernstein-plus-sons.com> wrote: >> >> Pete Artymiuk wrote: >> ----------------------- >> I have an old badly-written Fortran program (I wrote it for a Vax, but it >> still compiles and runs in g95 - isn't Fortran wonderful?) that takes >> Arnott & Dover's polar coordinates and converts them to a helix of any >> required length* in PDB (or Diamond!) format. >> ----------------------- >> >> Wow, that is an old program! >> >> For everyone under the ago of 60 reading this list, Diamond >> format was the very first PDB format, used for the first 100 >> or so entries that we had. It was based on the output format >> of the Diamond real-space refinement program and each line was >> 132 characters long. Long lines were awkward, in some ways, >> to handle on computers of that time so we designed what is >> now known as PDB format. If you want to know more, you can >> look at page 9 of the September 1974 PDB Newsletter (available >> on the RCSB web site if you start at >> >> http://www.rcsb.org/pdb/static.do?p=general_information/news_publications/newsletters/newsletter.html#pre1999) >> for the format of coordinate records in the original format. >> >> The reason that I know that there were about 100 entries >> released in the original format is that I was the one who had >> to convert them all into the new PDB format in 1976. >> >> Frances Bernstein >> >> ===================================================== >> **** Bernstein + Sons >> * * Information Systems Consultants >> **** 5 Brewster Lane, Bellport, NY 11713-2803 >> * * *** >> **** * Frances C. Bernstein >> * *** ...@bernstein-plus-sons.com >> *** * >> * *** 1-631-286-1339 FAX: 1-631-286-1999 >> ===================================================== > >