I can't reproduce your problem. for me,

rotate quaternion @q  

where q is a quaternion works fine. That Java method seems to be working correctly --

write coord t.mol

uses that, and it works for me. So it must be something in your code.






On Thu, Feb 27, 2014 at 12:37 PM, jiayi.zhou <jiayi.zhou@mun.ca> wrote:
Hi, I was trying to use Jmol's functions to build an app for my own need. I met a strange problem when I was using the function transformP2.
For example, I use Measure.getQuaternion() to get a quaternion. Let's call it q. Then I use q.transformP2(ptA,ptAnew) to get every atom's coordinates of a structure after rotation.

Then I also used Jmol script "rotate QUATERNION {q.q1 q.q2 q.q3 q.q0} to rotate the structure and then get the coordinates.

I notice the coordinates I get from these two ways are not equal. I found out that the coordinates I got by function transformP2 are correct. The coordinates I got by using rotate script are not. Do you know why? 

Thank you
--
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...!


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&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