Revision: 20944
          http://sourceforge.net/p/jmol/code/20944
Author:   hansonr
Date:     2016-02-04 15:01:39 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
Jmol.___JmolVersion="14.4.2_2016.02.04"

FEATURE NOTE: Prior to this version if the MO command was issued after use of 
              rotateSelected, the orbitals were calculated improperly, because 
the
              basis functions always must be applied for the original file 
coordinate
              frame, not the rotated frame. In addition, if MOs were calculated 
prior to
              use of rotateSelected or translateSelected, then they would not 
"track"
              with the modified atom positions. So MOs and 
rotate/translateSelected
              were completely incompatible. Jmol 14.4.2 fixes this issue. It 
should be 
              possible now to produce correct MOs before or after use of 
rotateSelected.
              Note that ALL atoms in a specified model must be moved in order 
for this
              tracking of MOs to take place. This functionality was introduced 
in 
              14.4.1_2016.01.28, but that version (never released) does not 
properly 
              check to see that ALL the atoms in a model have been involved in 
the rotation.  
              
FEATURE NOTE: If rotateSelected or translateSelected is used to move all atoms 
in a
              model, and after that the state is saved, then Jmol 14.4.2 
              will save a state that is not readable in 14.4.1. This is 
necessary
              because of the added FRAME ORIENTATION command, which is used in 
the states
              to indicate the relationship of a model to its file coordinates. 
The MO
              reader requires this so that it can rotate the coordinates back 
to their 
              original position prior to doing its calculation. 
              
bug fix: JVXL files saved from models that involve full model 
rotate/translateSelected
         do not get restored properly.

bug fix: molecular orbitals do not move with atoms 
         when full molecule is moved using rotateSelected or translateSelected
         
code: better loading of surfaces -- no longer requires javajs.util.XmlUtil
code: removal of unnecessary api interfaces MinimizerInterface, 
VolumeDataInterface, QuantumPlaneCalculationInterface, MOCalculationInterface, 
MepCalculationInterface

Modified Paths:
--------------
    branches/v14_4/Jmol/src/javajs/util/XmlUtil.java
    branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java
    branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
    branches/v14_4/Jmol/src/org/jmol/jvxl/readers/XmlReader.java
    branches/v14_4/Jmol/src/org/jmol/modelset/Model.java
    branches/v14_4/Jmol/src/org/jmol/modelset/ModelSet.java
    branches/v14_4/Jmol/src/org/jmol/shape/MeshCollection.java
    branches/v14_4/Jmol/src/org/jmol/shapecgo/CGO.java
    branches/v14_4/Jmol/src/org/jmol/shapespecial/Draw.java
    branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java
    branches/v14_4/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java
    branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties
    branches/v14_4/Jmol/src/org/jmol/viewer/StateCreator.java
    branches/v14_4/Jmol/srcjs/js/package.js
    trunk/Jmol/src/javajs/util/XmlUtil.java
    trunk/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java
    trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
    trunk/Jmol/src/org/jmol/jvxl/readers/XmlReader.java
    trunk/Jmol/src/org/jmol/modelset/Model.java
    trunk/Jmol/src/org/jmol/modelset/ModelSet.java
    trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java
    trunk/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/org/jmol/viewer/PropertyManager.java
    trunk/Jmol/src/org/jmol/viewer/StateCreator.java
    trunk/Jmol/srcjs/js/package.js

Modified: branches/v14_4/Jmol/src/javajs/util/XmlUtil.java
===================================================================
--- branches/v14_4/Jmol/src/javajs/util/XmlUtil.java    2016-02-04 02:30:08 UTC 
(rev 20943)
+++ branches/v14_4/Jmol/src/javajs/util/XmlUtil.java    2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -25,13 +25,15 @@
 
 package javajs.util;
 
+/**
+ * A very simplistic XML generator
+ */
+
 public class XmlUtil {
 
   public XmlUtil() {
-    // Jmol's PropertyManager class uses reflection 
+    // Jmol's PropertyManager and JvxlCoder classes use reflection 
   }
-  // / simple Xml parser/generator ///
-
   public static void openDocument(SB data) {
     data.append("<?xml version=\"1.0\"?>\n");
   }
@@ -96,15 +98,6 @@
   }
   
   /**
-   * @param s
-   * @return   unwrapped text
-   */
-  public static String unwrapCdata(String s) {
-    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
-        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
-  }
-  
-  /**
    * standard <name attr="..." attr="...">data</name>"
    * 
    * @param sb
@@ -162,4 +155,14 @@
     sb.append(" ").appendO(name).append("=\"").appendO(value).append("\"");
   }
 
+//  /**
+//   * @param s
+//   * @return   unwrapped text
+//   */
+//  public static String unwrapCdata(String s) {
+//    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
+//        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
+//  }
+//  
+
 }

Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java   2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java   2016-02-04 
15:01:39 UTC (rev 20944)
@@ -25,6 +25,7 @@
 
 
 
+import javajs.J2SIgnoreImport;
 import javajs.util.Lst;
 import javajs.util.P3;
 import javajs.util.PT;
@@ -34,13 +35,16 @@
 
 import java.util.Map;
 
+import org.jmol.api.Interface;
 import org.jmol.java.BS;
 import org.jmol.util.BSUtil;
 import org.jmol.util.C;
 import org.jmol.util.Escape;
 import org.jmol.util.Logger;
