From: <hansonr@us...>  20080630 05:10:01

Revision: 9535 http://jmol.svn.sourceforge.net/jmol/?rev=9535&view=rev Author: hansonr Date: 20080629 22:09:59 0700 (Sun, 29 Jun 2008) Log Message:  version=11.5.43 quaternion, POVRAY, more. # new feature: quaterion % point4f  "thetaDirected"  # point4f is {x, y, z, w} (w ignored), where {x y z} is a # preferred direction. # Returns a point4f angleAxis equivalent with x, y, z the normal for the quaternion # rotation and w = theta for the rotation, where the normal and theta are chosen # to be directed with a positive dot product between the input {x y z} # vector and the output {x y z}. # bug fix: POVRAY output of quadrilaterals. # new feature: Ramachandran "r"  includes third (Z) axis quaternion r difference2 X component equivalent # bug fix: quaternion definition with dotproduct check not effective  removed # bug fix: quaternion construction from matrix error # # new feature: _applet boolean # # new feature: extended quaternion math # # q = quaternion({x y z}, angleDegrees) # q = quaternion(q0, q1, q2,q3) # q = {qx, qy, qz, qw} # # returning component values: # # q.x, q.y, q.z, q.w # # note that the Point4f equivalent stores w LAST, even though it is "q0" # because the Java Quat4f() and Point4f() both do that as well. We're just # being consistent with other Java use. # # Modulus operator for extended information retrieval: # # (q%0)  q0 (w) # (q%1)  q1 (x) # (q%2)  q2 (y) # (q%3)  q3 (z) # (q%1)  the vector {q1, q2, q3} # (q%2)  theta # (q%3)  equivalent rotational frame Xaxis # (q%4)  equivalent rotational frame Yaxis # (q%5)  equivalent rotational frame Zaxis # (q%{x y z})  rotational transform of a point or vector based on a quaternion # # thus, for example, (q%{1 0 0}) is the same as (q%3) # # (!q)  quaternion inverse # # # Quaternion right division (difference "dq"): # # q2 / q1 = q2 * (!q1) # # Quaternion left division (relative difference n): # # q2 \ q1 = (!q1) * q2 # # Examples: # # q = quaternion({1 1 1},120) # print "" + (q%{1 0 0}) + " " + (q%{0 1 0}) + " " + (q%{0 0 1}) # # {0 1.0 0} {0 0 1.0} {1.0 0 0} # # new feature: Numerical left division (integer divide) # # 3.6 \ 2 = 1 # 3.6 \ 1.3 = 2 # # new feature: sqrt(x) # # bug fix: load trajectory for cases with different atom counts. # # experimental: "straightness" defined as 1  2 * acos(normal(dq[i]%1) dot normal(dq[i+1])) / PI # giving a measure proportional to the difference in local helical axis angle # and ranging from 1 (opposite direction) to 1 (same direction) for proteins #  a work in progress. See # # load =1d66 # calculate straightness;color straightness # Modified Paths:  trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties ===================================================================  trunk/Jmol/src/org/jmol/viewer/Jmol.properties 20080630 05:04:35 UTC (rev 9534) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 20080630 05:09:59 UTC (rev 9535) @@ 10,7 +10,15 @@ # rotation and w = theta for the rotation, where the normal and theta are chosen # to be directed with a positive dot product between the input {x y z} # vector and the output {x y z}.  +# +# thus, because the negative angle switches the normal: +# +# print quaternion({1 0 0}, 20) % 1 ==> {1 0 0}; %1 ==> 20 +# +# but % {1 0 0 0} forces the angle associated with {1 0 0} to be reported +# +# print quaternion({1 0 0}, 20) % {1 0 0 0} ==> {1 0 0 20} +# # bug fix: POVRAY output of quadrilaterals. # new feature: Ramachandran "r"  includes third (Z) axis quaternion r difference2 X component equivalent This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 