Revision: 21628
          http://sourceforge.net/p/jmol/code/21628
Author:   hansonr
Date:     2017-06-04 02:57:04 +0000 (Sun, 04 Jun 2017)
Log Message:
-----------
Jmol.___JmolVersion="14.17.2"

bug fix: WRITE FILE not working when file has been cached.
bug fix: array.find("regex...","") does not reset RegExp each time it runs 
RegExp.exec() so does not find all possibilities

Modified Paths:
--------------
    trunk/Jmol/src/javajs/util/OC.java
    trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/javajs/util/OC.java
===================================================================
--- trunk/Jmol/src/javajs/util/OC.java  2017-05-31 03:16:55 UTC (rev 21627)
+++ trunk/Jmol/src/javajs/util/OC.java  2017-06-04 02:57:04 UTC (rev 21628)
@@ -217,6 +217,8 @@
   public void write(byte[] buf, int i, int len) {
     if (os == null)
       initOS();
+    if (len < 0)
+      len = buf.length - i;
     try {
       os.write(buf, i, len);
     } catch (IOException e) {

Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-05-31 03:16:55 UTC 
(rev 21627)
+++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-06-04 02:57:04 UTC 
(rev 21628)
@@ -1486,7 +1486,8 @@
       if (Logger.debugging) {
         if (sphere < MAX_PATH) // Logger
           myPath = (parent != null ? parent.myPath + "-" : "") + this; // 
Logger
-        Logger.info("new CIPAtom " + myPath);
+        if (Logger.debuggingHigh)
+          Logger.info("new CIPAtom " + myPath);
       }
       return this;
     }
@@ -1681,7 +1682,7 @@
         priorities[i] = 0;
       }
 
-      if (Logger.debugging) {
+      if (Logger.debuggingHigh) {
         Logger.info(root + "---sortSubstituents---" + this);
         for (int i = 0; i < 4; i++) { // Logger
           Logger.info(getRuleName() + ": " + this + "[" + i + "]="
@@ -1816,7 +1817,7 @@
           break;
         }
       }
-      if ((Logger.debugging) && atoms[2].atom != null && atoms[2].elemNo != 1) 
{
+      if ((Logger.debuggingHigh) && atoms[2].atom != null && atoms[2].elemNo 
!= 1) {
         Logger.info(dots() + atom + " nPriorities = " + nPriorities);
         for (int i = 0; i < 4; i++) { // Logger
           Logger.info(dots() + myPath + "[" + i + "]=" + atoms[i] + " "
@@ -1986,20 +1987,20 @@
       int finalScore = (nAtoms == 0 ? B_WINS : TIED), absScore = 
Integer.MAX_VALUE;
       for (int i = 0; i < nAtoms; i++) {
         CIPAtom ai = atoms[i], bi = b.atoms[i];
-        if (Logger.debugging && ai.isHeavy() && bi.isHeavy())
+        if (Logger.debuggingHigh && ai.isHeavy() && bi.isHeavy())
           Logger.info(ai.dots() + "compareDeep sub " + this + "." + ai + " " + 
b + "." + bi);
         int score = ai.breakTie(bi, sphere + 1);
         if (score == TIED)
           continue;
         int abs = Math.abs(score);
-        if (Logger.debugging && ai.isHeavy() && bi.isHeavy())
-          Logger.info(ai.dots() + "compareDeep sub " + ai + " " + bi + ": " + 
score + "/" + finalScore);
         if (abs < absScore) {
+          if (Logger.debugging && ai.isHeavy() && bi.isHeavy())
+            Logger.info(ai.dots() + "compareDeep sub " + ai + " " + bi + ": " 
+ score + "/" + finalScore);
           absScore = abs;
           finalScore = score;
         }
       }
-      if (Logger.debugging)
+      if (Logger.debuggingHigh)
         Logger.info(dots() + "compareDeep " + this + " " + b + ": " + 
finalScore);
       return finalScore;
     }
@@ -2173,7 +2174,7 @@
           auxEZ = STEREO_BOTH_EZ;
       }
       alkeneParent.auxEZ = auxEZ;
-      if (Logger.debugging)
+      if (Logger.debuggingHigh)
         Logger.info("getZaux " + alkeneParent + " " + auxEZ);
       return auxEZ;
     }
@@ -2227,7 +2228,7 @@
       CIPAtom thisAtom = this, newSub, oldParent = fromAtom, oldSub = 
newParent;
       // create path back to root
       while (oldParent.parent != null && oldParent.parent.atoms[0] != null) {
-        if (Logger.debugging)
+        if (Logger.debuggingHigh)
           Logger.info("path:" + oldParent.parent + "->" + oldParent);
         path.addLast(oldParent = oldParent.parent);
       }
@@ -2265,7 +2266,7 @@
                                           CIPAtom newSub) {
       for (int i = 0; i < 4; i++)
         if (atoms[i] == oldSub || newParent == null && atoms[i].atom == null) {
-          if (Logger.debugging)
+          if (Logger.debuggingHigh)
             Logger.info("reversed: " + newParent + "->" + this + "->" + 
newSub);
           parent = newParent;
           atoms[i] = newSub;

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-05-31 03:16:55 UTC 
(rev 21627)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-06-04 02:57:04 UTC 
(rev 21628)
@@ -58,6 +58,9 @@
 
 Jmol.___JmolVersion="14.17.2"
 
+bug fix: WRITE FILE not working when file has been cached.
+bug fix: array.find("regex...","") does not reset RegExp each time it runs 
RegExp.exec() so does not find all possibilities
+
 code: CIPChirality.java fully interfaced using SimpleNode and SimpleEdge
 
 JmolVersion="14.17.1"  // 2017.05.27

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to