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

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

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

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java  2015-03-23 
13:22:00 UTC (rev 20400)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/IsoSolventReader.java  2015-03-23 
13:22:47 UTC (rev 20401)
@@ -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: trunk/Jmol/src/org/jmol/jvxl/readers/PeriodicVolumeFileReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/PeriodicVolumeFileReader.java  
2015-03-23 13:22:00 UTC (rev 20400)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/PeriodicVolumeFileReader.java  
2015-03-23 13:22:47 UTC (rev 20401)
@@ -5,7 +5,7 @@
   @Override
   protected void readSurfaceData(boolean isMapData) throws Exception {
     initializeSurfaceData();
-    voxelData = new float[nPointsX][nPointsY][nPointsZ];
+    newVoxelDataCube();
     getPeriodicVoxels();
     if (params.extendGrid != 0) {
       int[] n = new int[3];

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-03-23 13:22:00 UTC 
(rev 20400)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-03-23 13:22:47 UTC 
(rev 20401)
@@ -14,8 +14,12 @@
 
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
-Jmol.___JmolVersion="14.3.13_2015.03.21"
+Jmol.___JmolVersion="14.3.13_2015.03.23"
 
+bug fix: isosurface solvent will fail if max volume is smaller than cavity max 
even though not cavity
+
+JmolVersion="14.3.13_2015.03.21"
+
 bug fix: JmolVersion="14.3.13_2015.03.20b" broke JSmol due to error in coding 
URL.js
 
 JmolVersion="14.3.13_2015.03.20b"

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