From: <ha...@us...> - 2006-10-30 23:31:05
|
Revision: 6058 http://svn.sourceforge.net/jmol/?rev=6058&view=rev Author: hansonr Date: 2006-10-30 15:30:58 -0800 (Mon, 30 Oct 2006) Log Message: ----------- fix for lcaoCartoon in multiple model situations Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Isosurface.java trunk/Jmol/src/org/jmol/viewer/LcaoCartoon.java Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-30 20:48:20 UTC (rev 6057) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-30 23:30:58 UTC (rev 6058) @@ -5719,6 +5719,8 @@ int atomIndex = viewer.firstAtomOf(expression(statement, ++i)); if (atomIndex < 0) expressionExpected(); + viewer.setShapeProperty(JmolConstants.SHAPE_ISOSURFACE, "modelIndex", + new Integer(viewer.getAtomModelIndex(atomIndex))); Vector3f[] axes = { new Vector3f(), new Vector3f(), new Vector3f(viewer.getAtomPoint3f(atomIndex)) }; viewer.getPrincipalAxes(atomIndex, axes[0], axes[1], lcaoType, false); Modified: trunk/Jmol/src/org/jmol/viewer/Isosurface.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-10-30 20:48:20 UTC (rev 6057) +++ trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-10-30 23:30:58 UTC (rev 6058) @@ -185,6 +185,8 @@ float scale; Matrix3f eccentricityMatrix; Matrix3f eccentricityMatrixInverse; + + int modelIndex; final static int NO_ANISOTROPY = 1 << 5; final static int IS_SILENT = 1 << 6; @@ -407,6 +409,11 @@ return; } + if ("modelIndex" == propertyName) { + modelIndex = ((Integer) value).intValue(); + return; + } + /// hidden options if ("fileIndex" == propertyName) { @@ -881,6 +888,7 @@ fileIndex = 1; insideOut = false; isFixed = false; + modelIndex = -1; precalculateVoxelData = false; isColorReversed = false; iAddGridPoints = false; @@ -4996,6 +5004,10 @@ currentMesh.ptCenter.set(center); currentMesh.title = title; currentMesh.jvxlDefinitionLine = jvxlGetDefinitionLine(currentMesh); + if (modelIndex >= 0) { + currentMesh.modelIndex = modelIndex; + return; + } int modelCount = viewer.getModelCount(); if (modelCount < 2) isFixed = true; Modified: trunk/Jmol/src/org/jmol/viewer/LcaoCartoon.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/LcaoCartoon.java 2006-10-30 20:48:20 UTC (rev 6057) +++ trunk/Jmol/src/org/jmol/viewer/LcaoCartoon.java 2006-10-30 23:30:58 UTC (rev 6058) @@ -56,6 +56,7 @@ lcaoID = null; thisSet = bs; isMolecular = false; + thisType = null; // overide bitset selection super.setProperty("init", null, null); return; @@ -161,6 +162,8 @@ super.setProperty("colorRGB", lcaoColorPos, null); } super.setProperty("lcaoType", type, null); + super.setProperty("modelIndex", new Integer(viewer.getAtomModelIndex(iAtom)), null); + Vector3f[] axes = { new Vector3f(), new Vector3f(), new Vector3f(frame.atoms[iAtom]) }; if (isMolecular) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |