From: <ha...@us...> - 2006-09-16 23:24:00
|
Revision: 5573 http://svn.sourceforge.net/jmol/?rev=5573&view=rev Author: hansonr Date: 2006-09-16 16:23:54 -0700 (Sat, 16 Sep 2006) Log Message: ----------- isosurface ignore() Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Isosurface.java Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-09-16 21:34:59 UTC (rev 5572) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-09-16 23:23:54 UTC (rev 5573) @@ -4901,6 +4901,13 @@ propertyName = "remappable"; break; } + if (str.equalsIgnoreCase("IGNORE")) { + propertyName = "ignore"; + ++i; + propertyValue = expression(statement, i + 1); + i = pcLastExpressionInstruction; + break; + } if (str.equalsIgnoreCase("CUTOFF")) { if (++i < statementLength && statement[i].tok == Token.plus) { propertyName = "cutoffPositive"; Modified: trunk/Jmol/src/org/jmol/viewer/Isosurface.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-09-16 21:34:59 UTC (rev 5572) +++ trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-09-16 23:23:54 UTC (rev 5573) @@ -256,6 +256,7 @@ BufferedReader br; BitSet bsSelected; + BitSet bsIgnore; void setProperty(String propertyName, Object value, BitSet bs) { @@ -311,6 +312,11 @@ return; } + if ("ignore" == propertyName) { + bsIgnore = (BitSet) value; + return; + } + if ("cutoff" == propertyName) { cutoff = ((Float) value).floatValue(); isPositiveOnly = false; @@ -4061,7 +4067,7 @@ int firstSet = -1; int lastSet = 0; for (int i = 0; i < nAtoms; i++) - if (nSelected == 0 || bsSelected.get(i)) { + if (!bsIgnore.get(i) && (nSelected == 0 || bsSelected.get(i))) { if (solvent_modelIndex < 0) solvent_modelIndex = atoms[i].modelIndex; if (solvent_modelIndex != atoms[i].modelIndex) @@ -4151,7 +4157,7 @@ firstSet = -1; lastSet = 0; for (int i = 0; i < nAtoms; i++) { - if (atomSet.get(i)) + if (atomSet.get(i) || bsIgnore != null && bsIgnore.get(i)) continue; pt = atoms[i]; float rA = atoms[i].getVanderwaalsRadiusFloat() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |