Revision: 20337
          http://sourceforge.net/p/jmol/code/20337
Author:   hansonr
Date:     2015-02-26 15:23:18 +0000 (Thu, 26 Feb 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.2.12_2015.02.26"

bug fix: writing image of MO fails to write info (Jmol 12 or before)
bug fix: legacy non-XML JVXL reading does not color map
 

Modified Paths:
--------------
    branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java
    branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java
    branches/v14_2/Jmol/src/org/jmol/scriptext/MathExt.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
    branches/v14_2/Jmol/src/org/jmol/viewer/PropertyManager.java
    branches/v14_2/Jmol/src/org/jmol/viewer/TransformManager.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java

Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java       
2015-02-25 20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlReader.java       
2015-02-26 15:23:18 UTC (rev 20337)
@@ -233,6 +233,8 @@
         || param3 < 0);
     params.isBicolorMap = (param1 > 0 && param2 < 0);
     jvxlDataIsColorMapped = (param3 != 0);
+    if (jvxlDataIsColorMapped)
+      jvxlData.colorScheme = "RGB"; // legacy
     jvxlDataIs2dContour = (jvxlDataIsColorMapped && params.isContoured);
 
     if (params.isBicolorMap || params.colorBySign)

Modified: branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java     2015-02-25 
20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java     2015-02-26 
15:23:18 UTC (rev 20337)
@@ -5822,7 +5822,7 @@
         q = getQuaternionParameter(i);
         if (q != null) {
           if (tok == T.best && !(isMolecular = isSelected)) // yes, setting 
isMolecular here.
-            q = q.mulQ(Quat.newM(vwr.tm.matrixRotate).mul(-1));
+            q = q.mulQ(vwr.tm.getRotationQ().mul(-1));
           rotAxis.setT(q.getNormal());
           endDegrees = q.getTheta();
         }

