From: <ha...@us...> - 2011-05-30 15:08:29
|
Revision: 15514 http://jmol.svn.sourceforge.net/jmol/?rev=15514&view=rev Author: hansonr Date: 2011-05-30 15:08:23 +0000 (Mon, 30 May 2011) Log Message: ----------- version=12.1.48 # new feature: atomMovedCallback parameter: BitSet of atoms moved # new feature: appletReadyCallback parameters: htmlName, TRUE/FALSE # -- fired ONCE upon applet ready, once upon applet destroyed # new feature: load spacegroup "" loads data with current file's space group # new feature: load unitcell "" loads data with current file's unit cell and offset # set appendNew false # LOAD DATA "append" # 1 # testing # Na 0.5 0 0.5 # end "append" {1 1 1} spacegroup "P4/mmm" unitcell "" # new feature: draw ARROW [ATOM {aa} | BOND {bb} {cc}] [ATOM {aa} | BOND {bb} {cc}] # -- allows easy creation of curved mechanistic arrows from atoms to bonds, # bonds to atoms, atoms to atoms, or bonds to bonds. # -- when atoms are moved, these arrows follow the atoms. # new feature: isosurface CONNECT {xxx} # -- connects an isosurface to an atom (only the first in the set) so that # If that atom is moved, then entire isosurface is moved. # -- STATE ISSUE: From the state, all isosurfaces are created AFTER atoms are moved, # so an isosurface such as a molecular surface will not be recreated properly from the state # new feature: show state FILE "filename" --- show embedded state from file (for example, an image) # new feature: MO POINTS / AO POINTS mapping onto a plane # for (var i = -5;i < 5;i += 0.2) {isosurface color range -1.0 1.0 plane x= @i map atomicorbital 4 3 1 points 1000;refresh} # bug fix: set appendNew false; load =1q0y; load APPEND =1crn causes exception # bug fix: lcaoCartoon does not get hidden when atom deleted # bug fix: isosurface mesh incompatible with fullylit and frontonly # bug fix: isosurface SELECT should also set model index # bug fix: navigate broken # bug fix: modelKit dragMinimizeAtom broken in 12.0.43 # bug fix: dragMinimize should select all non-fixed atoms if there are fixed atoms # bug fix: write @{"xxxx"} fails # bug fix: xmlns designations for jvxl and cml added to JVXL file creation # bug fix: isosurface ... map VDW -- mapping not saved in state # bug fix: CRYSTAL reader does not read vibrations for atoms with two-character symbols # bug fix: cartoons with hermite level do not reposition for atom position changes or trajectories # bug fix: isosurface plane x=-1 (with no spaces) not accepted # bug fix: x = write("VRML") should give VRML contents and not write to disk # bug fix: third oxygen atom in 5'-terminal phosphate was not assigned to backbone (e.g. 4tna.pdb) Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-05-30 14:54:16 UTC (rev 15513) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-05-30 15:08:23 UTC (rev 15514) @@ -7675,8 +7675,6 @@ transformManager.rotateAxisAngleAtCenter(rotCenter, rotAxis, degreesPerSecond, endDegrees, isSpin, bsSelected); refresh(-1, "rotateAxisAngleAtCenter"); - if (bsSelected != null && !isSpin) - checkMinimization(); } public void rotateAboutPointsInternal(Point3f point1, Point3f point2, @@ -7696,8 +7694,6 @@ degreesPerSecond, endDegrees, false, isSpin, bsSelected, false, translation, finalPoints); refresh(-1, "rotateAxisAboutPointsInternal"); - if (bsSelected != null && !isSpin) - checkMinimization(); } int getPickingSpinRate() { @@ -7901,25 +7897,43 @@ // Eval modelSet.invertSelected(pt, null, -1, null, bs); checkMinimization(); + statusManager.setStatusAtomMoved(bs); } public void invertAtomCoord(Point4f plane, BitSet bs) { modelSet.invertSelected(null, plane, -1, null, bs); checkMinimization(); + statusManager.setStatusAtomMoved(bs); } public void invertSelected(Point3f pt, Point4f plane, int iAtom, BitSet invAtoms) { // Eval - modelSet.invertSelected(pt, plane, iAtom, invAtoms, getSelectionSet(false)); + BitSet bs = getSelectionSet(false); + if (bs.cardinality() == 0) + return; + modelSet.invertSelected(pt, plane, iAtom, invAtoms, bs); checkMinimization(); + statusManager.setStatusAtomMoved(bs); } + void moveAtoms(Matrix3f mNew, Matrix3f matrixRotate, Vector3f translation, + Point3f center, boolean isInternal, BitSet bsAtoms) { + // from TransformManager exclusively + if (bsAtoms.cardinality() == 0) + return; + modelSet.moveAtoms(mNew, matrixRotate, translation, bsAtoms, center, + isInternal); + checkMinimization(); + statusManager.setStatusAtomMoved(bsAtoms); + } + private boolean movingSelected; private boolean showSelected; public void moveSelected(int deltaX, int deltaY, int x, int y, - BitSet bsSelected, boolean isTranslation, boolean asAtoms) { + BitSet bsSelected, boolean isTranslation, + boolean asAtoms) { // cannot synchronize this -- it's from the mouse and the event queue if (x == Integer.MIN_VALUE) rotateBondIndex = -1; @@ -7947,27 +7961,24 @@ actionRotateBond(deltaX, deltaY, x, y); } else { bsSelected = setMovableBitSet(bsSelected, !asAtoms); - if (bsSelected.cardinality() == 0) - return; - if (isTranslation) { - Point3f ptCenter = getAtomSetCenter(bsSelected); - Point3i ptScreen = transformPoint(ptCenter); - Point3f ptScreenNew = new Point3f(ptScreen.x + deltaX + 0.5f, - ptScreen.y + deltaY + 0.5f, ptScreen.z); - Point3f ptNew = new Point3f(); - transformManager.finalizeTransformParameters(); - unTransformPoint(ptScreenNew, ptNew); - // script("draw ID 'pt" + Math.random() + "' " + Escape.escape(ptNew)); - ptNew.sub(ptCenter); - setAtomCoordRelative(ptNew, bsSelected); - refresh(2, ""); // should be syncing here - movingSelected = false; - return; - } - transformManager.rotateXYBy(deltaX, deltaY, bsSelected); + if (bsSelected.cardinality() != 0) { + if (isTranslation) { + Point3f ptCenter = getAtomSetCenter(bsSelected); + Point3i ptScreen = transformPoint(ptCenter); + Point3f ptScreenNew = new Point3f(ptScreen.x + deltaX + 0.5f, + ptScreen.y + deltaY + 0.5f, ptScreen.z); + Point3f ptNew = new Point3f(); + transformManager.finalizeTransformParameters(); + unTransformPoint(ptScreenNew, ptNew); + // script("draw ID 'pt" + Math.random() + "' " + Escape.escape(ptNew)); + ptNew.sub(ptCenter); + setAtomCoordRelative(ptNew, bsSelected); + } else { + transformManager.rotateXYBy(deltaX, deltaY, bsSelected); + } + } } refresh(2, ""); // should be syncing here - checkMinimization(); movingSelected = false; } @@ -8069,17 +8080,6 @@ null, null); } - void moveAtoms(Matrix3f mNew, Matrix3f matrixRotate, Vector3f translation, - Point3f center, boolean isInternal, BitSet bsAtoms) { - // from TransformManager exclusively - if (bsAtoms.cardinality() == 0) - return; - modelSet.moveAtoms(mNew, matrixRotate, translation, bsAtoms, center, - isInternal); - checkMinimization(); - statusManager.setStatusAtomMoved(bsAtoms); - } - public void refreshMeasures(boolean andStopMinimization) { setShapeProperty(JmolConstants.SHAPE_MEASURES, "refresh", null); if (andStopMinimization) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |