A very well described and interesting question!

Quaternions are all about rotation. They do not represent translations at
all. So when the COMPARE command is used, it applies both a
center-of-geometry translation as well as a quaternion rotation to actually
superimpose two structures. When the ROTATE command is used, it rotates
around the "center of the atoms" however that is defined.

In the second case you describe, each point is being rotated around the
origin. So you should expect a translation to also be needed.

Can I ask why not just use scripts to do this? Why access these Java
methods so directly?

Bob Hanson


On Thu, Oct 31, 2013 at 6:45 PM, jiayi.zhou <jiayi.z...@mun.ca> wrote:

> For example, I have 2 set of points of structures.
> lets say set1{(x1,y1,z1),(x2,y2,z2)....(xn,yn,zn)}
> set2{(x1',y1',z1'),(x2',y2',z2')...(xn',yn',zn')}
>
> set2 is generated by randomly rotating set1.
>
> I used your Measure.calculateQuaternionRotation function to get the
> rotation quaternion, lets say Q1. Then I displayed these 2 structures in
> Jmol and used script "rotateSelected QUATERNION{Q1.q1,Q1.q2,Q1.q3,Q1.q0}.
> These two structures can be fully overlapped after rotation. So I think the
> Q1 I got by your function is correct.
>
> Then I used Q1.transformP2() to calculate every points in set1 after
> rotation. And I found out the points I got are not same as the points in
> set2, even not close. By analyise these points I noticed that the points I
> got are a set of points equal to the points in set2 being translated by  a
> certain distance.
>
> I am wondering how did this happen. Should the points in set1 after
> rotating be same as the points in set2? Why they are equal to the points in
> set2 which have been translated by a certain distance?
>
>
> --
> Aiden/Jiayi Zhou
>
> Office Tel: 709-864-4891
> Master Candidate
> Dept. of Computer Science
> Memorial University of Newfoundland
> St. John's, NL, Canada, A1B 3X5
>
> P I*f you decide to print this...*
>
> **
>
> *         then you'll need to find a place to file it...!*
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to