+import org.jmol.viewer.Viewer;
 
 
+@J2SIgnoreImport({ javajs.util.XmlUtil.class })
 public class JvxlCoder {
 
   //TODO -- need to escapeXml for text data
@@ -57,6 +61,14 @@
   // 2.2 adds color density Jmol 12.0.15/12.1.13
   // 2.3 adds discrete colors for vertex-only data (encoding="none")
   
+  /**
+   * @j2sIgnore
+   * 
+   * @param volumeData
+   * @param jvxlData
+   * @param title
+   * @return XML string
+   */
   public static String jvxlGetFile(VolumeData volumeData, JvxlData jvxlData,
                                    String[] title) {
     // for the simple writer
@@ -65,28 +77,35 @@
     jvxlData.nPointsY = counts[1];
     jvxlData.nPointsZ = counts[2];
     jvxlData.jvxlVolumeDataXml = volumeData.setVolumetricXml();
-    return jvxlGetFile(jvxlData, null, title, null, true, 1, null, null);
+    return jvxlGetFileVwr(null, jvxlData, null, title, null, true, 1, null, 
null);
   }
 
-  public static String jvxlGetFile(JvxlData jvxlData, MeshData meshData,
-                                   String[] title, String msg,
-                                   boolean includeHeader, int nSurfaces,
-                                   String state, String comment) {
-    return jvxlGetFileXml(jvxlData, meshData, title, msg, includeHeader, 
nSurfaces, state, comment);
+  private static boolean haveXMLUtil;
+  
+  /**
+   * 
+   * @param vwr  for JSmol initInterface
+   * @param jvxlData
+   * @param meshData
+   * @param title
+   * @param msg
+   * @param includeHeader
+   * @param nSurfaces
+   * @param state
+   * @param comment
+   * @return
+   */
+  public static String jvxlGetFileVwr(Viewer vwr, JvxlData jvxlData,
+                                   MeshData meshData, String[] title,
+                                   String msg, boolean includeHeader,
+                                   int nSurfaces, String state, String 
comment) {
+    if (!haveXMLUtil) {
+      // creating an instance prevents pre-loading by JavaScript
+      if (vwr.isJS)
+        Interface.getInterface("javajs.util.XmlUtil", vwr, "show");
+      haveXMLUtil = true;  
+    }
     
-    // version1 decomissioned because of jvxlExcluded[] performing so well
-    
-    //    if (meshData != null || jvxlData == null || jvxlData.asXml 
-    //      || jvxlData.vContours != null || jvxlData.contourValues != null
-    //      || jvxlData.jvxlExcluded[0] != null || jvxlData.jvxlExcluded[1] != 
null )
-    //  return jvxlGetFileXml(jvxlData, meshData, title, msg, includeHeader, 
nSurfaces, state, comment);
-    //return jvxlGetFileVersion1(jvxlData, meshData, title, msg, 
includeHeader, nSurfaces, state, comment);
-  }
-
-  private static String jvxlGetFileXml(JvxlData jvxlData, MeshData meshData,
-                                       String[] title, String msg,
-                                       boolean includeHeader, int nSurfaces,
-                                       String state, String comment) {
     SB data = new SB();
     if ("TRAILERONLY".equals(msg)) {
       XmlUtil.closeTag(data, "jvxlSurfaceSet");

Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 
2016-02-04 02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 
2016-02-04 15:01:39 UTC (rev 20944)
@@ -1120,10 +1120,19 @@
       meshDataServer.notifySurfaceMappingCompleted();
   }
   
+  /**
+   * only called from org.openscience.jvxl.Jvxl.main
+   * 
+   * @j2sIgnore
+   * 
+   * @param property
+   * @param index
+   * @return Object
+   */
   public Object getProperty(String property, int index) {
     if (property == "jvxlFileData")
-      return JvxlCoder.jvxlGetFile(jvxlData, null, params.title, "", true,
-          index, null, null); // for Jvxl.java
+      return JvxlCoder.jvxlGetFileVwr(null, jvxlData, null, params.title, "",
+          true, index, null, null); // for Jvxl.java
     if (property == "jvxlFileInfo")
       return JvxlCoder.jvxlGetInfo(jvxlData); // for Jvxl.java
     return null;

Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/XmlReader.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/XmlReader.java        
2016-02-04 02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/XmlReader.java        
2016-02-04 15:01:39 UTC (rev 20944)
@@ -27,14 +27,13 @@
 
 import java.io.BufferedReader;
 
-import org.jmol.util.Escape;
-
+import javajs.util.P3;
 import javajs.util.PT;
 import javajs.util.SB;
-import javajs.util.P3;
-import javajs.util.XmlUtil;
 
+import org.jmol.util.Escape;
 
+
 public class XmlReader {
   
   // a relatively simple XML reader requiring "nice" line and tag format.
@@ -139,9 +138,18 @@
       return "";
     while (PT.isWhitespace(data.charAt(++pt1))) {
     }
-    return XmlUtil.unwrapCdata(data.substring(pt1, pt2));
+    return unwrapCdata(data.substring(pt1, pt2));
   }
 
+  /**
+   * @param s
+   * @return   unwrapped text
+   */
+  public static String unwrapCdata(String s) {
+    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
+        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
+  }
+  
   public static String getXmlAttrib(String data, String what) {
     // TODO
     // presumes what = "xxxx"

Modified: branches/v14_4/Jmol/src/org/jmol/modelset/Model.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/modelset/Model.java        2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/modelset/Model.java        2016-02-04 
15:01:39 UTC (rev 20944)
@@ -82,6 +82,9 @@
    */
   public ModelSet ms;
 
+  /**
+   * mat4 tracks the rotation/translation of the full model using  
rotateSelected or translateSelected 
+   */
   public M4 mat4;
   
   public int modelIndex; // our 0-based reference
@@ -182,6 +185,22 @@
     return bsAtoms.cardinality() - bsAtomsDeleted.cardinality();
   }
 
+  private BS bsCheck;
+  
+  /**
+   * 
+   * @param bs
+   * @return true if all undeleted atom bits in this model are in bs
+   */
+  public boolean isContainedIn(BS bs) {
+    if (bsCheck == null)
+      bsCheck = new BS();
+    bsCheck.or(bs);
+    bsCheck.and(bsAtoms);
+    bsCheck.andNot(bsAtomsDeleted);
+    return (bsCheck.cardinality() == getTrueAtomCount());
+  }
+
   public void resetBoundCount() {
     bondCount = -1;
   }

Modified: branches/v14_4/Jmol/src/org/jmol/modelset/ModelSet.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/modelset/ModelSet.java     2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/modelset/ModelSet.java     2016-02-04 
15:01:39 UTC (rev 20944)
@@ -3625,9 +3625,11 @@
       sm.notifyAtomPositionsChanged(i, bs, mat);
       if (mat != null) {
         Model m = am[i];
-        if (m.mat4 == null)
-          m.mat4 = M4.newM4(null);
-        m.mat4.mul2(mat, m.mat4);
+        if (m.isContainedIn(bs)) {
+          if (m.mat4 == null)
+            m.mat4 = M4.newM4(null);
+          m.mat4.mul2(mat, m.mat4);
+        }
       }
     }
     averageAtomPoint = null;

Modified: branches/v14_4/Jmol/src/org/jmol/shape/MeshCollection.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shape/MeshCollection.java  2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/shape/MeshCollection.java  2016-02-04 
15:01:39 UTC (rev 20944)
@@ -376,6 +376,13 @@
 
   @SuppressWarnings("unchecked")
   protected boolean getPropDataMC(String property, Object[] data) {
+    if (property == "keys") {
+      Lst<String> keys = (data[1] instanceof Lst<?> ? (Lst<String>) data[1] : 
new Lst<String>());
+      data[1] = keys;
+      keys.addLast("count");
+      keys.addLast("getCenter");
+      // will continue on to getPropertyIndex
+    }
     if (property == "getNames") {
       Map<String, T> map = (Map<String, T>) data[0];
       boolean withDollar = ((Boolean) data[1]).booleanValue();
@@ -401,6 +408,11 @@
       data[1] = list.get(0).thisID;
       return true;
     }
+    if (property == "index") {
+      Mesh m = getMesh((String) data[0]);
+      data[1] = Integer.valueOf(m == null ? -1 : m.index);
+      return true;
+    }    
     if (property == "getCenter") {
       String id = (String) data[0];
       int index = ((Integer) data[1]).intValue();
@@ -413,7 +425,7 @@
         data[2] = m.vs[m.getVertexIndexFromNumber(index)];
       return true;
     }
-    return false;
+    return getPropShape(property, data);
   }
 
   /**
@@ -442,8 +454,11 @@
     return list;
   }
 
-  protected Object getPropMC(String property) {
-    Mesh m;
+  protected Object getPropMC(String property, int index) {
+    Mesh m = currentMesh;
+    if (index >= 0
+        && (index >= meshCount || (m = meshes[index]) == null))
+      return null;
     if (property == "count") {
       int n = 0;
       for (int i = 0; i < meshCount; i++)
@@ -451,26 +466,34 @@
           n++;
       return Integer.valueOf(n);
     }
+    if (property == "bsVertices") {
+      if (m == null)
+        return null;
+      Lst<Object> lst = new Lst<Object>();
+      lst.addLast(m.vs);
+      lst.addLast(m.getVisibleVBS());
+      return lst;
+    }
     if (property == "ID")
-      return (currentMesh == null ? null : currentMesh.thisID);
+      return (m == null ? null : m.thisID);
     if (property.startsWith("list")) {
-          clean();
-          SB sb = new SB();
+      clean();
+      SB sb = new SB();
       int k = 0;
       boolean isNamed = property.length() > 5;
-      String id = (property.equals("list") ? null : isNamed ? 
property.substring(5) : currentMesh == null ? null : currentMesh.thisID);
+      String id = (property.equals("list") ? null : isNamed ? property
+          .substring(5) : m == null ? null : m.thisID);
       for (int i = 0; i < meshCount; i++) {
         m = meshes[i];
         if (id != null && !id.equalsIgnoreCase(m.thisID))
           continue;
-        sb.appendI((++k)).append(" id:" + m.thisID).append(
-            "; model:" + vwr.getModelNumberDotted(m.modelIndex)).append(
-            "; vertices:" + m.vc).append(
-            "; polygons:" + m.pc)
+        sb.appendI((++k)).append(" id:" + m.thisID)
+            .append("; model:" + vwr.getModelNumberDotted(m.modelIndex))
+            .append("; vertices:" + m.vc).append("; polygons:" + m.pc)
             .append("; visible:" + m.visible);
         float[] range = (float[]) getProperty("dataRange", 0);
         if (range != null)
-            sb.append("; dataRange:").append(Escape.eAF(range));
+          sb.append("; dataRange:").append(Escape.eAF(range));
         if (m.title != null) {
           String s = "";
           for (int j = 0; j < m.title.length; j++)
@@ -489,11 +512,11 @@
       return sb.toString();
     }
     if (property == "vertices")
-      return getVertices(currentMesh);
+      return getVertices(m);
     if (property == "info")
-      return (currentMesh == null ? null : currentMesh.getInfo(false));
+      return (m == null ? null : m.getInfo(false));
     if (property == "data")
-      return (currentMesh == null ? null : currentMesh.getInfo(true));
+      return (m == null ? null : m.getInfo(true));
 
     return null;
   }

Modified: branches/v14_4/Jmol/src/org/jmol/shapecgo/CGO.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapecgo/CGO.java  2016-02-04 02:30:08 UTC 
(rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/shapecgo/CGO.java  2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -147,7 +147,7 @@
   public Object getProperty(String property, int index) {
     if (property == "command")
       return getCommand(cgoMesh);
-    return getPropMC(property);
+    return getPropMC(property, index);
   }
 
   @Override

Modified: branches/v14_4/Jmol/src/org/jmol/shapespecial/Draw.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapespecial/Draw.java     2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/shapespecial/Draw.java     2016-02-04 
15:01:39 UTC (rev 20944)
@@ -538,7 +538,7 @@
       return getCommand(m);
     if (property == "type")
       return Integer.valueOf(m == null ? EnumDrawType.NONE.id : m.drawType.id);
-    return getPropMC(property);
+    return getPropMC(property, index);
   }
 
   private T3 getSpinCenter(String axisID, int vertexIndex, int modelIndex) {

Modified: branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java       
2016-02-04 02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java       
2016-02-04 15:01:39 UTC (rev 20944)
@@ -874,7 +874,7 @@
     IsosurfaceMesh thisMesh = this.thisMesh;
     if (index >= 0 && (index >= meshCount || (thisMesh = isomeshes[index]) == 
null))
       return null;
-    Object ret = getPropMC(property);
+    Object ret = getPropMC(property, index);
     if (ret != null)
       return ret;      
     if (property == "message") {
@@ -884,7 +884,7 @@
       if (jvxlData.dataMin != Float.MAX_VALUE)
         s += " min=" + jvxlData.dataMin + " max=" + jvxlData.dataMax;
       s += "; " + JC.shapeClassBases[shapeID].toLowerCase() + " count: "
-          + getPropMC("count");
+          + getPropMC("count", index);
       return s + getPropI("dataRangeStr", index) + jvxlData.msg;
     }
     if (property == "dataRange")
@@ -930,7 +930,7 @@
       SB sb = new SB();
       getMeshCommand(sb, thisMesh.index);
       thisMesh.setJvxlColorMap(true);
-      return JvxlCoder.jvxlGetFile(jvxlData, meshData, title, "", true, 1, 
sb.toString(), null);
+      return JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, meshData, title, "", 
true, 1, sb.toString(), null);
     }
     if (property == "jvxlFileInfo") {
       thisMesh.setJvxlColorMap(false);

Modified: branches/v14_4/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java 
2016-02-04 02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java 
2016-02-04 15:01:39 UTC (rev 20944)
@@ -354,20 +354,20 @@
           jvxlData.moleculeXml = vwr.getModelCml(
               vwr.getModelUndeletedAtomsBitSet(thisMesh.modelIndex), 100, 
true, false);
           if (!haveHeader) {
-            str.append(JvxlCoder.jvxlGetFile(jvxlData, null, null,
-                "HEADERONLY", true, nTotal, null, null));
+            str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null,
+                null, "HEADERONLY", true, nTotal, null, null));
             haveHeader = true;
           }
-          str.append(JvxlCoder.jvxlGetFile(jvxlData, null, jvxlData.title,
-              null, false, 1, thisMesh.getState(myType),
-              (thisMesh.scriptCommand == null ? "" : thisMesh.scriptCommand)));
+          str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null,
+              jvxlData.title, null, false, 1,
+              thisMesh.getState(myType), (thisMesh.scriptCommand == null ? "" 
: thisMesh.scriptCommand)));
           if (!doOneMo)
             setPropI("delete", "mo_show", null);
           if (nTotal == 1)
             break;
         }
-      str.append(JvxlCoder.jvxlGetFile(jvxlData, null, null, "TRAILERONLY",
-          true, 0, null, null));
+      str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null, null,
+          "TRAILERONLY", true, 0, null, null));
       return str.toString();
     }
     return getPropI(propertyName, index);

Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties     2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties     2016-02-04 
15:01:39 UTC (rev 20944)
@@ -7,8 +7,40 @@
 
 # see also http://chemapps.stolaf.edu/jmol/zip for daily updates
        
-Jmol.___JmolVersion="14.4.2_2016.02.03"
+Jmol.___JmolVersion="14.4.2_2016.02.04"
 
+FEATURE NOTE: Prior to this version if the MO command was issued after use of 
+              rotateSelected, the orbitals were calculated improperly, because 
the
+              basis functions always must be applied for the original file 
coordinate
+              frame, not the rotated frame. In addition, if MOs were 
calculated prior to
+              use of rotateSelected or translateSelected, then they would not 
"track"
+              with the modified atom positions. So MOs and 
rotate/translateSelected
+              were completely incompatible. Jmol 14.4.2 fixes this issue. It 
should be 
+              possible now to produce correct MOs before or after use of 
rotateSelected.
+              Note that ALL atoms in a specified model must be moved in order 
for this
+              tracking of MOs to take place. This functionality was introduced 
in 
+              14.4.1_2016.01.28, but that version (never released) does not 
properly 
+              check to see that ALL the atoms in a model have been involved in 
the rotation.  
+              
+FEATURE NOTE: If rotateSelected or translateSelected is used to move all atoms 
in a
+              model, and after that the state is saved, then Jmol 14.4.2 
+              will save a state that is not readable in 14.4.1. This is 
necessary
+              because of the added FRAME ORIENTATION command, which is used in 
the states
+              to indicate the relationship of a model to its file coordinates. 
The MO
+              reader requires this so that it can rotate the coordinates back 
to their 
+              original position prior to doing its calculation. 
+              
+bug fix: JVXL files saved from models that involve full model 
rotate/translateSelected
+         do not get restored properly.
+
+bug fix: molecular orbitals do not move with atoms 
+         when full molecule is moved using rotateSelected or translateSelected
+         
+code: better loading of surfaces -- no longer requires javajs.util.XmlUtil
+code: removal of unnecessary api interfaces MinimizerInterface, 
VolumeDataInterface, QuantumPlaneCalculationInterface, MOCalculationInterface, 
MepCalculationInterface
+
+JmolVersion="14.4.2_2016.02.03"
+
 bug fix: IboView/Molpro XML reader validated for multi-molecule XML files
  -- to concatenate Molpro XML files, you must supply a new root tag as well as
     remove all <?...?> directives.

Modified: branches/v14_4/Jmol/src/org/jmol/viewer/StateCreator.java
===================================================================
--- branches/v14_4/Jmol/src/org/jmol/viewer/StateCreator.java   2016-02-04 
02:30:08 UTC (rev 20943)
+++ branches/v14_4/Jmol/src/org/jmol/viewer/StateCreator.java   2016-02-04 
15:01:39 UTC (rev 20944)
@@ -304,11 +304,10 @@
     if (withProteinStructure)
       commands.append(ms.getProteinStructureState(null, isAll ? T.all : 
T.state));
 
-    // don't want to mess with 14.4 states here
-    if (JC.versionInt > 1405000)
-      for (int i = 0; i < modelCount; i++)
-        if (models[i].mat4 != null)
-          commands.append("  frame orientation " + ms.getModelNumberDotted(i) 
+ Escape.matrixToScript(models[i].mat4) + ";\n");
+    // introduced in 14.4.2
+    for (int i = 0; i < modelCount; i++)
+      if (models[i].mat4 != null)
+        commands.append("  frame orientation " + ms.getModelNumberDotted(i) + 
Escape.matrixToScript(models[i].mat4) + ";\n");
 
     getShapeState(commands, isAll, Integer.MAX_VALUE);
 

Modified: branches/v14_4/Jmol/srcjs/js/package.js
===================================================================
--- branches/v14_4/Jmol/srcjs/js/package.js     2016-02-04 02:30:08 UTC (rev 
20943)
+++ branches/v14_4/Jmol/srcjs/js/package.js     2016-02-04 15:01:39 UTC (rev 
20944)
@@ -112,7 +112,6 @@
        ]);
 
        ClazzLoader.jarClasspath (base + "coremin.z.js",        [
-               "J.api.MinimizerInterface", // -- required by 
J.minimize.Minimizer
                "JM.Minimizer",
                "$.MinObject", // -- required by $.MinAngle
                "$.MinAngle",
@@ -150,7 +149,6 @@
 
        ClazzLoader.jarClasspath (base + "coresurface.z.js",    [
                "JS.IsoExt",
-               "J.api.VolumeDataInterface",
                "J.jvxl.api.VertexDataServer",
                "$.MeshDataServer",
                "J.jvxl.calc.MarchingCubes",

Modified: trunk/Jmol/src/javajs/util/XmlUtil.java
===================================================================
--- trunk/Jmol/src/javajs/util/XmlUtil.java     2016-02-04 02:30:08 UTC (rev 
20943)
+++ trunk/Jmol/src/javajs/util/XmlUtil.java     2016-02-04 15:01:39 UTC (rev 
20944)
@@ -25,13 +25,15 @@
 
 package javajs.util;
 
+/**
+ * A very simplistic XML generator
+ */
+
 public class XmlUtil {
 
   public XmlUtil() {
-    // Jmol's PropertyManager class uses reflection 
+    // Jmol's PropertyManager and JvxlCoder classes use reflection 
   }
-  // / simple Xml parser/generator ///
-
   public static void openDocument(SB data) {
     data.append("<?xml version=\"1.0\"?>\n");
   }
@@ -96,15 +98,6 @@
   }
   
   /**
-   * @param s
-   * @return   unwrapped text
-   */
-  public static String unwrapCdata(String s) {
-    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
-        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
-  }
-  
-  /**
    * standard <name attr="..." attr="...">data</name>"
    * 
    * @param sb
@@ -162,4 +155,14 @@
     sb.append(" ").appendO(name).append("=\"").appendO(value).append("\"");
   }
 
+//  /**
+//   * @param s
+//   * @return   unwrapped text
+//   */
+//  public static String unwrapCdata(String s) {
+//    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
+//        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
+//  }
+//  
+
 }

