Revision: 18279
          http://sourceforge.net/p/jmol/code/18279
Author:   hansonr
Date:     2013-06-04 23:07:59 +0000 (Tue, 04 Jun 2013)
Log Message:
-----------
___JmolVersion="13.1.16_dev_2013.06.04"

bug fix: "display add" by itself should not do anything

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/adapter/readers/pymol/JmolObject.java
    trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java
    trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLScene.java
    trunk/Jmol/src/org/jmol/adapter/smarter/Bond.java
    trunk/Jmol/src/org/jmol/modelset/BondCollection.java
    trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java
    trunk/Jmol/src/org/jmol/script/T.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/adapter/readers/pymol/JmolObject.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/pymol/JmolObject.java       
2013-06-04 23:07:26 UTC (rev 18278)
+++ trunk/Jmol/src/org/jmol/adapter/readers/pymol/JmolObject.java       
2013-06-04 23:07:59 UTC (rev 18279)
@@ -126,22 +126,30 @@
   }
 
   @SuppressWarnings("unchecked")
-  void finalizeObject(ModelSet m, String mepList, boolean doCache) {
+  void finalizeObject(PyMOLScene pymolScene, ModelSet m, String mepList, 
boolean doCache) {
     ShapeManager sm = m.shapeManager;
     int modelIndex = getModelIndex(m);
     String sID;
     SB sb = null;
     switch (id) {
+    case T.hidden:
+      // bsHidden
+      sm.viewer.displayAtoms(bsAtoms, false, false, T.add, true);
+      return;
+    case T.restrict:
+      sm.viewer.select(null, false, 0, true);
+      sm.restrictSelected(false, false);
+      return;
     case T.display:
     case T.hide:
       // from PyMOLScene after restore scene
       if (bsAtoms == null) {
         if (info == null) {
-          sm.viewer.displayAtoms(null, true, false, null, true);
+          sm.viewer.displayAtoms(null, true, false, 0, true);
         }
         sm.viewer.setObjectProp((String) info, id);
       } else {
-        sm.viewer.displayAtoms(bsAtoms, id == T.display, false, Boolean.TRUE,
+        sm.viewer.displayAtoms(bsAtoms, id == T.display, false, T.add,
             true);
       }
       return;
@@ -169,14 +177,21 @@
       sm.viewer.saveOrientation(objectNameID,
           (float[]) ((Map<String, Object>) info).get("pymolView"));
       return;
-    case T.hidden:
-      sm.viewer.displayAtoms(bsAtoms, false, false, Boolean.TRUE, true);
-      return;
     case JC.SHAPE_LABELS:
       sm.loadShape(id);
       sm.setShapePropertyBs(id, "textLabels", info, bsAtoms);
       return;
+    case T.bonds:
+      break;
+    case T.wireframe:
     case JC.SHAPE_STICKS:
+      if (size != -1) {
+        sm.setShapeSizeBs(JC.SHAPE_STICKS, size, null, bsAtoms);
+        
pymolScene.setUniqueBonds(((BS[])sm.getShapePropertyIndex(JC.SHAPE_STICKS, 
"sets", 0))[1], id == JC.SHAPE_STICKS);
+        size = -1;
+      }
+      id = JC.SHAPE_STICKS;
+      break;
     case JC.SHAPE_BALLS:
       break;
     case JC.SHAPE_TRACE:
@@ -197,10 +212,6 @@
     }
 
     switch (id) {
-    case T.restrict:
-      sm.viewer.select(null, false, null, true);
-      sm.restrictSelected(false, false);
-      return;
     case JC.SHAPE_MEASURES:
       if (modelIndex < 0)
         return;

Modified: trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java      
2013-06-04 23:07:26 UTC (rev 18278)
+++ trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java      
2013-06-04 23:07:59 UTC (rev 18279)
@@ -40,8 +40,6 @@
 import org.jmol.util.BoxInfo;
 import org.jmol.util.BS;
 import org.jmol.util.BSUtil;
-import org.jmol.util.C;
-//import org.jmol.util.Dimension;
 import org.jmol.util.Logger;
 import org.jmol.util.P3;
 import org.jmol.util.TextFormat;
@@ -72,7 +70,7 @@
  * 3) JmolObjects are finalized after file reading takes place by a call from 
ModelLoader
  *    back here to finalizeModelSet(), which runs PyMOLScene.setObjects, which 
runs JmolObject.finalizeObject.
  * 
- * 
+ *  TODO: Handle discrete objects, DiscreteAtmToIdx? 
  *     
  * @author Bob Hanson hans...@stolaf.edu
  * 
@@ -136,6 +134,8 @@
 
   private JmolList<Object> sceneOrder;
 
+  private int bondCount;
+
   @Override
   protected void initializeReader() throws Exception {
     isBinary = true;
@@ -178,8 +178,7 @@
   @Override
   public void finalizeModelSet(int baseModelIndex, int baseAtomIndex) {
 
-    pymolScene.setObjects(mepList, doCache, baseModelIndex, baseAtomIndex,
-        haveScenes);
+    pymolScene.setObjects(mepList, doCache, baseModelIndex, baseAtomIndex);
     
     if (haveMeasurements) {
       appendLoadNote(viewer.getMeasurementInfoAsString());
@@ -235,7 +234,7 @@
     //atomSetCollection.setAtomSetCollectionAuxiliaryInfo("settings", 
settings);
     setUniqueSettings(getMapList(map, "unique_settings"));
     pymolScene = new PyMOLScene(this, viewer, settings, uniqueSettings, 
-        pymolVersion);
+        pymolVersion, haveScenes);
 
     // just log and display some information here
 
@@ -399,14 +398,18 @@
    * This will be used later in processing molecule objects.
    * 
    * @param list
+   * @return max id
    */
   @SuppressWarnings("unchecked")
-  private void setUniqueSettings(JmolList<Object> list) {
+  private int setUniqueSettings(JmolList<Object> list) {
     uniqueSettings = new Hashtable<Integer, JmolList<Object>>();
+    int max = 0;
     if (list != null && list.size() != 0) {
       for (int i = list.size(); --i >= 0;) {
         JmolList<Object> atomSettings = (JmolList<Object>) list.get(i);
         int id = intAt(atomSettings, 0);
+        if (id > max)
+          max = id;
         JmolList<Object> mySettings = (JmolList<Object>) atomSettings.get(1);
         for (int j = mySettings.size(); --j >= 0;) {
           JmolList<Object> setting = (JmolList<Object>) mySettings.get(j);
@@ -416,6 +419,7 @@
         }
       }
     }
+    return max;
   }
 
   /**
@@ -856,9 +860,6 @@
    */
   private JmolList<Bond> getBondList(JmolList<Object> bonds) {
     JmolList<Bond> bondList = new JmolList<Bond>();
-    int color = (int) pymolScene.floatSetting(PyMOL.stick_color);
-    float radius = pymolScene.floatSetting(PyMOL.stick_radius);
-    float translucency = pymolScene.floatSetting(PyMOL.stick_transparency);
     boolean valence = pymolScene.booleanSetting(PyMOL.valence);
     int n = bonds.size();
     for (int i = 0; i < n; i++) {
@@ -866,29 +867,11 @@
       int order = (valence ? intAt(b, 2) : 1);
       if (order < 1 || order > 3)
         order = 1;
-      // TODO: hydrogen bonds?
       int ia = intAt(b, 0);
       int ib = intAt(b, 1);
       Bond bond = new Bond(ia, ib, order);
+      bond.uniqueID = (b.size() > 6 && intAt(b, 6) != 0 ? intAt(b, 5) : -1);
       bondList.addLast(bond);
-      int c;
-      float rad, t;
-      boolean hasID = (b.size() > 6 && intAt(b, 6) != 0);
-      if (hasID) {
-        int id = intAt(b, 5);
-        rad = pymolScene.getUniqueFloatDef(id, PyMOL.stick_radius, radius);
-        c = (int) pymolScene.getUniqueFloatDef(id, PyMOL.stick_color, color);
-        t = pymolScene.getUniqueFloatDef(id, PyMOL.stick_transparency, 
translucency);
-      } else {
-        rad = radius;
-        c = color;
-        t = translucency;
-      }
-      // I think rad is being ignored, because later we set it with a script
-      bond.radius = rad;
-      if (c >= 0)
-        bond.colix = C.getColixTranslucent3(C.getColix(PyMOL.getRGB(c)), t > 0,
-            t);
     }
     return bondList;
   }
@@ -1027,6 +1010,8 @@
       float[] data = PyMOLScene.floatsAt(a, 41, new float[7], 6);
       atomSetCollection.setAnisoBorU(atom, data, 12);
     }
+    //if (uniqueID > 0)
+      //pymolScene.setUnique(uniqueID, atom);
     pymolScene.setAtomColor(uniqueID, atomColor);
     processAtom2(atom, serNo, x, y, z, formalCharge);
 
@@ -1060,8 +1045,10 @@
       Bond bond = bonds.get(i);
       bond.atomIndex1 = atomMap[bond.atomIndex1];
       bond.atomIndex2 = atomMap[bond.atomIndex2];
-      if (bond.atomIndex1 >= 0 && bond.atomIndex2 >= 0)
-        atomSetCollection.addBond(bond);
+      if (bond.atomIndex1 < 0 || bond.atomIndex2 < 0)
+        continue;
+      pymolScene.setUniqueBond(bondCount++, bond.uniqueID);
+      atomSetCollection.addBond(bond);
     }
   }
 

Modified: trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLScene.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLScene.java       
2013-06-04 23:07:26 UTC (rev 18278)
+++ trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLScene.java       
2013-06-04 23:07:59 UTC (rev 18279)
@@ -78,7 +78,6 @@
     htStateSettings = null;
     objectInfo = null;
     settings = null;
-    uniqueSettings = null;
     occludedObjects = null;
     htHiddenObjects = null;
     bsHidden = bsNucleic = bsNonbonded = bsLabeled = bsHydrogen = bsNoSurface 
= bsCartoon = null;
@@ -102,7 +101,18 @@
   private Map<String, Map<Integer, JmolList<Object>>> htStateSettings = new 
Hashtable<String, Map<Integer, JmolList<Object>>>();
   private Map<Integer, JmolList<Object>>  stateSettings;
   private Map<Integer, JmolList<Object>> uniqueSettings;
-
+  private Map<Integer, Integer> uniqueList;
+  private BS bsUniqueBonds;
+  void setUniqueBond(int index, int uniqueID) {
+    if (uniqueID < 0)
+      return;
+    if (uniqueList == null) {
+      uniqueList = new Hashtable<Integer, Integer>();
+      bsUniqueBonds = new BS();
+    }
+    uniqueList.put(Integer.valueOf(index), Integer.valueOf(uniqueID));
+    bsUniqueBonds.set(index);
+  }
   private int bgRgb;
   private int surfaceMode;
   private int surfaceColor;
@@ -144,8 +154,12 @@
 
   private boolean doCache;
   private boolean haveScenes;
+  
   private BS bsCarve;
   private boolean solventAccessible;
+  private BS bsLineBonds = new BS();
+  private BS bsStickBonds = new BS();
+  private int thisState;
 
   void setStateCount(int stateCount) {
     this.stateCount = stateCount;
@@ -153,12 +167,13 @@
 
   @SuppressWarnings("unchecked")
   PyMOLScene(PymolAtomReader reader, Viewer viewer, JmolList<Object> settings,
-      Map<Integer, JmolList<Object>> uniqueSettings, int pymolVersion) {
+      Map<Integer, JmolList<Object>> uniqueSettings, int pymolVersion, boolean 
haveScenes) {
     this.reader = reader;
     this.viewer = viewer;
     this.settings = settings;
     this.uniqueSettings = uniqueSettings;
     this.pymolVersion = pymolVersion;
+    this.haveScenes = haveScenes;
     setVersionSettings();
     bgRgb = colorSetting(listAt(settings, PyMOL.bg_rgb));
     pointAt((JmolList<Object>) listAt(settings, PyMOL.label_position).get(2),
@@ -261,6 +276,9 @@
   void buildScene(String name, JmolList<Object> thisScene,
                   Map<String, JmolList<Object>> htObjNames,
                   Map<String, JmolList<Object>> htSecrets) {
+    Object frame = thisScene.get(2);
+    if (frame == null)
+      return; // must have frame defined; ignore other scenes
 
     // generator : this
     // name : scene name
@@ -271,12 +289,10 @@
     // colors: [colorIndex, object list]
     // 
     Map<String, Object> smap = new Hashtable<String, Object>();
+    smap.put("pymolFrame", frame);
     smap.put("generator", this);
     smap.put("name", name);
     JmolList<Object> view = listAt(thisScene, 0);
-    Object frame = thisScene.get(2);
-    if (frame != null)
-      smap.put("pymolFrame", frame);
     if (view != null)
       smap.put("pymolView", getPymolView(view, false));
 
@@ -332,14 +348,12 @@
     occludedObjects.clear();
     htHiddenObjects.clear();
     Integer frame = (Integer) scene.get("pymolFrame");
-    if (frame != null)
-      addJmolObject(T.frame, null, Integer.valueOf(frame.intValue() - 1));
+    thisState  = frame.intValue();
+    addJmolObject(T.frame, null, Integer.valueOf(thisState - 1));
     try {
-      int istate = (frame == null ? 0 : frame.intValue());
-      generateVisibilities((Map<String, Object>) scene.get("visibilities"),
-          istate);
-      generateColors((Object[]) scene.get("colors"), istate);
-      generateShapes((Object[]) scene.get("moleculeReps"), istate);
+      generateVisibilities((Map<String, Object>) scene.get("visibilities"));
+      generateColors((Object[]) scene.get("colors"));
+      generateShapes((Object[]) scene.get("moleculeReps"));
       finalizeEverything();
       finalizeObjects();
     } catch (Exception e) {
@@ -349,7 +363,7 @@
   }
 
   @SuppressWarnings("unchecked")
-  private void generateColors(Object[] colors, int istate) {
+  private void generateColors(Object[] colors) {
     if (colors == null)
       return;
     // note that colors are for ALL STATES
@@ -358,7 +372,7 @@
       int color = ((Integer) item[0]).intValue();
       int icolor = PyMOL.getRGB(color);
       JmolList<Object> molecules = (JmolList<Object>) item[1];
-      BS bs = getSelectionAtoms(molecules, istate, new BS());
+      BS bs = getSelectionAtoms(molecules, thisState, new BS());
       addJmolObject(JC.SHAPE_BALLS, bs, null).argb = icolor;
     }
   }
@@ -385,7 +399,7 @@
   }
 
   @SuppressWarnings("unchecked")
-  private void generateVisibilities(Map<String, Object> vis, int istate) {
+  private void generateVisibilities(Map<String, Object> vis) {
     if (vis == null)
       return;
     BS bs = new BS();
@@ -413,7 +427,7 @@
       String name = e.getKey();
       if (name.equals("all"))
         continue;
-      setObject(name, istate);
+      setObject(name, thisState);
       if (objectHidden)
         continue;
       JmolList<Object> list = (JmolList<Object>) e.getValue();
@@ -464,14 +478,14 @@
   }
 
   @SuppressWarnings("unchecked")
-  private void generateShapes(Object[] reps, int istate) {
+  private void generateShapes(Object[] reps) {
     if (reps == null)
       return;
-    addJmolObject(T.restrict, null, null);
+    addJmolObject(T.restrict, null, null).argb = thisState - 1;
     // through all molecules...
     //    for (int m = moleculeNames.size(); --m >= 0;) {
     for (int m = 0; m < moleculeNames.size(); m++) {
-      setObject(moleculeNames.get(m), istate);
+      setObject(moleculeNames.get(m), thisState);
       getObjectSettings();
       if (objectHidden)
         continue;
@@ -483,7 +497,7 @@
         Map<String, JmolList<Object>> repMap = (Map<String, JmolList<Object>>) 
reps[i];
         JmolList<Object> list = (repMap == null ? null : 
repMap.get(objectName));
         if (list != null)
-          selectAllAtoms(list, istate, molReps[i]);
+          selectAllAtoms(list, thisState, molReps[i]);
       }
       createShapeObjects(molReps, true, -1, -1);
     }
@@ -518,14 +532,17 @@
   }
 
   void setObjects(String mepList, boolean doCache, int baseModelIndex,
-                  int baseAtomIndex, boolean haveScenes) {
+                  int baseAtomIndex) {
     this.baseModelIndex = baseModelIndex;
     this.baseAtomIndex = baseAtomIndex;
     this.mepList = mepList;
     this.doCache = doCache;
-    this.haveScenes = haveScenes;
     clearReaderData(!haveScenes);
     finalizeObjects();
+    if (!haveScenes) {
+      uniqueSettings = null;
+      bsUniqueBonds = bsStickBonds = bsLineBonds = null;
+    }
   }
 
   private void finalizeObjects() {
@@ -533,12 +550,13 @@
       try {
         JmolObject obj = jmolObjects.get(i);
         obj.offset(baseModelIndex, baseAtomIndex);
-        obj.finalizeObject(viewer.modelSet, mepList, doCache);
+        obj.finalizeObject(this, viewer.modelSet, mepList, doCache);
       } catch (Exception e) {
         System.out.println(e);
         e.printStackTrace();
       }
     }
+    finalizeUniqueBonds();
     jmolObjects.clear();
   }
 
@@ -981,7 +999,7 @@
     }
     if (frameObj == null)
       return;
-    frameObj.finalizeObject(viewer.getModelSet(), null, false);
+    frameObj.finalizeObject(this, viewer.getModelSet(), null, false);
     frameObj = null;
   }
 
@@ -1312,13 +1330,19 @@
       createRibbonObject(bs);
       break;
     case PyMOL.REP_LINES:
-      jo = addJmolObject(JC.SHAPE_STICKS, bs, null);
+      jo = addJmolObject(T.wireframe, bs, null);
       jo.setSize(floatSetting(PyMOL.line_width) / 15);
+      int  color = (int) floatSetting(PyMOL.line_color);
+      if (color >= 0)
+        jo.argb = PyMOL.getRGB(color);
       break;
     case PyMOL.REP_STICKS:
       jo = addJmolObject(JC.SHAPE_STICKS, bs, null);
       jo.setSize(floatSetting(PyMOL.stick_radius) * 2);
       jo.translucency = stickTranslucency;
+      int  col = (int) floatSetting(PyMOL.stick_color);
+      if (col >= 0)
+        jo.argb = PyMOL.getRGB(col);
       break;
     default:
       Logger.error("Unprocessed representation type " + shapeID);
@@ -1521,4 +1545,33 @@
     return haveScenes || !htCarveSets.isEmpty();
   }
 
+  public void setUniqueBonds(BS bsBonds, boolean isSticks) {
+    if (isSticks) {
+      bsStickBonds.or(bsBonds);
+      bsStickBonds.andNot(bsLineBonds);
+    } else {
+      bsLineBonds.or(bsBonds);
+      bsLineBonds.andNot(bsStickBonds);
+    }
+  }
+
+  private void finalizeUniqueBonds() {
+    if (uniqueList == null)
+      return;    
+    for (int i = bsUniqueBonds.nextSetBit(0); i >= 0; i = 
bsUniqueBonds.nextSetBit(i + 1)) {
+      float rad = Float.NaN;
+      int id = uniqueList.get(Integer.valueOf(i)).intValue();
+      if (bsLineBonds.get(i)) {
+        rad = getUniqueFloatDef(id, PyMOL.line_width, Float.NaN) / 30;
+      } else if (bsStickBonds.get(i)) {
+        rad = getUniqueFloatDef(id, PyMOL.stick_radius, Float.NaN);
+      }
+      int c = (int) getUniqueFloatDef(id, PyMOL.stick_color, 
Integer.MAX_VALUE);
+      if (c != Integer.MAX_VALUE)
+        c =  PyMOL.getRGB(c);
+      float t = getUniqueFloatDef(id, PyMOL.stick_transparency, Float.NaN);
+      viewer.setBondParameters(thisState - 1, i, rad, c, t);
+   }
+  }
+
 }

Modified: trunk/Jmol/src/org/jmol/adapter/smarter/Bond.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/smarter/Bond.java   2013-06-04 23:07:26 UTC 
(rev 18278)
+++ trunk/Jmol/src/org/jmol/adapter/smarter/Bond.java   2013-06-04 23:07:59 UTC 
(rev 18279)
@@ -29,6 +29,7 @@
   public int order;
   public float radius = -1;
   public short colix = -1;
+  public int uniqueID = -1;
 
   public Bond (int atomIndex1, int atomIndex2, int order) {
     this.atomIndex1 = atomIndex1;

Modified: trunk/Jmol/src/org/jmol/modelset/BondCollection.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelset/BondCollection.java        2013-06-04 
23:07:26 UTC (rev 18278)
+++ trunk/Jmol/src/org/jmol/modelset/BondCollection.java        2013-06-04 
23:07:59 UTC (rev 18279)
@@ -30,6 +30,7 @@
 import org.jmol.util.ArrayUtil;
 import org.jmol.util.BS;
 import org.jmol.util.BSUtil;
+import org.jmol.util.C;
 import org.jmol.util.JmolEdge;
 import org.jmol.util.JmolMolecule;
 import org.jmol.util.Logger;
@@ -847,5 +848,31 @@
         bonds[i].setShapeVisibility(isDisplay);
   }
 
+  /**
+   * used in PyMOL reader to set unique bond settings
+   * @param modelIndex
+   * @param i
+   * @param rad
+   * @param argb
+   * @param trans
+   */
+  public void setBondParameters(int modelIndex, int i, float rad, int argb, 
float trans) {
+    if (i < 0 || i >= bondCount)
+      return;
+    Bond b = bonds[i];
+    if (modelIndex >= 0 && b.atom1.modelIndex != modelIndex)
+      return; 
+    if (!Float.isNaN(rad))
+      b.mad = (short) (rad * 2000);
+    short colix = b.colix;
+    if (argb != Integer.MAX_VALUE)
+      colix = C.getColix(argb);
+    if (!Float.isNaN(trans))
+      b.colix = C.getColixTranslucent3(colix, trans != 0, trans);
+    else if (b.colix != colix)
+      b.colix = C.copyColixTranslucency(b.colix, colix);
+  }
+
+
 }
 

Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2013-06-04 23:07:26 UTC 
(rev 18278)
+++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2013-06-04 23:07:59 UTC 
(rev 18279)
@@ -11003,13 +11003,13 @@
 
   private void display(boolean isDisplay) throws ScriptException {
     BS bs = null;
-    Boolean addRemove = null;
+    int addRemove = 0;
     int i = 1;
     int tok;
     switch (tok = tokAt(1)) {
     case T.add:
     case T.remove:
-      addRemove = Boolean.valueOf(tok == T.add);
+      addRemove = tok;
       tok = tokAt(++i);
       break;
     }
@@ -11144,7 +11144,7 @@
   private void select(int i) throws ScriptException {
     // NOTE this is called by restrict()
     if (slen == 1) {
-      viewer.select(null, false, null, tQuiet
+      viewer.select(null, false, 0, tQuiet
           || scriptLevel > scriptReportingLevel);
       return;
     }
@@ -11171,8 +11171,8 @@
       }
       error(ERROR_invalidArgument);
     }
-    BS bs = null;
-    Boolean addRemove = null;
+    BS bs;
+    int addRemove = 0;
     boolean isGroup = false;
     if (getToken(1).intValue == 0) {
       Object v = parameterExpressionToken(0).value;
@@ -11185,7 +11185,7 @@
       switch (tok) {
       case T.add:
       case T.remove:
-        addRemove = Boolean.valueOf(tok == T.add);
+        addRemove = tok;
         tok = tokAt(++i);
       }
       isGroup = (tok == T.group);
@@ -11321,7 +11321,7 @@
     boolean isQuiet = (tQuiet || scriptLevel > scriptReportingLevel);
     if (!isQuiet)
       scriptStatusOrBuffer(GT._("{0} atoms deleted", nDeleted));
-    viewer.select(null, false, null, isQuiet);
+    viewer.select(null, false, 0, isQuiet);
   }
 
   private void zoom(boolean isZoomTo) throws ScriptException {
@@ -12000,7 +12000,7 @@
         .valueOf(JmolEdge.BOND_HYDROGEN_MASK));
     setShapeSizeBs(JC.SHAPE_STICKS, 0, bsAtoms);
     viewer.autoHbond(bsAtoms, bsAtoms, true);
-    viewer.select(bsAtoms, false, null, tQuiet);
+    viewer.select(bsAtoms, false, 0, tQuiet);
   }
 
   private void vector() throws ScriptException {

Modified: trunk/Jmol/src/org/jmol/script/T.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/T.java       2013-06-04 23:07:26 UTC (rev 
18278)
+++ trunk/Jmol/src/org/jmol/script/T.java       2013-06-04 23:07:59 UTC (rev 
18279)
@@ -264,7 +264,7 @@
 
   final static int print        = 1 | mathExpressionCommand;
   final static int returncmd    = 2 | mathExpressionCommand;
-  final static int set          = 3 | mathExpressionCommand | expression;
+  public final static int set          = 3 | mathExpressionCommand | 
expression;
   final static int var          = 4 | mathExpressionCommand;
   final static int log          = 5 | mathExpressionCommand;
   //final static int prompt     see mathfunc
@@ -743,7 +743,7 @@
   //     distance(a,b)
   //so it can be a math property and it can have up to two parameters
   
-  final static int add          = 1 | 2 << 9 | mathfunc | mathproperty;
+  public final static int add          = 1 | 2 << 9 | mathfunc | mathproperty;
   public final static int distance     = 2 | 2 << 9 | mathfunc | mathproperty;
   final static int find         = 4 | 3 << 9 | mathfunc | mathproperty;
   final static int replace      = 3 | 2 << 9 | mathfunc | mathproperty;
@@ -1241,7 +1241,7 @@
   public final static int range   = misc  | 290;
   public final static int rasmol  = misc  | 292;
   final static int reference      = misc  | 294;
-  final static int remove         = misc  | 295;
+  public final static int remove         = misc  | 295;
   public final static int residue = misc  | 296;
   final static int resolution     = misc  | 298;
   final static int reversecolor   = misc  | 300;

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-04 23:07:26 UTC 
(rev 18278)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-04 23:07:59 UTC 
(rev 18279)
@@ -9,8 +9,9 @@
 #  The quotes above look odd for a parameter file, but they are 
 #  important for the JavaScript version of Jmol.
 
-___JmolVersion="13.1.16_dev_2013.06.01"
+___JmolVersion="13.1.16_dev_2013.06.04"
 
+bug fix: "display add" by itself should not do anything
 bug fix: Hall translation initialization problem
 bug fix: JavaScript reading of old-style JVXL files
 

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


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to