Revision: 5246
Author: hansonr
Date: 2006-06-27 07:38:48 -0700 (Tue, 27 Jun 2006)
ViewCVS: http://svn.sourceforge.net/jmol/?rev=5246&view=rev
Log Message:
-----------
bob200603 isosurface minor bug fix; adding "plane" keyword
Modified Paths:
--------------
branches/bob200603/Jmol/src/org/jmol/viewer/Eval.java
branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/Eval.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/Eval.java 2006-06-27
04:27:12 UTC (rev 5245)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/Eval.java 2006-06-27
14:38:48 UTC (rev 5246)
@@ -4129,7 +4129,7 @@
}
break;
case Token.leftbrace:
- // {X, Y, Z, W}
+ // {X, Y, Z, W} plane assumed
propertyName = "plane";
propertyValue = getPoint4f(i);
i = pcLastExpressionInstruction;
@@ -4187,12 +4187,19 @@
isOrbital = true;
break;
}
+ if (str.equalsIgnoreCase("plane")) {
+ // plane {X, Y, Z, W}
+ propertyName = "plane";
+ propertyValue = getPoint4f(++i);
+ i = pcLastExpressionInstruction;
+ break;
+ }
if (str.equalsIgnoreCase("functionXY")) {
Vector v = new Vector();
if (++i == statement.length)
badArgumentCount();
- if(statement[i].tok != Token.string)
- invalidArgument(i,"function name in quotation marks expected");
+ if (statement[i].tok != Token.string)
+ invalidArgument(i, "function name in quotation marks expected");
v.add(statement[i++].value);
v.add(getCoordinate(i, false));
v.add(getPoint4f(pcLastExpressionInstruction + 1));
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java 2006-06-27
04:27:12 UTC (rev 5245)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/Isosurface.java 2006-06-27
14:38:48 UTC (rev 5246)
@@ -193,7 +193,7 @@
void setProperty(String propertyName, Object value, BitSet bs) {
- System.out.println("isosurface setProperty: " + propertyName + " = "
+ System.out.println("isosurface "+state+" setProperty: " + propertyName + "
= "
+ value);
if ("init" == propertyName) {
fileIndex = 1;
@@ -242,6 +242,21 @@
return;
}
+ if ("anisotropy" == propertyName) {
+ if (isSolvent)
+ return;
+ Point3f pt = (Point3f) value;
+ anisotropy[0] = pt.x;
+ anisotropy[1] = pt.y;
+ anisotropy[2] = pt.z;
+ isAnisotropic = true;
+ return;
+ }
+
+ if ("eccentricity" == propertyName) {
+ setEccentricity((Point4f) value);
+ }
+
/// special effects
if ("gridPoints" == propertyName) {
@@ -265,21 +280,6 @@
return;
}
- if ("anisotropy" == propertyName) {
- if (isSolvent)
- return;
- Point3f pt = (Point3f) value;
- anisotropy[0] = pt.x;
- anisotropy[1] = pt.y;
- anisotropy[2] = pt.z;
- isAnisotropic = true;
- return;
- }
-
- if ("eccentricity" == propertyName) {
- setEccentricity((Point4f) value);
- }
-
/// JVXL options
if ("fileIndex" == propertyName) {
@@ -322,11 +322,6 @@
return;
}
- if ("plane" == propertyName) {
- thePlane = (Point4f) value;
- return;
- }
-
if ("contour" == propertyName) {
if (value instanceof Integer)
nContours = ((Integer) value).intValue();
@@ -341,6 +336,13 @@
boolean isCalculation = false;
+ if ("plane" == propertyName) {
+ thePlane = (Point4f) value;
+ if (++state != STATE_DATA_READ)
+ return;
+ return;
+ }
+
if ("sphere" == propertyName) {
sphere_radiusAngstroms = ((Float) value).floatValue();
isSphere = isCalculation = true;
@@ -407,6 +409,26 @@
propertyName = "getSurface";
}
+ if ("getSurface" == propertyName) {
+ if (++state != STATE_DATA_READ)
+ return;
+ if (!isCalculation)
+ br = (BufferedReader) value;
+ System.out.println("loading voxel data...");
+ checkFlags();
+ createIsosurface();
+ initializeMesh(force2SidedTriangles);
+ jvxlFileMessage = (isJvxlColorMapped ? "mapped" : "");
+ if (dataIsJvxl2dContour)
+ colorIsosurface();
+ discardTempData(dataIsJvxl2dContour);
+ currentMesh.nBytes = nBytes;
+ if (thePlane == null)
+ System.out.println("\n" + jvxlGetFile(currentMesh, jvxlFileMessage));
+ setModelIndex();
+ return;
+ }
+
if ("phase" == propertyName) {
if (++state != STATE_DATA_COLORED)
return;
@@ -428,26 +450,6 @@
return;
}
- if ("getSurface" == propertyName) {
- if (++state != STATE_DATA_READ)
- return;
- if (!isCalculation)
- br = (BufferedReader) value;
- System.out.println("loading voxel data...");
- checkFlags();
- createIsosurface();
- initializeMesh(force2SidedTriangles);
- jvxlFileMessage = (isJvxlColorMapped ? "mapped" : "");
- if (dataIsJvxl2dContour)
- colorIsosurface();
- discardTempData(dataIsJvxl2dContour);
- currentMesh.nBytes = nBytes;
- if (thePlane == null)
- System.out.println("\n" + jvxlGetFile(currentMesh, jvxlFileMessage));
- setModelIndex();
- return;
- }
-
if ("mapColor" == propertyName) {
isSolvent = isSphere = isOrbital = isFunctionXY = false;
if (++state != STATE_DATA_COLORED)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-commits