Revision: 20400
          http://sourceforge.net/p/jmol/code/20400
Author:   hansonr
Date:     2015-03-23 13:22:00 +0000 (Mon, 23 Mar 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.2.13_2015.03.23"

bug fix: isosurface solvent will fail if max volume is smaller than cavity max 
even though not cavity

Modified Paths:
--------------
    branches/v14_2/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java 
2015-03-21 20:51:31 UTC (rev 20399)
+++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java 
2015-03-23 13:22:00 UTC (rev 20400)
@@ -472,19 +472,19 @@
       BS bsAll = new BS();
       BS[] bsSurfaces = meshData.getSurfaceSet();
       BS[] bsSources = null;
-      double[] volumes = (double[]) (isPocket ? null : 
-          MeshData.calculateVolumeOrArea(meshData, Integer.MIN_VALUE, false, 
false));
-      float minVolume = (float)(1.5 * Math.PI * Math.pow(sr, 3));
+      double[] volumes = (double[]) (isPocket ? null : MeshData
+          .calculateVolumeOrArea(meshData, Integer.MIN_VALUE, false, false));
+      float minVolume = (isCavity ? (float) (1.5 * Math.PI * Math.pow(sr, 3)) 
: 0);
       double maxVolume = 0;
       boolean maxIsNegative = false;
       if (volumes != null && !isCavity)
-      for (int i = 0; i < meshData.nSets; i++) {
-        double v = volumes[i];
-        if (Math.abs(v) > maxVolume) {
-          maxVolume = Math.abs(v);
-          maxIsNegative = (v < 0);
+        for (int i = 0; i < meshData.nSets; i++) {
+          double v = volumes[i];
+          if (Math.abs(v) > maxVolume) {
+            maxVolume = Math.abs(v);
+            maxIsNegative = (v < 0);
+          }
         }
-      }
       double factor = (maxIsNegative ? -1 : 1);
       // added this factor business to account for situations where
       // the first volume recorded is negative, but later, larger volumes,
@@ -776,20 +776,26 @@
       this.pS = P3.newP(pS);
     }
 
-//    protected void dump() {
-//      P3 ptA = atomXyz[ia];
-//      P3 ptB = atomXyz[ib];
-//      P3 ptC = atomXyz[ic];
-//      String color = "red";
-//      String label = "f"+ ia + "_" + ib + "_" + ic + "_";
-//      dumpLine(ptA, ptB, label, color);
-//      dumpLine(ptB, ptC, label, color);
-//      dumpLine(ptC, ptA, label, color);
-//      dumpLine2(pS, ptA, label, solventRadius, color, "white");
-//      dumpLine2(pS, ptB, label, solventRadius, color, "white");
-//      dumpLine2(pS, ptC, label, solventRadius, color, "white");
-//    }
+    protected void dump() {
+      P3 ptA = atomXyz[ia];
+      P3 ptB = atomXyz[ib];
+      P3 ptC = atomXyz[ic];
+      String color = "red";
+      String label = "f"+ ia + "_" + ib + "_" + ic + "_";
+      sg.log("draw ID \"x" + label + (nTest++) + "\" "
+          + P3.newP(ptA)
+          + " " + P3.newP(ptB) 
+          + " " + P3.newP(ptC)
+          + " color " + color);
 
+      //dumpLine(ptA, ptB, label, color);
+      //dumpLine(ptB, ptC, label, color);
+      //dumpLine(ptC, ptA, label, color);
+      //dumpLine2(pS, ptA, label, sr, color, "white");
+      //dumpLine2(pS, ptB, label, sr, color, "white");
+      //dumpLine2(pS, ptC, label, sr, color, "white");
+    }
+
     @Override
     public String toString() {
       return ia + "_" + ib + "_" + ic + "_" + pS;
@@ -827,9 +833,12 @@
           if ((f = validateFace(ia, ib, ic, edge, ptS1)) != null) {
             vFaces.addLast(f);
             isOK = true;
+            f.dump();
           }
           if ((f = validateFace(ia, ib, ic, edge, ptS2)) != null) {
             vFaces.addLast(f);
+            if (!isOK)
+              f.dump();
             isOK = true;
           }
           if (isOK) {

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-03-21 
20:51:31 UTC (rev 20399)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-03-23 
13:22:00 UTC (rev 20400)
@@ -4,8 +4,12 @@
 # THIS IS THE RELEASE BRANCH 
 # BUG FIXES ONLY, PLEASE
 
-Jmol.___JmolVersion="14.2.13_2015.03.20b"
+Jmol.___JmolVersion="14.2.13_2015.03.23"
 
+bug fix: isosurface solvent will fail if max volume is smaller than cavity max 
even though not cavity
+
+JmolVersion="14.2.13_2015.03.20b"
+
 bug fix: popup menu Symmetry broken
 bug fix: PDB reader does not save unit cell on simple load
 

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