Revision: 20857
          http://sourceforge.net/p/jmol/code/20857
Author:   hansonr
Date:     2015-11-03 12:36:49 +0000 (Tue, 03 Nov 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.5.0_2015.11.03"

bug fix: FOR without {} but with ";" after sole statement 
         followed immediately by second FOR improperly loops
  for (var i from [1,5])
    print i;
  for (var i from [1,5])
    print i
    
bug fix: OXT missing from BACKBONE selection

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/scriptext/MathExt.java
    trunk/Jmol/src/org/jmol/viewer/JC.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/scriptext/MathExt.java
===================================================================
--- trunk/Jmol/src/org/jmol/scriptext/MathExt.java      2015-11-03 12:34:41 UTC 
(rev 20856)
+++ trunk/Jmol/src/org/jmol/scriptext/MathExt.java      2015-11-03 12:36:49 UTC 
(rev 20857)
@@ -3167,7 +3167,8 @@
         plane = e.getHklPlane(pt);
       break;
     case T.varray:
-      pt = (last == 2 ? SV.ptValue(args[1]) : last == 1 ? P3.new3(Float.NaN, 
0, 0) : null);
+      pt = (last == 2 ? SV.ptValue(args[1]) : last == 1 ? P3.new3(Float.NaN, 0,
+          0) : null);
       if (pt == null)
         return false;
       break;
@@ -3194,12 +3195,12 @@
         CubeIterator iter;
         if (Float.isNaN(pt.x)) {
           // internal comparison
-          Point3fi  p;
-          Point3fi[] pt3 = new Point3fi[sv.size()]; 
+          Point3fi p;
+          Point3fi[] pt3 = new Point3fi[sv.size()];
           for (int i = pt3.length; --i >= 0;) {
             P3 p3 = SV.ptValue(sv.get(i));
             if (p3 == null)
-              return false; 
+              return false;
             p = new Point3fi();
             p.setT(p3);
             p.i = i;
@@ -3214,26 +3215,41 @@
             int n = 0;
             while (iter.hasMoreElements()) {
               Point3fi pt2 = (Point3fi) iter.nextElement();
-              if (bsp.get(pt2.i) && pt2.distanceSquared(p) <= d2
-                  && (++n > 1))
+              if (bsp.get(pt2.i) && pt2.distanceSquared(p) <= d2 && (++n > 1))
                 bsp.clear(pt2.i);
             }
           }
-          for (int i = bsp.nextSetBit(0); i >= 0; i = bsp.nextSetBit(i + 1))  
+          for (int i = bsp.nextSetBit(0); i >= 0; i = bsp.nextSetBit(i + 1))
             pts.addLast(P3.newP(pt3[i]));
           return mp.addXList(pts);
-        
+
         }
+        float d2;
+        if (distance == 0) {
+          // closest
+          P3 pt3 = null, pta;
+          d2 = Float.MAX_VALUE;
+          for (int i = sv.size(); --i >= 0;) {
+            pta = SV.ptValue(sv.get(i));
+            distance = pta.distanceSquared(pt);
+            if (distance < d2) {
+              pt3 = pta;
+              d2 = distance;
+            }
+          }
+          return (pt3 == null ? mp.addXStr("") : mp.addXPt(pt3));
+        }
         for (int i = sv.size(); --i >= 0;)
           bspt.addTuple(SV.ptValue(sv.get(i)));
         iter = bspt.allocateCubeIterator();
         iter.initialize(pt, distance, false);
-        float d2 = distance * distance;
+        d2 = distance * distance;
         while (iter.hasMoreElements()) {
           T3 pt2 = iter.nextElement();
           if (pt2.distanceSquared(pt) <= d2)
             pts.addLast(pt2);
         }
+        iter.release();
         return mp.addXList(pts);
       }
       return mp.addXBs(vwr.getAtomsNearPt(distance, pt));

Modified: trunk/Jmol/src/org/jmol/viewer/JC.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/JC.java      2015-11-03 12:34:41 UTC (rev 
20856)
+++ trunk/Jmol/src/org/jmol/viewer/JC.java      2015-11-03 12:36:49 UTC (rev 
20857)
@@ -622,7 +622,7 @@
     // structure related
     //
     "@alpha _a=2", // rasmol doc says "approximately *.CA" - whatever?
-    "@_bb protein&_a>=1&_a<6 | 
nucleic&(_a>=6&_a<14|_a>=73&&_a<=79||_a==99||_a=100)", // no H atoms    
+    "@_bb protein&(_a>=1&_a<6|_a=64) | 
nucleic&(_a>=6&_a<14|_a>=73&&_a<=79||_a==99||_a=100)", // no H atoms    
     "@backbone _bb | _H && connected(single, _bb)",    
     "@spine protein&_a>=1&_a<4|nucleic&(_a>=6&_a<11|_a=13)",
     "@sidechain (protein,nucleic) & !backbone",

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-11-03 12:34:41 UTC 
(rev 20856)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-11-03 12:36:49 UTC 
(rev 20857)
@@ -62,13 +62,24 @@
 
 TODO: consider if models with no atoms will cause issues in relation to 
model.firstAtomIndex
 
-Jmol.___JmolVersion="14.5.0_2015.11.01"
+Jmol.___JmolVersion="14.5.0_2015.11.03"
 
+bug fix: FOR without {} but with ";" after sole statement 
+         followed immediately by second FOR improperly loops
+  for (var i from [1,5])
+    print i;
+  for (var i from [1,5])
+    print i
+    
+bug fix: OXT missing from BACKBONE selection
+bug fix: (JSmol) CIF parser fails to read CIF files containing only a single 
(non-loop) _struct_ref_seq_dif.align_id
+
 new feature: polyhedra ID xxx SCALE x.x
   -- ID named polyhedra only
   -- x.x is the scaling factor, initially 1 
+  -- x.x > 0 does normal scaling
   -- x.x < 0 does "explode" from {0 0 0} (for higher-order Brillouin zones, 
for instance)
-  -- x.x > 0 does normal scaling
+
 bug fix: slabbing should reset area and volume of isosurface
 bug fix: meshSlicer may fail to add edge to sliced pmesh
  
@@ -242,7 +253,7 @@
     unitcell(uc) // copies unit cell
     unitcell(uc, "reciprocal") // reciprocal lattice for specified unit cell
     unitcell("reciprocal") // reciprocal lattice for current model's unit cell
-    unitcell(ucconv, "primitive","BCC"|"FCC") // convert primitive to 
conventional
+    unitcell(ucconv, "primitive","BCC"|"FCC") // convert conventional to 
primitive
     unitcell("primitive","BCC"|"FCC")
     unitcell(ucprim, "conventional","BCC"|"FCC")  // convert primitive to 
conventional
     unitcell("conventional","BCC"|"FCC")

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


------------------------------------------------------------------------------
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to