Modified: trunk/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java    2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java    2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -25,6 +25,7 @@
 
 
 
+import javajs.J2SIgnoreImport;
 import javajs.util.Lst;
 import javajs.util.P3;
 import javajs.util.PT;
@@ -34,13 +35,16 @@
 
 import java.util.Map;
 
+import org.jmol.api.Interface;
 import org.jmol.java.BS;
 import org.jmol.util.BSUtil;
 import org.jmol.util.C;
 import org.jmol.util.Escape;
 import org.jmol.util.Logger;
+import org.jmol.viewer.Viewer;
 
 
+@J2SIgnoreImport({ javajs.util.XmlUtil.class })
 public class JvxlCoder {
 
   //TODO -- need to escapeXml for text data
@@ -57,6 +61,14 @@
   // 2.2 adds color density Jmol 12.0.15/12.1.13
   // 2.3 adds discrete colors for vertex-only data (encoding="none")
   
+  /**
+   * @j2sIgnore
+   * 
+   * @param volumeData
+   * @param jvxlData
+   * @param title
+   * @return XML string
+   */
   public static String jvxlGetFile(VolumeData volumeData, JvxlData jvxlData,
                                    String[] title) {
     // for the simple writer
@@ -65,28 +77,35 @@
     jvxlData.nPointsY = counts[1];
     jvxlData.nPointsZ = counts[2];
     jvxlData.jvxlVolumeDataXml = volumeData.setVolumetricXml();
-    return jvxlGetFile(jvxlData, null, title, null, true, 1, null, null);
+    return jvxlGetFileVwr(null, jvxlData, null, title, null, true, 1, null, 
null);
   }
 
-  public static String jvxlGetFile(JvxlData jvxlData, MeshData meshData,
-                                   String[] title, String msg,
-                                   boolean includeHeader, int nSurfaces,
-                                   String state, String comment) {
-    return jvxlGetFileXml(jvxlData, meshData, title, msg, includeHeader, 
nSurfaces, state, comment);
+  private static boolean haveXMLUtil;
+  
+  /**
+   * 
+   * @param vwr  for JSmol initInterface
+   * @param jvxlData
+   * @param meshData
+   * @param title
+   * @param msg
+   * @param includeHeader
+   * @param nSurfaces
+   * @param state
+   * @param comment
+   * @return
+   */
+  public static String jvxlGetFileVwr(Viewer vwr, JvxlData jvxlData,
+                                   MeshData meshData, String[] title,
+                                   String msg, boolean includeHeader,
+                                   int nSurfaces, String state, String 
comment) {
+    if (!haveXMLUtil) {
+      // creating an instance prevents pre-loading by JavaScript
+      if (vwr.isJS)
+        Interface.getInterface("javajs.util.XmlUtil", vwr, "show");
+      haveXMLUtil = true;  
+    }
     
-    // version1 decomissioned because of jvxlExcluded[] performing so well
-    
-    //    if (meshData != null || jvxlData == null || jvxlData.asXml 
-    //      || jvxlData.vContours != null || jvxlData.contourValues != null
-    //      || jvxlData.jvxlExcluded[0] != null || jvxlData.jvxlExcluded[1] != 
null )
-    //  return jvxlGetFileXml(jvxlData, meshData, title, msg, includeHeader, 
nSurfaces, state, comment);
-    //return jvxlGetFileVersion1(jvxlData, meshData, title, msg, 
includeHeader, nSurfaces, state, comment);
-  }
-
-  private static String jvxlGetFileXml(JvxlData jvxlData, MeshData meshData,
-                                       String[] title, String msg,
-                                       boolean includeHeader, int nSurfaces,
-                                       String state, String comment) {
     SB data = new SB();
     if ("TRAILERONLY".equals(msg)) {
       XmlUtil.closeTag(data, "jvxlSurfaceSet");

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2016-02-04 
02:30:08 UTC (rev 20943)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2016-02-04 
15:01:39 UTC (rev 20944)
@@ -1120,10 +1120,19 @@
       meshDataServer.notifySurfaceMappingCompleted();
   }
   
+  /**
+   * only called from org.openscience.jvxl.Jvxl.main
+   * 
+   * @j2sIgnore
+   * 
+   * @param property
+   * @param index
+   * @return Object
+   */
   public Object getProperty(String property, int index) {
     if (property == "jvxlFileData")
-      return JvxlCoder.jvxlGetFile(jvxlData, null, params.title, "", true,
-          index, null, null); // for Jvxl.java
+      return JvxlCoder.jvxlGetFileVwr(null, jvxlData, null, params.title, "",
+          true, index, null, null); // for Jvxl.java
     if (property == "jvxlFileInfo")
       return JvxlCoder.jvxlGetInfo(jvxlData); // for Jvxl.java
     return null;

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/XmlReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/XmlReader.java 2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/XmlReader.java 2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -27,14 +27,13 @@
 
 import java.io.BufferedReader;
 
-import org.jmol.util.Escape;
-
+import javajs.util.P3;
 import javajs.util.PT;
 import javajs.util.SB;
-import javajs.util.P3;
-import javajs.util.XmlUtil;
 
+import org.jmol.util.Escape;
 
+
 public class XmlReader {
   
   // a relatively simple XML reader requiring "nice" line and tag format.
@@ -139,9 +138,18 @@
       return "";
     while (PT.isWhitespace(data.charAt(++pt1))) {
     }
-    return XmlUtil.unwrapCdata(data.substring(pt1, pt2));
+    return unwrapCdata(data.substring(pt1, pt2));
   }
 
+  /**
+   * @param s
+   * @return   unwrapped text
+   */
+  public static String unwrapCdata(String s) {
+    return (s.startsWith("<![CDATA[") && s.endsWith("]]>") ?
+        PT.rep(s.substring(9, s.length()-3),"]]]]><![CDATA[>", "]]>") : s);
+  }
+  
   public static String getXmlAttrib(String data, String what) {
     // TODO
     // presumes what = "xxxx"

Modified: trunk/Jmol/src/org/jmol/modelset/Model.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelset/Model.java 2016-02-04 02:30:08 UTC (rev 
20943)
+++ trunk/Jmol/src/org/jmol/modelset/Model.java 2016-02-04 15:01:39 UTC (rev 
20944)
@@ -82,6 +82,9 @@
    */
   public ModelSet ms;
 
+  /**
+   * mat4 tracks the rotation/translation of the full model using  
rotateSelected or translateSelected 
+   */
   public M4 mat4;
   
   public int modelIndex; // our 0-based reference
@@ -182,6 +185,22 @@
     return bsAtoms.cardinality() - bsAtomsDeleted.cardinality();
   }
 
+  private BS bsCheck;
+  
+  /**
+   * 
+   * @param bs
+   * @return true if all undeleted atom bits in this model are in bs
+   */
+  public boolean isContainedIn(BS bs) {
+    if (bsCheck == null)
+      bsCheck = new BS();
+    bsCheck.or(bs);
+    bsCheck.and(bsAtoms);
+    bsCheck.andNot(bsAtomsDeleted);
+    return (bsCheck.cardinality() == getTrueAtomCount());
+  }
+
   public void resetBoundCount() {
     bondCount = -1;
   }

Modified: trunk/Jmol/src/org/jmol/modelset/ModelSet.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelset/ModelSet.java      2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/modelset/ModelSet.java      2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -3625,9 +3625,11 @@
       sm.notifyAtomPositionsChanged(i, bs, mat);
       if (mat != null) {
         Model m = am[i];
-        if (m.mat4 == null)
-          m.mat4 = M4.newM4(null);
-        m.mat4.mul2(mat, m.mat4);
+        if (m.isContainedIn(bs)) {
+          if (m.mat4 == null)
+            m.mat4 = M4.newM4(null);
+          m.mat4.mul2(mat, m.mat4);
+        }
       }
     }
     averageAtomPoint = null;

Modified: trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java        2016-02-04 
02:30:08 UTC (rev 20943)
+++ trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java        2016-02-04 
15:01:39 UTC (rev 20944)
@@ -930,7 +930,7 @@
       SB sb = new SB();
       getMeshCommand(sb, thisMesh.index);
       thisMesh.setJvxlColorMap(true);
-      return JvxlCoder.jvxlGetFile(jvxlData, meshData, title, "", true, 1, 
sb.toString(), null);
+      return JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, meshData, title, "", 
true, 1, sb.toString(), null);
     }
     if (property == "jvxlFileInfo") {
       thisMesh.setJvxlColorMap(false);

Modified: trunk/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java  2016-02-04 
02:30:08 UTC (rev 20943)
+++ trunk/Jmol/src/org/jmol/shapesurface/MolecularOrbital.java  2016-02-04 
15:01:39 UTC (rev 20944)
@@ -354,20 +354,20 @@
           jvxlData.moleculeXml = vwr.getModelCml(
               vwr.getModelUndeletedAtomsBitSet(thisMesh.modelIndex), 100, 
true, false);
           if (!haveHeader) {
-            str.append(JvxlCoder.jvxlGetFile(jvxlData, null, null,
-                "HEADERONLY", true, nTotal, null, null));
+            str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null,
+                null, "HEADERONLY", true, nTotal, null, null));
             haveHeader = true;
           }
