Revision: 20124
          http://sourceforge.net/p/jmol/code/20124
Author:   hansonr
Date:     2014-11-25 03:49:48 +0000 (Tue, 25 Nov 2014)
Log Message:
-----------
Jmol.___JmolVersion="14.3.9_2014.11.24"

bug fix: CASTEP DENSITY surface file reader does not do downsampling

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

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java       
2014-11-25 02:53:08 UTC (rev 20123)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java       
2014-11-25 03:49:48 UTC (rev 20124)
@@ -38,7 +38,7 @@
   @Override
   void init2(SurfaceGenerator sg, BufferedReader br) {
     init2VFR(sg, br);
-    canDownsample = isProgressive = false;
+    isProgressive = false;
     isAngstroms = true;
   }
 
@@ -95,7 +95,20 @@
 
   @Override
   protected void getPeriodicVoxels() throws Exception {
-    // no downsampling (yet), because CASTEP writes x, y, z info.
+    int dsf = downsampleFactor;
+    if (dsf > 1) {
+      for (int i = 0; i < nFilePoints; i++) {
+        int x = parseIntStr(line) - 1;
+        int y = parseInt() - 1;
+        int z = parseInt() - 1;
+        if (x % dsf == 0 && y % dsf == 0 && z % dsf == 0) {
+          if (nSkip > 0)
+            skipPoints(nSkip);
+          voxelData[x / dsf][y / dsf][z / dsf] = recordData(parseFloat());
+        }
+        rd();
+      }
+    } else {
     for (int i = 0; i < nFilePoints; i++) {
       int x = parseIntStr(line) - 1;
       int y = parseInt() - 1;
@@ -105,6 +118,7 @@
       voxelData[x][y][z] = recordData(parseFloat());
       rd();
     }
+    }
 
   }
 

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-11-25 02:53:08 UTC 
(rev 20123)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-11-25 03:49:48 UTC 
(rev 20124)
@@ -17,6 +17,8 @@
 
 Jmol.___JmolVersion="14.3.9_2014.11.24"
 
+bug fix: CASTEP DENSITY surface file reader does not do downsampling
+
 new feature: isosurface "==1blu"  -- difference map; defaults to sigma=3
 
 JmolVersion="14.3.9_2014.11.23"

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


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to