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 If you decide to print this...

then you'll need to find a place to file it...!