-          str.append(JvxlCoder.jvxlGetFile(jvxlData, null, jvxlData.title,
-              null, false, 1, thisMesh.getState(myType),
-              (thisMesh.scriptCommand == null ? "" : thisMesh.scriptCommand)));
+          str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null,
+              jvxlData.title, null, false, 1,
+              thisMesh.getState(myType), (thisMesh.scriptCommand == null ? "" 
: thisMesh.scriptCommand)));
           if (!doOneMo)
             setPropI("delete", "mo_show", null);
           if (nTotal == 1)
             break;
         }
-      str.append(JvxlCoder.jvxlGetFile(jvxlData, null, null, "TRAILERONLY",
-          true, 0, null, null));
+      str.append(JvxlCoder.jvxlGetFileVwr(vwr, jvxlData, null, null,
+          "TRAILERONLY", true, 0, null, null));
       return str.toString();
     }
     return getPropI(propertyName, index);

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -64,8 +64,40 @@
 
 TODO: isosurface molecular has an issue with 2gb1
 
-Jmol.___JmolVersion="14.5.2_2016.02.03"
+Jmol.___JmolVersion="14.5.2_2016.02.04"
 
+FEATURE NOTE: Prior to this version if the MO command was issued after use of 
+              rotateSelected, the orbitals were calculated improperly, because 
the
+              basis functions always must be applied for the original file 
coordinate
+              frame, not the rotated frame. In addition, if MOs were 
calculated prior to
+              use of rotateSelected or translateSelected, then they would not 
"track"
+              with the modified atom positions. So MOs and 
rotate/translateSelected
+              were completely incompatible. Jmol 14.4.2 fixes this issue. It 
should be 
+              possible now to produce correct MOs before or after use of 
rotateSelected.
+              Note that ALL atoms in a specified model must be moved in order 
for this
+              tracking of MOs to take place. This functionality was introduced 
in 
+              14.4.1_2016.01.28, but that version (never released) does not 
properly 
+              check to see that ALL the atoms in a model have been involved in 
the rotation.  
+              
+FEATURE NOTE: If rotateSelected or translateSelected is used to move all atoms 
in a
+              model, and after that the state is saved, then Jmol 14.4.2 
+              will save a state that is not readable in 14.4.1. This is 
necessary
+              because of the added FRAME ORIENTATION command, which is used in 
the states
+              to indicate the relationship of a model to its file coordinates. 
The MO
+              reader requires this so that it can rotate the coordinates back 
to their 
+              original position prior to doing its calculation. 
+              
+bug fix: JVXL files saved from models that involve full model 
rotate/translateSelected
+         do not get restored properly.
+
+bug fix: molecular orbitals do not move with atoms 
+         when full molecule is moved using rotateSelected or translateSelected
+         
+code: better loading of surfaces -- no longer requires javajs.util.XmlUtil
+code: removal of unnecessary api interfaces MinimizerInterface, 
VolumeDataInterface, QuantumPlaneCalculationInterface, MOCalculationInterface, 
MepCalculationInterface
+
+JmolVersion="14.5.2_2016.02.03"
+
 bug fix: IboView/Molpro XML reader validated for multi-molecule XML files
  -- to concatenate Molpro XML files, you must supply a new root tag as well as
     remove all <?...?> directives.

