Revision: 20116
          http://sourceforge.net/p/jmol/code/20116
Author:   hansonr
Date:     2014-11-20 16:55:13 +0000 (Thu, 20 Nov 2014)
Log Message:
-----------
Jmol.___JmolVersion="14.3.9_2014.11.19"

bug fix: Euler ZYZ and ZXZ for quaternion({0 0 1},theta) where theta < 0 in 
error
 

Modified Paths:
--------------
    branches/v14_2/Jmol/src/javajs/util/Quat.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/javajs/util/Quat.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v14_2/Jmol/src/javajs/util/Quat.java
===================================================================
--- branches/v14_2/Jmol/src/javajs/util/Quat.java       2014-11-19 12:52:19 UTC 
(rev 20115)
+++ branches/v14_2/Jmol/src/javajs/util/Quat.java       2014-11-20 16:55:13 UTC 
(rev 20116)
@@ -794,8 +794,9 @@
     // http://www.swarthmore.edu/NatSci/mzucker1/e27/diebel2006attitude.pdf
     double rA, rB, rG;
     if (q1 == 0 && q2 == 0) {
+      float theta = getTheta();
       // pure Z rotation - ambiguous
-      return new float[] { getTheta(), 0, 0 };
+      return new float[] { q3 < 0 ? -theta : theta , 0, 0 };
     }
     rA = Math.atan2(2 * (q2 * q3 + q0 * q1), 2 * (-q1 * q3 + q0 * q2 ));
     rB = Math.acos(q3 * q3 - q2 * q2 - q1 * q1 + q0 * q0);
@@ -808,8 +809,9 @@
     // http://www.swarthmore.edu/NatSci/mzucker1/e27/diebel2006attitude.pdf
     double rA, rB, rG;
     if (q1 == 0 && q2 == 0) {
+      float theta = getTheta();
       // pure Z rotation - ambiguous
-      return new float[] { getTheta(), 0, 0 };
+      return new float[] { q3 < 0 ? -theta : theta , 0, 0 };
     }
     rA = Math.atan2(2 * (q1 * q3 - q0 * q2), 2 * (q0 * q1 + q2 * q3 ));
     rB = Math.acos(q3 * q3 - q2 * q2 - q1 * q1 + q0 * q0);

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2014-11-19 
12:52:19 UTC (rev 20115)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2014-11-20 
16:55:13 UTC (rev 20116)
@@ -5,8 +5,13 @@
 # THIS IS THE RELEASE BRANCH 
 # BUG FIXES ONLY, PLEASE
 
-Jmol.___JmolVersion="14.2.9_2014.11.17"
+Jmol.___JmolVersion="14.2.9_2014.11.19"
 
+bug fix: Euler ZYZ and ZXZ for quaternion({0 0 1},theta) where theta < 0 in 
error
+ 
+
+JmolVersion="14.2.9_2014.11.17"
+
 released as Jmol 14.3.9 and Jmol 14.2.9
 
 new feature: VASP CHGCAR reader

Modified: trunk/Jmol/src/javajs/util/Quat.java
===================================================================
--- trunk/Jmol/src/javajs/util/Quat.java        2014-11-19 12:52:19 UTC (rev 
20115)
+++ trunk/Jmol/src/javajs/util/Quat.java        2014-11-20 16:55:13 UTC (rev 
20116)
@@ -794,8 +794,9 @@
     // http://www.swarthmore.edu/NatSci/mzucker1/e27/diebel2006attitude.pdf
     double rA, rB, rG;
     if (q1 == 0 && q2 == 0) {
+      float theta = getTheta();
       // pure Z rotation - ambiguous
-      return new float[] { getTheta(), 0, 0 };
+      return new float[] { q3 < 0 ? -theta : theta , 0, 0 };
     }
     rA = Math.atan2(2 * (q2 * q3 + q0 * q1), 2 * (-q1 * q3 + q0 * q2 ));
     rB = Math.acos(q3 * q3 - q2 * q2 - q1 * q1 + q0 * q0);
@@ -808,8 +809,9 @@
     // http://www.swarthmore.edu/NatSci/mzucker1/e27/diebel2006attitude.pdf
     double rA, rB, rG;
     if (q1 == 0 && q2 == 0) {
+      float theta = getTheta();
       // pure Z rotation - ambiguous
-      return new float[] { getTheta(), 0, 0 };
+      return new float[] { q3 < 0 ? -theta : theta , 0, 0 };
     }
     rA = Math.atan2(2 * (q1 * q3 - q0 * q2), 2 * (q0 * q1 + q2 * q3 ));
     rB = Math.acos(q3 * q3 - q2 * q2 - q1 * q1 + q0 * q0);

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-11-19 12:52:19 UTC 
(rev 20115)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-11-20 16:55:13 UTC 
(rev 20116)
@@ -15,8 +15,13 @@
 TODO: design and implement sidechain mutation -- MUTATE command ?
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
-Jmol.___JmolVersion="14.3.9_2014.11.17"
+Jmol.___JmolVersion="14.3.9_2014.11.19"
 
+bug fix: Euler ZYZ and ZXZ for quaternion({0 0 1},theta) where theta < 0 in 
error
+ 
+
+JmolVersion="14.3.9_2014.11.17"
+
 released as Jmol 14.3.9 and Jmol 14.2.9
 
 new feature: VASP CHGCAR reader

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to