Revision: 5171
Author: hansonr
Date: 2006-05-25 07:51:25 -0700 (Thu, 25 May 2006)
ViewCVS: http://svn.sourceforge.net/jmol/?rev=5171&view=rev
Log Message:
-----------
bob200603 isosurfaces Phase III debugging multiple-orbital CUBE files;
normix/gourard comments out.
Modified Paths:
--------------
branches/bob200603/Jmol/src/org/jmol/g3d/Graphics3D.java
branches/bob200603/Jmol/src/org/jmol/g3d/Normix3D.java
branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java
branches/bob200603/Jmol/src/org/jmol/viewer/MeshCollection.java
Modified: branches/bob200603/Jmol/src/org/jmol/g3d/Graphics3D.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/g3d/Graphics3D.java 2006-05-25
06:25:31 UTC (rev 5170)
+++ branches/bob200603/Jmol/src/org/jmol/g3d/Graphics3D.java 2006-05-25
14:51:25 UTC (rev 5171)
@@ -1341,7 +1341,7 @@
}
}
- final static boolean ENABLE_GOURAUD_STATS = true;
+ final static boolean ENABLE_GOURAUD_STATS = false;
static int totalGouraud;
static int shortCircuitGouraud;
Modified: branches/bob200603/Jmol/src/org/jmol/g3d/Normix3D.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/g3d/Normix3D.java 2006-05-25
06:25:31 UTC (rev 5170)
+++ branches/bob200603/Jmol/src/org/jmol/g3d/Normix3D.java 2006-05-25
14:51:25 UTC (rev 5171)
@@ -54,7 +54,7 @@
new short[NORMIX_GEODESIC_LEVEL + 1][];
private final static boolean TIMINGS = false;
- private final static boolean DEBUG_WITH_SEQUENTIAL_SEARCH = true;
+ private final static boolean DEBUG_WITH_SEQUENTIAL_SEARCH = false;
private final Matrix3f rotationMatrix = new Matrix3f();
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java 2006-05-25
06:25:31 UTC (rev 5170)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java 2006-05-25
14:51:25 UTC (rev 5171)
@@ -152,7 +152,7 @@
constructTessellatedSurface();
currentMesh.colix = getDefaultColix();
currentMesh.initialize();
- currentMesh.checkForDuplicatePoints(.001f);
+ //currentMesh.checkForDuplicatePoints(.001f);
currentMesh.visible = true;
discardTempData();
System.out.println("\n" + getJvxlFile(currentMesh, (iHaveColorData ?
"mapped" : "")));
@@ -278,12 +278,16 @@
boolean negativeAtomCount;
void readAtomCountAndOrigin() throws Exception {
- String atomLine = line = br.readLine();
+ line = br.readLine();
atomCount = parseInt(line);
- atomLine = line.substring(ichNextParse);
+ String atomLine = line.substring(ichNextParse);
negativeAtomCount = (atomCount < 0);
+ System.out.println("readAtomCountAndOrigin "+negativeAtomCount + " " +
atomCount +" : "+line + " ||| " + atomLine);
+
if (negativeAtomCount)
atomCount = -atomCount;
+
+
int jvxlAtoms = (atomCount == 0 ? -1 : -atomCount);
volumetricOrigin.x = parseFloat(line, ichNextParse);
volumetricOrigin.y = parseFloat(line, ichNextParse);
@@ -332,8 +336,11 @@
edgeFractionRange = defaultEdgeFractionRange;
colorFractionBase = defaultColorFractionBase;
colorFractionRange = defaultColorFractionRange;
+ System.out.println("readExtraLine"+negativeAtomCount);
+
if (negativeAtomCount) {
nSurfaces = parseInt(line = br.readLine());
+ System.out.println("Reading extra orbital information line: "+ line);
isJvxl = (nSurfaces < 0);
if (isJvxl) {
nSurfaces = -nSurfaces;
@@ -379,13 +386,14 @@
iHaveColorData = false;
thisInside = true;
nDataPoints = 0;
- int voxelCountX = voxelCounts[0];
- int voxelCountY = voxelCounts[1];
- int voxelCountZ = voxelCounts[2];
+ int nPointsX = voxelCounts[0];
+ int nPointsY = voxelCounts[1];
+ int nPointsZ = voxelCounts[2];
+ int nPoints = nPointsX * nPointsY * nPointsZ;
System.out.println("entering readVoxelData for fileIndex = " + fileIndex
- + "; " + (voxelCountX * voxelCountY * voxelCountZ) + " voxels");
- voxelData = new float[voxelCountX][][];
- skipData(fileIndex - 1);
+ + "; " + nPoints + " data points");
+ voxelData = new float[nPointsX][][];
+ skipData(fileIndex - 1, nPoints);
if (isJvxl) {
readJvxlDefinitionLine(true);
cutoff = 0.5f; // just 0s and 1s here. detail is in the edgeFractions
@@ -397,13 +405,13 @@
vTemp.set(thePlane.x, thePlane.y, thePlane.z);
vTempMag = vTemp.length();
}
- for (int x = 0; x < voxelCountX; ++x) {
- float[][] plane = new float[voxelCountY][];
+ for (int x = 0; x < nPointsX; ++x) {
+ float[][] plane = new float[nPointsY][];
voxelData[x] = plane;
- for (int y = 0; y < voxelCountY; ++y) {
- float[] strip = new float[voxelCountZ];
+ for (int y = 0; y < nPointsY; ++y) {
+ float[] strip = new float[nPointsZ];
plane[y] = strip;
- for (int z = 0; z < voxelCountZ; ++z) {
+ for (int z = 0; z < nPointsZ; ++z) {
float voxelValue = getNextVoxelValue();
if (thePlane != null)
voxelValue = calcVoxelPlaneDistance(x, y, z);
@@ -428,8 +436,8 @@
surfaceData += " " + dataCount + "\n";
if (!isMapData)
currentMesh.surfaceData = surfaceData;
- System.out.println("Successfully read " + voxelCountX + " x " + voxelCountY
- + " x " + voxelCountZ + " voxels");
+ System.out.println("Successfully read " + nPointsX + " x " + nPointsY
+ + " x " + nPointsZ + " data points");
}
float calcVoxelPlaneDistance(int x, int y, int z) {
@@ -474,8 +482,8 @@
surfaceData += line + "\n";
if (line == null
|| (nThisValue = parseInt(line)) == Integer.MIN_VALUE) {
- System.out.println("end of file in JvxlReader? (x,y,z,line):"
- + line);
+ System.out.println("end of file in JvxlReader? nBytes=" + nBytes
+ + " line=" + line);
throw new NullPointerException();
}
nBytes += line.length() + 1;
@@ -489,24 +497,28 @@
if (Float.isNaN(voxelValue)) {
line = br.readLine();
if (line == null || Float.isNaN(voxelValue = parseFloat(line))) {
- System.out.println("end of file reading cube voxel data? nDataPoints="
- + nDataPoints + " (line):" + line);
+ System.out.println("end of file reading cube voxel data? nBytes="
+ + nBytes + " nDataPoints=" + nDataPoints + " (line):" + line);
throw new NullPointerException();
}
+ if(ntest++<10){
+ System.out.println("READING " + nBytes + " " + voxelValue + " " +
line);
+ }
nBytes += line.length() + 1;
}
return voxelValue;
}
+ int ntest=0;
- void skipData(int n) throws Exception {
+ void skipData(int n, int nPoints) throws Exception {
+ ntest=0;
if (n == 0)
return;
- System.out.println("skipping " + n + " data sets");
- int nVertices = voxelCountX * voxelCountY * voxelCountZ;
+ System.out.println("skipping " + n + " data sets, " + nPoints + " points
each");
for (int i = 0; i < n; i++) {
if (isJvxl)
readJvxlDefinitionLine(false);
- skipData(nVertices, true);
+ skipData(nPoints, true);
if (isJvxl) {
skipData(nEdgeData, false);
if (iHaveColorData)
@@ -519,6 +531,8 @@
int iV = 0;
while (iV < nPoints) {
line = br.readLine();
+ if (iV < 1000 || nPoints - iV < 1000)
+ System.out.println(iV + " skip " + nPoints + " " + line);
iV += (isInt ? countData(line) : line.length());
}
}
@@ -544,6 +558,7 @@
while (ich < ichMax && ((ch = str.charAt(ich)) != ' ' && ch != '\t'))
++ich;
}
+ //System.out.println("SKIPPING " + count +": " + str);
return count;
}
////////////////////////////////////////////////////////////////
@@ -643,15 +658,16 @@
String getJvxlFile(Mesh mesh, String msg) {
String data = mesh.jvxlFileHeader;
- data += mesh.cutoff + " " + mesh.surfaceData.length() + " "
- + (mesh.edgeData.length() - 1) + " " + (mesh.colorData.length() - 1);
+ data += "# " + msg + "\n" + mesh.cutoff + " " + mesh.surfaceData.length()
+ + " " + (mesh.edgeData.length() - 1) + " "
+ + (mesh.colorData.length() - 1);
if (!isJvxl)
data += " compressionRatio="
+ (mesh.nBytes * 1f / (mesh.surfaceData.length()
+ mesh.edgeData.length() + mesh.colorData.length()));
data += "\n" + mesh.surfaceData + mesh.edgeData + mesh.colorData;
if (msg != null)
- data += "-------end of jvxl file " + msg + " data-------\n";
+ data += "#-------end of jvxl file " + msg + " data-------\n";
return data;
}
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/MeshCollection.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/MeshCollection.java
2006-05-25 06:25:31 UTC (rev 5170)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/MeshCollection.java
2006-05-25 14:51:25 UTC (rev 5171)
@@ -324,12 +324,6 @@
V.add(info);
}
return V;
- }
-
- String getJvxlFileData() {
- if (currentMesh == null)
- return null;
- return currentMesh.jvxlFileData;
- }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jmol-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-commits