Modified: trunk/Jmol/src/org/jmol/viewer/PropertyManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/PropertyManager.java 2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/viewer/PropertyManager.java 2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -2292,7 +2292,8 @@
     if (nAtoms == 0)
       return "";
     // creating an instance prevents pre-loading by JavaScript
-    Interface.getInterface("javajs.util.XmlUtil", vwr, "file");
+    if (vwr.isJS)
+      Interface.getInterface("javajs.util.XmlUtil", vwr, "file");
     XmlUtil.openTag(sb, "molecule");
     XmlUtil.openTag(sb, "atomArray");
     BS bsAtoms = new BS();

Modified: trunk/Jmol/src/org/jmol/viewer/StateCreator.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/StateCreator.java    2016-02-04 02:30:08 UTC 
(rev 20943)
+++ trunk/Jmol/src/org/jmol/viewer/StateCreator.java    2016-02-04 15:01:39 UTC 
(rev 20944)
@@ -233,8 +233,7 @@
   }
 
   @Override
-  String getModelState(SB sfunc, boolean isAll,
-                              boolean withProteinStructure) {
+  String getModelState(SB sfunc, boolean isAll, boolean withProteinStructure) {
     SB commands = new SB();
     if (isAll && sfunc != null) {
       sfunc.append("  _setModelState;\n");
@@ -262,22 +261,21 @@
       SB sb = new SB();
       for (int i = 0; i < ms.bondCount; i++)
         if (!models[bonds[i].atom1.mi].isModelKit)
-          if (bonds[i].isHydrogen()
-              || (bonds[i].order & Edge.BOND_NEW) != 0) {
+          if (bonds[i].isHydrogen() || (bonds[i].order & Edge.BOND_NEW) != 0) {
             Bond bond = bonds[i];
             int index = bond.atom1.i;
             if (bond.atom1.group.isAdded(index))
               index = -1 - index;
-            sb.appendI(index).appendC('\t').appendI(bond.atom2.i).appendC(
-                '\t').appendI(bond.order & ~Edge.BOND_NEW).appendC('\t')
-                .appendF(bond.mad / 1000f).appendC('\t').appendF(
-                    bond.getEnergy()).appendC('\t').append(
-                    Edge.getBondOrderNameFromOrder(bond.order)).append(
-                    ";\n");
+            sb.appendI(index).appendC('\t').appendI(bond.atom2.i).appendC('\t')
+                .appendI(bond.order & ~Edge.BOND_NEW).appendC('\t')
+                .appendF(bond.mad / 1000f).appendC('\t')
+                .appendF(bond.getEnergy()).appendC('\t')
+                .append(Edge.getBondOrderNameFromOrder(bond.order))
+                .append(";\n");
           }
       if (sb.length() > 0)
-        commands.append("data \"connect_atoms\"\n").appendSB(sb).append(
-            "end \"connect_atoms\";\n");
+        commands.append("data \"connect_atoms\"\n").appendSB(sb)
+            .append("end \"connect_atoms\";\n");
       commands.append("\n");
     }
 
@@ -302,13 +300,14 @@
     // unnecessary. Removed in 11.5.35 -- oops!
 
     if (withProteinStructure)
-      commands.append(ms.getProteinStructureState(null, isAll ? T.all : 
T.state));
+      commands.append(ms
+          .getProteinStructureState(null, isAll ? T.all : T.state));
 
-    // don't want to mess with 14.4 states here
-    if (JC.versionInt > 1405000)
-      for (int i = 0; i < modelCount; i++)
-        if (models[i].mat4 != null)
-          commands.append("  frame orientation " + ms.getModelNumberDotted(i) 
+ Escape.matrixToScript(models[i].mat4) + ";\n");
+    // introduced in 14.4.2
+    for (int i = 0; i < modelCount; i++)
+      if (models[i].mat4 != null)
+        commands.append("  frame orientation " + ms.getModelNumberDotted(i)
+            + Escape.matrixToScript(models[i].mat4) + ";\n");
 
     getShapeState(commands, isAll, Integer.MAX_VALUE);
 
@@ -320,33 +319,31 @@
           break;
         }
       SB sb = new SB();
-           for (int i = 0; i < modelCount; i++) {
+      for (int i = 0; i < modelCount; i++) {
         Model m = models[i];
         sb.setLength(0);
         String s = (String) ms.getInfo(i, "modelID");
-        if (s != null
-            && !s.equals(ms.getInfo(i, "modelID0")))
-          sb.append("  frame ID ").append(PT.esc(s))
-              .append(";\n");
+        if (s != null && !s.equals(ms.getInfo(i, "modelID0")))
+          sb.append("  frame ID ").append(PT.esc(s)).append(";\n");
         String t = ms.frameTitles[i];
         if (t != null && t.length() > 0)
-          sb.append("  frame title ").append(PT.esc(t))
-              .append(";\n");
+          sb.append("  frame title ").append(PT.esc(t)).append(";\n");
         if (needOrientations && m.orientation != null
             && !ms.isTrajectorySubFrame(i))
-          sb.append("  ").append(
-              m.orientation.getMoveToText(false)).append(";\n");
+          sb.append("  ").append(m.orientation.getMoveToText(false))
+              .append(";\n");
         if (m.frameDelay != 0 && !ms.isTrajectorySubFrame(i))
-          sb.append("  frame delay ").appendF(
-              m.frameDelay / 1000f).append(";\n");
+          sb.append("  frame delay ").appendF(m.frameDelay / 1000f)
+              .append(";\n");
         if (m.simpleCage != null) {
-          sb.append("  unitcell ").append(
-              Escape.eAP(m.simpleCage.getUnitCellVectors())).append(
-              ";\n");
+          sb.append("  unitcell ")
+              .append(Escape.eAP(m.simpleCage.getUnitCellVectors()))
+              .append(";\n");
           getShapeState(sb, isAll, JC.SHAPE_UCCAGE);
         }
         if (sb.length() > 0)
-          commands.append("  frame " + ms.getModelNumberDotted(i) + 
";\n").appendSB(sb);
+          commands.append("  frame " + ms.getModelNumberDotted(i) + ";\n")
+              .appendSB(sb);
       }
 
       boolean loadUC = false;
@@ -359,9 +356,8 @@
           sb.setLength(0);
           if (symmetry.getState(sb)) {
             loadUC = true;
-            commands.append("  frame ")
-              .append(ms.getModelNumberDotted(i))
-              .appendSB(sb).append(";\n");
+            commands.append("  frame ").append(ms.getModelNumberDotted(i))
+                .appendSB(sb).append(";\n");
           }
           haveModulation |= (vwr.ms.getLastVibrationVector(i, T.modulation) >= 
0);
         }
@@ -384,8 +380,8 @@
       }
       commands.append("  set fontScaling " + vwr.getBoolean(T.fontscaling)
           + ";\n");
-//      if (vwr.getBoolean(T.modelkitmode))
-  //      commands.append("  set modelKitMode true;\n");
+      //      if (vwr.getBoolean(T.modelkitmode))
+      //      commands.append("  set modelKitMode true;\n");
     }
     if (sfunc != null)
       commands.append("\n}\n\n");

Modified: trunk/Jmol/srcjs/js/package.js
===================================================================
--- trunk/Jmol/srcjs/js/package.js      2016-02-04 02:30:08 UTC (rev 20943)
+++ trunk/Jmol/srcjs/js/package.js      2016-02-04 15:01:39 UTC (rev 20944)
@@ -112,7 +112,6 @@
        ]);
 
        ClazzLoader.jarClasspath (base + "coremin.z.js",        [
-               "J.api.MinimizerInterface", // -- required by 
J.minimize.Minimizer
                "JM.Minimizer",
                "$.MinObject", // -- required by $.MinAngle
                "$.MinAngle",
@@ -150,7 +149,6 @@
 
        ClazzLoader.jarClasspath (base + "coresurface.z.js",    [
                "JS.IsoExt",
-               "J.api.VolumeDataInterface",
                "J.jvxl.api.VertexDataServer",
                "$.MeshDataServer",
                "J.jvxl.calc.MarchingCubes",

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


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to