Modified: branches/v14_2/Jmol/src/org/jmol/scriptext/MathExt.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/scriptext/MathExt.java     2015-02-25 
20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/scriptext/MathExt.java     2015-02-26 
15:23:18 UTC (rev 20337)
@@ -1958,7 +1958,7 @@
     P4 p4 = null;
     switch (nArgs) {
     case 0:
-      return mp.addXPt4(Quat.newM(vwr.tm.matrixRotate).toPoint4f());
+      return mp.addXPt4(vwr.tm.getRotationQ().toPoint4f());
     case 1:
     default:
       if (tok == T.quaternion && args[0].tok == T.varray) {

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-02-25 
20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-02-26 
15:23:18 UTC (rev 20337)
@@ -5,8 +5,13 @@
 # THIS IS THE RELEASE BRANCH 
 # BUG FIXES ONLY, PLEASE
 
-Jmol.___JmolVersion="14.2.12_2015.02.22b"
+Jmol.___JmolVersion="14.2.12_2015.02.26"
 
+bug fix: writing image of MO fails to write info (Jmol 12 or before)
+bug fix: legacy non-XML JVXL reading does not color map
+ 
+JmolVersion="14.2.12_2015.02.22b"
+
 bug fix: end-on bonds may appear to disappear
 bug fix: JavaScript -2.format("%8.3") gives 2.000 not -2.000
 bug fix: WRITE PDB broken

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/PropertyManager.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/PropertyManager.java        
2015-02-25 20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/PropertyManager.java        
2015-02-26 15:23:18 UTC (rev 20337)
@@ -930,7 +930,7 @@
     if (!asXYZVIB && bsAtoms.cardinality() == 0)
       return "";
     boolean isOK = true;
-    Quat q = (doTransform ? Quat.newM(vwr.tm.matrixRotate) : null);
+    Quat q = (doTransform ? vwr.tm.getRotationQ() : null);
     if (asSDF) {
       String header = mol.toString();
       mol = new SB();

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/TransformManager.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/TransformManager.java       
2015-02-25 20:13:56 UTC (rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/TransformManager.java       
2015-02-26 15:23:18 UTC (rev 20337)
@@ -649,12 +649,16 @@
     return info;
   }
 
+  public Quat getRotationQ() {
+    return Quat.newM(matrixRotate);
+  }
+
   String getOrientationText(int type) {
     switch (type) {
     case T.moveto:
       return getMoveToText(1, false);
     case T.rotation:
-      return Quat.newM(vwr.tm.matrixRotate).toString();
+      return getRotationQ().toString();
     case T.translation:
       SB sb = new SB();
       truncate2(sb, getTranslationXPercent());
@@ -674,7 +678,7 @@
     A4 aa = new A4();
     aa.setM(matrixRotate);
     info.put("axisAngle", aa);
-    info.put("quaternion", Quat.newM(matrixRotate).toPoint4f());
+    info.put("quaternion", getRotationQ().toPoint4f());
     info.put("rotationMatrix", matrixRotate);
     info.put("rotateZYZ", getRotateZyzText(false));
     info.put("rotateXYZ", getRotateXyzText());
@@ -1171,11 +1175,11 @@
     // in these renderers. 
 
     P3 ptCamera = P3.new3(screenWidth / 2, screenHeight / 2, 0);
-    vwr.tm.unTransformPoint(ptCamera, ptCamera);
+    unTransformPoint(ptCamera, ptCamera);
     ptCamera.sub(fixedRotationCenter);
     P3 pt = P3.new3(screenWidth / 2, screenHeight / 2, cameraDistanceFromCenter
         * scalePixelsPerAngstrom);
-    vwr.tm.unTransformPoint(pt, pt);
+    unTransformPoint(pt, pt);
     pt.sub(fixedRotationCenter);
     ptCamera.add(pt);
 

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-02-25 20:13:56 UTC 
(rev 20336)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Viewer.java 2015-02-26 15:23:18 UTC 
(rev 20337)
@@ -823,24 +823,35 @@
    * @return enough data to update a WebGL view
    * 
    */
+  @SuppressWarnings("unused")
   public Object getGLmolView() {
-    @SuppressWarnings("unused")
-    TransformManager tm = this.tm;
+    T3 center = tm.fixedRotationCenter;
+    Quat q = tm.getRotationQ();
+    float xtrans = tm.xTranslationFraction;
+    float ytrans = tm.yTranslationFraction;
+    float scale = tm.scalePixelsPerAngstrom;
+    float zoom = tm.zmPctSet;
+    float cd = tm.cameraDistance;
+    float pc = tm.screenPixelCount;
+    boolean pd = tm.perspectiveDepth;
+    int width = tm.width;
+    int height = tm.height;
+    
     /**
      * @j2sNative
      * 
     *             return {
-    *              center:tm.fixedRotationCenter,
-    *              quaternion:tm.getRotationQuaternion(),
-    *              xtrans:tm.xTranslationFraction,
-    *              ytrans:tm.yTranslationFraction,
-    *              scale:tm.scalePixelsPerAngstrom,
-    *              zoom:tm.zoomPercent,
-    *              cameraDistance:tm.cameraDistance,
-    *              pixelCount:tm.screenPixelCount,
-    *              perspective:tm.perspectiveDepth,
-    *              width:tm.width,
-    *              height:tm.height                          
+    *              center:center,
+    *              quaternion:q,
+    *              xtrans:xtrans,
+    *              ytrans:ytrans,
+    *              scale:scale,
+    *              zoom:zoom,
+    *              cameraDistance:cd,
+    *              pixelCount:pc,
+    *              perspective:pd,
+    *              width:width,
+    *              height:height                          
     *             };
      */
     {
@@ -3311,9 +3322,7 @@
         && checkMotionRendering(T.antialiasdisplay)
         : isImageWrite && !isExport ? g.antialiasImages : false);
     imageFontScaling = (isReset || width <= 0 ? 1
-        : (g.zoomLarge == (height > width) ? height : width)
-            / getScreenDim())
-        * (antialiased ? 2 : 1);
+        : (antialiased ? 2 : 1) * (g.zoomLarge == (height > width) ? height : 
width) / getScreenDim());
     if (width > 0) {
       dimScreen.width = width;
       dimScreen.height = height;

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


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to