From: <ha...@us...> - 2008-05-29 20:34:09
|
Revision: 9441 http://jmol.svn.sourceforge.net/jmol/?rev=9441&view=rev Author: hansonr Date: 2008-05-29 13:34:02 -0700 (Thu, 29 May 2008) Log Message: ----------- version=11.5.39_dev# set pdbGetHeader TRUE # to get the header when loading (for Protein Explorer) Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/PdbReader.java trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java trunk/Jmol/src/org/jmol/modelset/ModelCollection.java trunk/Jmol/src/org/jmol/modelset/ModelLoader.java trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/StateManager.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/PdbReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/PdbReader.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/PdbReader.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -71,6 +71,28 @@ int maxSerial = 0; int[] chainAtomCounts; + final private static String lineOptions = + "ATOM " + //0 + "HETATM " + //1 + "MODEL " + //2 + "CONECT " + //3 + "HELIX " + //4,5,6 + "SHEET " + + "TURN " + + "HET " + //7 + "HETNAM " + //8 + "ANISOU " + //9 + "SITE " + //10 + "CRYST1 " + //11 + "SCALE1 " + //12,13,14 + "SCALE2 " + + "SCALE3 " + + "EXPDTA " + //15 + "FORMUL " + //16 + "REMARK " + //17 + "HEADER " + //18 + "COMPND "; //19 + public AtomSetCollection readAtomSetCollection(BufferedReader reader) { //System.out.println(this + " initialized"); this.reader = reader; @@ -82,10 +104,21 @@ isNMRdata = false; boolean iHaveModel = false; boolean iHaveModelStatement = false; + StringBuffer pdbHeader = (getHeader ? new StringBuffer() : null); try { while (readLine() != null) { - lineLength = line.length(); - if (line.startsWith("MODEL ")) { + int ptOption = ((lineLength = line.length()) < 6 ? -1 : + lineOptions.indexOf(line.substring(0, 6))) >> 3; + boolean isAtom = (ptOption == 0 || ptOption == 1); + boolean isModel = (ptOption == 2); + if (getHeader) { + if (isAtom || isModel) + getHeader = false; + else + pdbHeader.append(line).append('\n'); + } + if (isModel) { + getHeader = false; iHaveModelStatement = true; if (++modelNumber != desiredModelNumber && desiredModelNumber > 0) { if (iHaveModel) @@ -99,86 +132,85 @@ model(); continue; } - if (line.startsWith("HELIX ") || line.startsWith("SHEET ") - || line.startsWith("TURN ")) { + /* + * OK, the PDB file format is messed up here, because the + * above commands are all OUTSIDE of the Model framework. + * Of course, different models might have different + * secondary structures, but it is not clear that PDB actually + * supports this. So you can't concatinate PDB files the way + * you can CIF files. --Bob Hanson 8/30/06 + */ + if (iHaveModelStatement && !iHaveModel) + continue; + if (isAtom) { + getHeader = false; + atom(); + continue; + } + switch (ptOption) { + case 3: + //if (line.startsWith("CONECT")) { + conect(); + continue; + case 4: + case 5: + case 6: + //if (line.startsWith("HELIX ") || line.startsWith("SHEET ") + // || line.startsWith("TURN ")) { structure(); continue; - } - if (line.startsWith("HET ")) { + case 7: + //if (line.startsWith("HET ")) { het(); continue; - } - if (line.startsWith("HETNAM")) { + case 8: + //if (line.startsWith("HETNAM")) { hetnam(); continue; - } - if (line.startsWith("ANISOU")) { + case 9: + //if (line.startsWith("ANISOU")) { anisou(); continue; - } - if (line.startsWith("SITE ")) { + case 10: + //if (line.startsWith("SITE ")) { site(); continue; - } - if (line.startsWith("CRYST1")) { + case 11: + //if (line.startsWith("CRYST1")) { cryst1(); continue; - } - if (line.startsWith("SCALE1")) { - scale(1); + case 12: + case 13: + case 14: + //if (line.startsWith("SCALE1")) { + //if (line.startsWith("SCALE2")) { + //if (line.startsWith("SCALE3")) { + scale(ptOption - 11); continue; - } - if (line.startsWith("SCALE2")) { - scale(2); - continue; - } - if (line.startsWith("SCALE3")) { - scale(3); - continue; - } - if (line.startsWith("EXPDTA")) { + case 15: + //if (line.startsWith("EXPDTA")) { expdta(); continue; - } - if (line.startsWith("FORMUL")) { + case 16: + //if (line.startsWith("FORMUL")) { formul(); continue; - } - if (line.startsWith("REMARK 350 GENERATING THE BIOMOLECULE")) { - remark350(); - continue; - } - if (line.startsWith("REMARK")) { - //Logger.debug(line); + case 17: + //if (line.startsWith("REMARK")) { + if (line.startsWith("REMARK 350 GENERATING THE BIOMOLECULE")) { + remark350(); + continue; + } checkLineForScript(); continue; - } - if (line.startsWith("HEADER")) { + case 18: header(); continue; - } - if (line.startsWith("COMPND")) { + case 19: + //if (line.startsWith("COMPND")) { compnd(); continue; } - /* - * OK, the PDB file format is messed up here, because the - * above commands are all OUTSIDE of the Model framework. - * Of course, different models might have different - * secondary structures, but it is not clear that PDB actually - * supports this. So you can't concatinate PDB files the way - * you can CIF files. --Bob Hanson 8/30/06 - */ - if (iHaveModelStatement && !iHaveModel) - continue; - if (line.startsWith("ATOM ") || line.startsWith("HETATM")) { - atom(); - continue; - } - if (line.startsWith("CONECT")) { - conect(); - continue; - } } atomSetCollection.connectAll(maxSerial); if (biomolecules != null && biomolecules.size() > 0) { @@ -196,6 +228,8 @@ } catch (Exception e) { return setError(e); } + if (pdbHeader != null) + atomSetCollection.setAtomSetCollectionAuxiliaryInfo("fileHeader", pdbHeader.toString()); return atomSetCollection; } Modified: trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/adapter/readers/molxyz/MolReader.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -122,7 +122,7 @@ return; header += line + "\n"; checkLineForScript(); - atomSetCollection.setAtomSetCollectionProperty("fileHeader", header); + atomSetCollection.setAtomSetCollectionAuxiliaryInfo("fileHeader", header); newAtomSet(thisDataSetName); } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -90,7 +90,8 @@ public int desiredModelNumber; public int modelNumber; public boolean iHaveDesiredModel; - + public boolean getHeader; + public String filter; public String spaceGroup; @@ -225,7 +226,7 @@ modelNumber = 0; desiredModelNumber = -1; iHaveDesiredModel = false; - + getHeader = false; latticeCells[0] = latticeCells[1] = latticeCells[2] = 0; desiredSpaceGroupIndex = -1; @@ -250,9 +251,11 @@ } public void initialize(Hashtable htParams) { + initialize(); int[] params = null; if (htParams != null) { + getHeader = htParams.containsKey("getHeader"); readerName = (String) htParams.get("readerName"); params = (int[]) htParams.get("params"); applySymmetryToBonds = htParams.containsKey("applySymmetryToBonds"); Modified: trunk/Jmol/src/org/jmol/modelset/ModelCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -1027,7 +1027,6 @@ models[modelIndex].dataSourceFrame : -1); } - private String pdbHeader; /* final static String[] pdbRecords = { "ATOM ", "HELIX ", "SHEET ", "TURN ", "MODEL ", "SCALE", "HETATM", "SEQRES", @@ -1036,9 +1035,13 @@ final static String[] pdbRecords = { "ATOM ", "MODEL ", "HETATM" }; - private String getFullPDBHeader() { - String info = (pdbHeader == null ? (pdbHeader = viewer - .getCurrentFileAsString()) : pdbHeader); + private String getFullPDBHeader(int modelIndex) { + if (modelIndex < 0) + return ""; + String info = (String) getModelAuxiliaryInfo(modelIndex, "fileHeader"); + if (info != null) + return info; + info = viewer.getCurrentFileAsString(); int ichMin = info.length(); for (int i = pdbRecords.length; --i >= 0;) { int ichFound; @@ -1054,17 +1057,21 @@ ichMin = ++ichFound; } } - return info.substring(0, ichMin); + info = info.substring(0, ichMin); + setModelAuxiliaryInfo(modelIndex, "fileHeader", info); + return info; } - public String getPDBHeader() { - return (isPDB ? getFullPDBHeader() : getFileHeader()); + public String getPDBHeader(int modelIndex) { + return (isPDB ? getFullPDBHeader(modelIndex) : getFileHeader(modelIndex)); } - public String getFileHeader() { + public String getFileHeader(int modelIndex) { + if (modelIndex < 0) + return ""; if (isPDB) - return getFullPDBHeader(); - String info = getModelSetProperty("fileHeader"); + return getFullPDBHeader(modelIndex); + String info = (String) getModelAuxiliaryInfo(modelIndex, "fileHeader"); if (info == null) info = modelSetName; if (info != null) Modified: trunk/Jmol/src/org/jmol/modelset/ModelLoader.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelLoader.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/modelset/ModelLoader.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -110,6 +110,7 @@ private boolean someModelsHaveUnitcells; private boolean isTrajectory; + private String fileHeader; private void initializeInfo(String name, int nAtoms, Properties properties, Hashtable info) { @@ -123,6 +124,7 @@ isMultiFile = getModelSetAuxiliaryInfoBoolean("isMultiFile"); isPDB = getModelSetAuxiliaryInfoBoolean("isPDB"); jmolData = (String) getModelSetAuxiliaryInfo("jmolData"); + fileHeader = (String) getModelSetAuxiliaryInfo("fileHeader"); trajectories = (Vector) getModelSetAuxiliaryInfo("trajectories"); isTrajectory = (trajectories != null); adapterTrajectoryCount = (trajectories == null ? 0 : trajectories.size()); @@ -466,6 +468,8 @@ modelNumbers[i] += filenumber; } for (int i = baseModelCount; i < modelCount; ++i) { + if (fileHeader != null) + setModelAuxiliaryInfo(i, "fileHeader", fileHeader); int filenumber = modelNumbers[i] / 1000000; if (filenumber != lastfilenumber) { modelnumber = 0; Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -4156,6 +4156,8 @@ if (viewer.getApplySymmetryToBonds()) htParams.put("applySymmetryToBonds", Boolean.TRUE); htParams.put("params", params); + if (viewer.getBooleanProperty("pdbGetHeader")) + htParams.put("getHeader", Boolean.TRUE); //params[0] will be a designated model number or -1 for a trajectory params[1] = (int) unitCells.x; params[2] = (int) unitCells.y; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-05-29 20:34:02 UTC (rev 9441) @@ -18,6 +18,7 @@ # show chain(s) # show sequence # show orientation moveto # just the moveTo; no comments +# set pdbGetHeader TRUE # to get the header when loading (for Protein Explorer) # # ----------------------------------------------------------------------------- Modified: trunk/Jmol/src/org/jmol/viewer/StateManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/StateManager.java 2008-05-29 14:22:24 UTC (rev 9440) +++ trunk/Jmol/src/org/jmol/viewer/StateManager.java 2008-05-29 20:34:02 UTC (rev 9441) @@ -43,21 +43,19 @@ public class StateManager { - - /* steps in adding a global variable: - - In Viewer: - - 1. add a check in setIntProperty or setBooleanProperty or setFloat.. or setString... - 2. create new set/get methods - - In StateManager - - 3. create the global.xxx variable - 4. in registerParameter() register it so that it shows up as having a value in math - - */ + + In Viewer: + + 1. add a check in setIntProperty or setBooleanProperty or setFloat.. or setString... + 2. create new set/get methods + + In StateManager + + 3. create the global.xxx variable + 4. in registerParameter() register it so that it shows up as having a value in math + + */ public final static int OBJ_BACKGROUND = 0; public final static int OBJ_AXIS1 = 1; @@ -67,22 +65,21 @@ public final static int OBJ_UNITCELL = 5; public final static int OBJ_FRANK = 6; public final static int OBJ_MAX = 7; - private final static String objectNameList = - "background axis1 axis2 axis3 boundbox unitcell frank "; - + private final static String objectNameList = "background axis1 axis2 axis3 boundbox unitcell frank "; + static int getObjectIdFromName(String name) { if (name == null) return -1; int objID = objectNameList.indexOf(name.toLowerCase()); return (objID < 0 ? objID : objID / 11); } - + static String getObjectNameFromId(int objId) { if (objId < 0 || objId >= OBJ_MAX) return null; - return objectNameList.substring(objId * 11,objId*11 + 11).trim(); + return objectNameList.substring(objId * 11, objId * 11 + 11).trim(); } - + Viewer viewer; Hashtable saved = new Hashtable(); String lastOrientation = ""; @@ -99,9 +96,9 @@ GlobalSettings getGlobalSettings() { GlobalSettings g = new GlobalSettings(); g.registerAllValues(); - return g; + return g; } - + void clear() { viewer.setShowAxes(false); viewer.setShowBbcage(false); @@ -118,10 +115,14 @@ void setCommonDefaults() { viewer.setBooleanProperty("perspectiveDepth", true); - viewer.setIntProperty("percentVdwAtom", JmolConstants.DEFAULT_PERCENT_VDW_ATOM); - viewer.setFloatProperty("bondTolerance", JmolConstants.DEFAULT_BOND_TOLERANCE); - viewer.setFloatProperty("minBondDistance", JmolConstants.DEFAULT_MIN_BOND_DISTANCE); - viewer.setIntProperty("bondRadiusMilliAngstroms", JmolConstants.DEFAULT_BOND_MILLIANGSTROM_RADIUS); + viewer.setIntProperty("percentVdwAtom", + JmolConstants.DEFAULT_PERCENT_VDW_ATOM); + viewer.setFloatProperty("bondTolerance", + JmolConstants.DEFAULT_BOND_TOLERANCE); + viewer.setFloatProperty("minBondDistance", + JmolConstants.DEFAULT_MIN_BOND_DISTANCE); + viewer.setIntProperty("bondRadiusMilliAngstroms", + JmolConstants.DEFAULT_BOND_MILLIANGSTROM_RADIUS); } void setJmolDefaults() { @@ -191,33 +192,32 @@ } String getSavedState(String saveName) { - String name = (saveName.length() > 0 ? "State_" + saveName - : lastState); + String name = (saveName.length() > 0 ? "State_" + saveName : lastState); String script = (String) saved.get(name); - return (script == null ? "" : script); + return (script == null ? "" : script); } -/* - boolean restoreState(String saveName) { - //not used -- more efficient just to run the script - String name = (saveName.length() > 0 ? "State_" + saveName - : lastState); - String script = (String) saved.get(name); - if (script == null) - return false; - viewer.script(script + CommandHistory.NOHISTORYATALL_FLAG); - return true; - } -*/ + + /* + boolean restoreState(String saveName) { + //not used -- more efficient just to run the script + String name = (saveName.length() > 0 ? "State_" + saveName + : lastState); + String script = (String) saved.get(name); + if (script == null) + return false; + viewer.script(script + CommandHistory.NOHISTORYATALL_FLAG); + return true; + } + */ void saveStructure(String saveName) { saveName = lastShape = "Shape_" + saveName; saved.put(saveName, viewer.getStructureState()); } String getSavedStructure(String saveName) { - String name = (saveName.length() > 0 ? "Shape_" + saveName - : lastShape); + String name = (saveName.length() > 0 ? "Shape_" + saveName : lastShape); String script = (String) saved.get(name); - return (script == null ? "" : script); + return (script == null ? "" : script); } void saveCoordinates(String saveName, BitSet bsSelected) { @@ -229,9 +229,9 @@ String name = (saveName.length() > 0 ? "Coordinates_" + saveName : lastCoordinates); String script = (String) saved.get(name); - return (script == null ? "" : script); + return (script == null ? "" : script); } - + void saveOrientation(String saveName) { Orientation o = new Orientation(); o.saveName = lastOrientation = "Orientation_" + saveName; @@ -272,14 +272,14 @@ center.set(viewer.getRotationCenter()); windowCenteredFlag = viewer.isWindowCentered(); rotationRadius = viewer.getRotationRadius(); - navigationMode = viewer.getNavigationMode(); + navigationMode = viewer.getNavigationMode(); if (navigationMode) { navCenter = viewer.getNavigationOffset(); xNav = viewer.getNavigationOffsetPercent('X'); yNav = viewer.getNavigationOffsetPercent('Y'); navDepth = viewer.getNavigationDepthPercent(); navCenter = viewer.getNavigationCenter(); - } + } } void restore(float timeSeconds) { @@ -322,8 +322,8 @@ Bond[] bonds = modelSet.getBonds(); for (int i = bondCount; --i >= 0;) { Bond b = bonds[i]; - connections[i] = new Connection(b.getAtomIndex1(), b.getAtomIndex2(), - b.getMad(), b.getColix(), b.getOrder(), b.getShapeVisibilityFlags()); + connections[i] = new Connection(b.getAtomIndex1(), b.getAtomIndex2(), b + .getMad(), b.getColix(), b.getOrder(), b.getShapeVisibilityFlags()); } } @@ -368,9 +368,10 @@ } static boolean isMeasurementUnit(String units) { - return Parser.isOneOf(units.toLowerCase(),"angstroms;au;bohr;nanometers;nm;picometers;pm"); + return Parser.isOneOf(units.toLowerCase(), + "angstroms;au;bohr;nanometers;nm;picometers;pm"); } - + class GlobalSettings { /* @@ -389,13 +390,12 @@ } Hashtable listVariables = new Hashtable(); - + void clear() { Enumeration e = htUserVariables.keys(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); - if (key.charAt(0) == '@' - || key.startsWith("site_")) + if (key.charAt(0) == '@' || key.startsWith("site_")) htUserVariables.remove(key); } @@ -421,35 +421,36 @@ name = name.toLowerCase(); return (listVariables.containsKey(name) ? listVariables.get(name) : value); } - + //lighting (see Graphics3D.Shade3D - - int ambientPercent = 45; - int diffusePercent = 84; - boolean specular = true; + + int ambientPercent = 45; + int diffusePercent = 84; + boolean specular = true; int specularExponent = 6; - int specularPercent = 22; - int specularPower = 40; + int specularPercent = 22; + int specularPower = 40; //file loading - boolean allowEmbeddedScripts = true; - boolean appendNew = true; - String appletProxy = ""; - boolean applySymmetryToBonds = false; //new 11.1.29 - boolean autoBond = true; - short bondRadiusMilliAngstroms = JmolConstants.DEFAULT_BOND_MILLIANGSTROM_RADIUS; - float bondTolerance = JmolConstants.DEFAULT_BOND_TOLERANCE; - String defaultLoadScript = ""; - String defaultDirectory = ""; - boolean forceAutoBond = false; - char inlineNewlineChar = '|'; //pseudo static - String loadFormat = "http://www.rcsb.org/pdb/files/%FILE.pdb"; - float minBondDistance = JmolConstants.DEFAULT_MIN_BOND_DISTANCE; - boolean pdbSequential = false; // true for no bonding check - int percentVdwAtom = JmolConstants.DEFAULT_PERCENT_VDW_ATOM; - boolean smartAromatic = true; - boolean zeroBasedXyzRasmol = false; + boolean allowEmbeddedScripts = true; + boolean appendNew = true; + String appletProxy = ""; + boolean applySymmetryToBonds = false; //new 11.1.29 + boolean autoBond = true; + short bondRadiusMilliAngstroms = JmolConstants.DEFAULT_BOND_MILLIANGSTROM_RADIUS; + float bondTolerance = JmolConstants.DEFAULT_BOND_TOLERANCE; + String defaultLoadScript = ""; + String defaultDirectory = ""; + boolean forceAutoBond = false; + char inlineNewlineChar = '|'; //pseudo static + String loadFormat = "http://www.rcsb.org/pdb/files/%FILE.pdb"; + float minBondDistance = JmolConstants.DEFAULT_MIN_BOND_DISTANCE; + boolean pdbGetHeader = false; // true to get PDB header in auxiliary info + boolean pdbSequential = false; // true for no bonding check + int percentVdwAtom = JmolConstants.DEFAULT_PERCENT_VDW_ATOM; + boolean smartAromatic = true; + boolean zeroBasedXyzRasmol = false; /** * these settings are determined when the file is loaded and are @@ -488,6 +489,7 @@ appendCmd(str, "set loadFormat " + Escape.escape(loadFormat)); appendCmd(str, "set minBondDistance " + minBondDistance); appendCmd(str, "set pdbSequential " + pdbSequential); + appendCmd(str, "set pdbGetHeader " + pdbGetHeader); appendCmd(str, "set percentVdwAtom " + percentVdwAtom); appendCmd(str, "set smartAromatic " + smartAromatic); if (zeroBasedXyzRasmol) @@ -500,7 +502,7 @@ void setDefaultLattice(Point3f ptLattice) { ptDefaultLattice.set(ptLattice); } - + Point3f getDefaultLatticePoint() { return ptDefaultLattice; } @@ -516,9 +518,9 @@ //centering and perspective boolean allowRotateSelected = false; - boolean perspectiveDepth = true; - int stereoDegrees = 5; - float visualRange = 5f; + boolean perspectiveDepth = true; + int stereoDegrees = 5; + float visualRange = 5f; //solvent @@ -526,128 +528,127 @@ //measurements - String defaultAngleLabel = "%VALUE %UNITS"; + String defaultAngleLabel = "%VALUE %UNITS"; String defaultDistanceLabel = "%VALUE %UNITS"; //also %_ and %a1 %a2 %m1 %m2, etc. - String defaultTorsionLabel = "%VALUE %UNITS"; + String defaultTorsionLabel = "%VALUE %UNITS"; boolean justifyMeasurements = false; - boolean measureAllModels = false; + boolean measureAllModels = false; // minimization // 11.5.21 03/2008 - - int minimizationSteps = 100; + + int minimizationSteps = 100; boolean minimizationRefresh = true; - float minimizationCriterion = 0.001f; - + float minimizationCriterion = 0.001f; + //rendering - boolean antialiasDisplay = false; - boolean antialiasImages = true; - boolean antialiasTranslucent = true; - boolean displayCellParameters = true; - boolean dotsSelectedOnly = false; - boolean dotSurface = true; - boolean dynamicMeasurements = false; - boolean greyscaleRendering = false; + boolean antialiasDisplay = false; + boolean antialiasImages = true; + boolean antialiasTranslucent = true; + boolean displayCellParameters = true; + boolean dotsSelectedOnly = false; + boolean dotSurface = true; + boolean dynamicMeasurements = false; + boolean greyscaleRendering = false; boolean isosurfacePropertySmoothing = true; - boolean showHiddenSelectionHalos = false; - boolean showMeasurements = true; - boolean zoomLarge = true; //false would be like Chime - boolean zShade = false; - + boolean showHiddenSelectionHalos = false; + boolean showMeasurements = true; + boolean zoomLarge = true; //false would be like Chime + boolean zShade = false; + //atoms and bonds - boolean bondModeOr = false; - boolean hbondsBackbone = false; - boolean hbondsSolid = false; - byte modeMultipleBond = JmolConstants.MULTIBOND_NOTSMALL; - boolean showHydrogens = true; - boolean showMultipleBonds = true; - boolean ssbondsBackbone = false; + boolean bondModeOr = false; + boolean hbondsBackbone = false; + boolean hbondsSolid = false; + byte modeMultipleBond = JmolConstants.MULTIBOND_NOTSMALL; + boolean showHydrogens = true; + boolean showMultipleBonds = true; + boolean ssbondsBackbone = false; //secondary structure + Rasmol - boolean cartoonRockets = false; - boolean chainCaseSensitive = false; - int hermiteLevel = 0; - boolean highResolutionFlag = false; - boolean rangeSelected = false; + boolean cartoonRockets = false; + boolean chainCaseSensitive = false; + int hermiteLevel = 0; + boolean highResolutionFlag = false; + boolean rangeSelected = false; boolean rasmolHydrogenSetting = true; - boolean rasmolHeteroSetting = true; - int ribbonAspectRatio = 16; - boolean ribbonBorder = false; - boolean rocketBarrels = false; - float sheetSmoothing = 1; // 0: traceAlpha on alphas for helix, 1 on midpoints - boolean traceAlpha = true; + boolean rasmolHeteroSetting = true; + int ribbonAspectRatio = 16; + boolean ribbonBorder = false; + boolean rocketBarrels = false; + float sheetSmoothing = 1; // 0: traceAlpha on alphas for helix, 1 on midpoints + boolean traceAlpha = true; //misc - int animationFps = 10; - boolean autoFps = false; - int axesMode = JmolConstants.AXES_MODE_BOUNDBOX; - float axesScale = 2; - float cameraDepth = 3.0f; - String dataSeparator = "~~~"; - boolean debugScript = false; - float defaultDrawArrowScale = 0.5f; - float defaultTranslucent = 0.5f; - int delayMaximumMs = 0; - float dipoleScale = 1.0f; - boolean disablePopupMenu = false; - boolean drawPicking = false; - String helpPath = JmolConstants.DEFAULT_HELP_PATH; - boolean fontScaling = false; - boolean hideNameInPopup = false; - int hoverDelayMs = 500; - boolean measurementLabels = true; - boolean messageStyleChime = false; - int pickingSpinRate = 10; - String propertyColorScheme = "roygb"; - String quaternionFrame = "c"; - float solventProbeRadius = 1.2f; - int scriptDelay = 0; - boolean statusReporting = true; - int strandCountForStrands = 5; - int strandCountForMeshRibbon = 7; - boolean useNumberLocalization = true; - float vectorScale = 1f; - float vibrationPeriod = 1f; - float vibrationScale = 1f; - boolean wireframeRotation = false; - + int animationFps = 10; + boolean autoFps = false; + int axesMode = JmolConstants.AXES_MODE_BOUNDBOX; + float axesScale = 2; + float cameraDepth = 3.0f; + String dataSeparator = "~~~"; + boolean debugScript = false; + float defaultDrawArrowScale = 0.5f; + float defaultTranslucent = 0.5f; + int delayMaximumMs = 0; + float dipoleScale = 1.0f; + boolean disablePopupMenu = false; + boolean drawPicking = false; + String helpPath = JmolConstants.DEFAULT_HELP_PATH; + boolean fontScaling = false; + boolean hideNameInPopup = false; + int hoverDelayMs = 500; + boolean measurementLabels = true; + boolean messageStyleChime = false; + int pickingSpinRate = 10; + String propertyColorScheme = "roygb"; + String quaternionFrame = "c"; + float solventProbeRadius = 1.2f; + int scriptDelay = 0; + boolean statusReporting = true; + int strandCountForStrands = 5; + int strandCountForMeshRibbon = 7; + boolean useNumberLocalization = true; + float vectorScale = 1f; + float vibrationPeriod = 1f; + float vibrationScale = 1f; + boolean wireframeRotation = false; + // window - - boolean hideNavigationPoint = false; - boolean navigationMode = false; - boolean navigationPeriodic = false; - float navigationSpeed = 5; - boolean showNavigationPointAlways = false; - String stereoState = null; + boolean hideNavigationPoint = false; + boolean navigationMode = false; + boolean navigationPeriodic = false; + float navigationSpeed = 5; + boolean showNavigationPointAlways = false; + String stereoState = null; + // special persistent object characteristics -- bbcage, uccage, axes: - - int[] objColors = new int[OBJ_MAX]; - boolean[] objStateOn = new boolean[OBJ_MAX]; - int[] objMad = new int[OBJ_MAX]; - - boolean ellipsoidAxes = false; - boolean ellipsoidDots = false; - boolean ellipsoidArcs = false; - boolean ellipsoidFill = false; - boolean ellipsoidBall = true; - - int ellipsoidDotCount = 200; - float ellipsoidAxisDiameter = 0.02f; - + int[] objColors = new int[OBJ_MAX]; + boolean[] objStateOn = new boolean[OBJ_MAX]; + int[] objMad = new int[OBJ_MAX]; + + boolean ellipsoidAxes = false; + boolean ellipsoidDots = false; + boolean ellipsoidArcs = false; + boolean ellipsoidFill = false; + boolean ellipsoidBall = true; + + int ellipsoidDotCount = 200; + float ellipsoidAxisDiameter = 0.02f; + String getWindowState(StringBuffer sfunc) { StringBuffer str = new StringBuffer(); if (sfunc != null) { - sfunc.append(" initialize;\n set refreshing false;\n _setWindowState;\n"); + sfunc + .append(" initialize;\n set refreshing false;\n _setWindowState;\n"); str.append("\nfunction _setWindowState();\n"); } - str.append("# height " - + viewer.getScreenHeight() + ";\n# width " + viewer.getScreenWidth() - + ";\n"); + str.append("# height " + viewer.getScreenHeight() + ";\n# width " + + viewer.getScreenWidth() + ";\n"); appendCmd(str, "stateVersion = " + getParameter("_version")); for (int i = 0; i < OBJ_MAX; i++) if (objColors[i] != 0) @@ -671,7 +672,7 @@ appendCmd(str, "specularPower = " + Graphics3D.getSpecularPower()); appendCmd(str, "specularExponent = " + Graphics3D.getSpecularExponent()); return str.toString(); - } + } //testing @@ -683,6 +684,7 @@ //controlled access: private String measureDistanceUnits = "nanometers"; + void setMeasureDistanceUnits(String units) { if (units.equalsIgnoreCase("angstroms")) measureDistanceUnits = "angstroms"; @@ -692,60 +694,60 @@ else if (units.equalsIgnoreCase("picometers") || units.equalsIgnoreCase("pm")) measureDistanceUnits = "picometers"; - else if (units.equalsIgnoreCase("bohr") - || units.equalsIgnoreCase("au")) + else if (units.equalsIgnoreCase("bohr") || units.equalsIgnoreCase("au")) measureDistanceUnits = "au"; setParameterValue("measurementUnits", measureDistanceUnits); } - + String getMeasureDistanceUnits() { return measureDistanceUnits; } - + Hashtable htParameterValues; Hashtable htPropertyFlags; Hashtable htPropertyFlagsRemoved; - final static String unreportedProperties = - //these are handled individually in terms of reporting for the state - //NOT EXCLUDING the load state settings, because although we - //handle these specially for the CURRENT FILE, their current - //settings won't be reflected in the load state, which is determined - //earlier, when the file loads. - // - //place any parameter here you do NOT want to have in the state - // - // _xxxxx variables are automatically exempt - // - //this is a final static String. MAKE SURE ALL ENTRIES ARE LOWERCASE! - // - ";ambientpercent;animationfps" + - ";antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor" + - ";axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color" + - ";axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth" + - ";debugscript;defaultlatttice;defaults;diffusepercent;exportdrivers" + - ";fontscaling;language;loglevel;measureStyleChime" + - ";minimizationsteps;minimizationrefresh;minimizationcriterion;navigationmode" + - ";perspectivedepth;visualrange;perspectivemodel;refreshing;rotationradius" + - ";showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showunitcell" + - ";slabenabled;specular;specularexponent;specularpercent;specularpower;stateversion" + - ";statusreporting;stereo;stereostate" + - ";unitcellcolor;windowcentered;zerobasedxyzrasmol;zoomenabled;" + - // saved in the hash table but not considered part of the state: - ";scriptqueue;scriptreportinglevel;syncscript;syncmouse" + - // more settable Jmol variables - ";ambient;bonds;colorrasmol;diffuse;drawhover;frank;hetero;hidenotselected" + - ";hoverlabel;hydrogen;languagetranslation;measurementunits;navigationdepth;navigationslab" + - ";picking;pickingstyle;propertycolorschemeoverload;radius;rgbblue;rgbgreen;rgbred" + - ";scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount" + - ";spinx;spiny;spinz;spinfps" + - ";animframecallback;loadstructcallback;messagecallback;minimizationcallback;hovercallback" + - ";resizecallback;pickcallback;synccallback" + - ";undo;"; - + final static String unreportedProperties = + //these are handled individually in terms of reporting for the state + //NOT EXCLUDING the load state settings, because although we + //handle these specially for the CURRENT FILE, their current + //settings won't be reflected in the load state, which is determined + //earlier, when the file loads. + // + //place any parameter here you do NOT want to have in the state + // + // _xxxxx variables are automatically exempt + // + //this is a final static String. MAKE SURE ALL ENTRIES ARE LOWERCASE! + // + ";ambientpercent;animationfps" + + ";antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor" + + ";axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color" + + ";axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth" + + ";debugscript;defaultlatttice;defaults;diffusepercent;exportdrivers" + + ";fontscaling;language;loglevel;measureStyleChime" + + ";minimizationsteps;minimizationrefresh;minimizationcriterion;navigationmode" + + ";perspectivedepth;visualrange;perspectivemodel;refreshing;rotationradius" + + ";showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showunitcell" + + ";slabenabled;specular;specularexponent;specularpercent;specularpower;stateversion" + + ";statusreporting;stereo;stereostate" + + ";unitcellcolor;windowcentered;zerobasedxyzrasmol;zoomenabled;" + + + // saved in the hash table but not considered part of the state: + ";scriptqueue;scriptreportinglevel;syncscript;syncmouse" + + + // more settable Jmol variables + ";ambient;bonds;colorrasmol;diffuse;drawhover;frank;hetero;hidenotselected" + + ";hoverlabel;hydrogen;languagetranslation;measurementunits;navigationdepth;navigationslab" + + ";picking;pickingstyle;propertycolorschemeoverload;radius;rgbblue;rgbgreen;rgbred" + + ";scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount" + + ";spinx;spiny;spinz;spinfps" + + ";animframecallback;loadstructcallback;messagecallback;minimizationcallback;hovercallback" + + ";resizecallback;pickcallback;synccallback" + ";undo;"; + boolean isJmolVariable(String key) { return key.charAt(0) == '_' - || htParameterValues.containsKey(key = key.toLowerCase()) + || htParameterValues.containsKey(key = key.toLowerCase()) || htPropertyFlags.containsKey(key) || unreportedProperties.indexOf(";" + key + ";") >= 0; } @@ -754,7 +756,7 @@ name = name.toLowerCase(); if (htParameterValues.containsKey(name)) return; // don't allow setting boolean of a numeric - htPropertyFlags.put(name, value ? Boolean.TRUE : Boolean.FALSE); + htPropertyFlags.put(name, value ? Boolean.TRUE : Boolean.FALSE); } void setParameterValue(String name, int value) { @@ -763,7 +765,7 @@ return; // don't allow setting numeric of a boolean htParameterValues.put(name, new Integer(value)); } - + void setParameterValue(String name, float value) { name = name.toLowerCase(); if (Float.isNaN(value)) { @@ -775,14 +777,14 @@ return; // don't allow setting numeric of a boolean htParameterValues.put(name, new Float(value)); } - + void setParameterValue(String name, String value) { name = name.toLowerCase(); if (value == null || htPropertyFlags.containsKey(name)) return; // don't allow setting string of a boolean htParameterValues.put(name, value); } - + void removeJmolParameter(String key) { if (htPropertyFlags.containsKey(key)) { htPropertyFlags.remove(key); @@ -791,10 +793,11 @@ return; } if (htParameterValues.containsKey(key)) - htParameterValues.remove(key); + htParameterValues.remove(key); } Hashtable htUserVariables = new Hashtable(); + void setUserVariable(String key, Token value) { key = key.toLowerCase(); if (value == null) { @@ -809,15 +812,15 @@ } htUserVariables.put(key, value); } - + void removeUserVariable(String key) { - htUserVariables.remove(key); + htUserVariables.remove(key); } - + Object getUserParameterValue(String key) { - return htUserVariables.get(key); + return htUserVariables.get(key); } - + String getParameterEscaped(String name, int nMax) { name = name.toLowerCase(); if (htParameterValues.containsKey(name)) { @@ -850,9 +853,9 @@ return "" + token.intValue; default: return escapeVariable(name, token.value); - } + } } - + Object getParameter(String name) { name = name.toLowerCase(); if (name.equals("_memory")) { @@ -887,8 +890,8 @@ e = htPropertyFlags.keys(); while (e.hasMoreElements()) { key = (String) e.nextElement(); - if (prefix == null - || key.indexOf(prefix) == 0 || key.indexOf(_prefix) == 0) + if (prefix == null || key.indexOf(prefix) == 0 + || key.indexOf(_prefix) == 0) list[n++] = (key.indexOf("_") == 0 ? key + " = " : "set " + key + " ") + htPropertyFlags.get(key); } @@ -897,8 +900,8 @@ while (e.hasMoreElements()) { key = (String) e.nextElement(); if (key.charAt(0) != '@' - && (prefix == null - || key.indexOf(prefix) == 0 || key.indexOf(_prefix) == 0)) { + && (prefix == null || key.indexOf(prefix) == 0 || key + .indexOf(_prefix) == 0)) { Object value = htParameterValues.get(key); if (value instanceof String) value = Escape.escape((String) value); @@ -913,7 +916,7 @@ commands.append("\n"); return commands.toString(); } - + String getState(StringBuffer sfunc) { int n = 0; String[] list = new String[htPropertyFlags.size() @@ -983,9 +986,9 @@ list = new String[htUserVariables.size()]; while (e.hasMoreElements()) list[n++] = (key = (String) e.nextElement()) - + (key.charAt(0) == '@' - ? " " + Token.sValue((Token) htUserVariables.get(key)) - : " = " + escapeUserVariable(key)); + + (key.charAt(0) == '@' ? " " + + Token.sValue((Token) htUserVariables.get(key)) : " = " + + escapeUserVariable(key)); Arrays.sort(list, 0, n); for (int i = 0; i < n; i++) @@ -993,19 +996,21 @@ appendCmd(commands, list[i]); if (n == 0) commands.append("# --none--;\n"); - + // label defaults viewer.loadShape(JmolConstants.SHAPE_LABELS); - commands.append(viewer.getShapeProperty(JmolConstants.SHAPE_LABELS, "defaultState")); + commands.append(viewer.getShapeProperty(JmolConstants.SHAPE_LABELS, + "defaultState")); if (sfunc != null) commands.append("\nend function;\n\n"); return commands.toString(); } - + private boolean doReportProperty(String name) { - return (name.charAt(0) != '_' && unreportedProperties.indexOf(";" + name + ";") < 0); + return (name.charAt(0) != '_' && unreportedProperties.indexOf(";" + name + + ";") < 0); } private String escapeVariable(String name, Object value) { @@ -1016,7 +1021,7 @@ return Escape.escape(value); return Escape.escape((String[]) var.value); } - + void registerAllValues() { htParameterValues = new Hashtable(); htPropertyFlags = new Hashtable(); @@ -1025,173 +1030,175 @@ // some of these are just placeholders so that the math processor // knows they are Jmol variables. They are held by other managers - setParameterValue("hoverLabel",""); - setParameterValue("rotationRadius",0); - setParameterValue("scriptqueue",true); + setParameterValue("hoverLabel", ""); + setParameterValue("rotationRadius", 0); + setParameterValue("scriptqueue", true); - setParameterValue("_version",0); - setParameterValue("stateversion",0); + setParameterValue("_version", 0); + setParameterValue("stateversion", 0); setParameterValue("animFrameCallback", ""); setParameterValue("loadStructCallback", ""); setParameterValue("messageCallback", ""); setParameterValue("hoverCallback", ""); setParameterValue("resizeCallback", ""); setParameterValue("pickCallback", ""); - setParameterValue("allowEmbeddedScripts",allowEmbeddedScripts); - setParameterValue("allowRotateSelected",allowRotateSelected); - setParameterValue("ambientPercent",ambientPercent); - setParameterValue("animationFps",animationFps); - setParameterValue("antialiasImages",antialiasImages); - setParameterValue("antialiasDisplay",antialiasDisplay); - setParameterValue("antialiasTranslucent",antialiasTranslucent); - setParameterValue("appendNew",appendNew); - setParameterValue("appletProxy",appletProxy); - setParameterValue("applySymmetryToBonds",applySymmetryToBonds); - setParameterValue("autoBond",autoBond); - setParameterValue("autoFps",autoFps); - setParameterValue("axesMode",axesMode); - setParameterValue("axesScale",axesScale); + setParameterValue("allowEmbeddedScripts", allowEmbeddedScripts); + setParameterValue("allowRotateSelected", allowRotateSelected); + setParameterValue("ambientPercent", ambientPercent); + setParameterValue("animationFps", animationFps); + setParameterValue("antialiasImages", antialiasImages); + setParameterValue("antialiasDisplay", antialiasDisplay); + setParameterValue("antialiasTranslucent", antialiasTranslucent); + setParameterValue("appendNew", appendNew); + setParameterValue("appletProxy", appletProxy); + setParameterValue("applySymmetryToBonds", applySymmetryToBonds); + setParameterValue("autoBond", autoBond); + setParameterValue("autoFps", autoFps); + setParameterValue("axesMode", axesMode); + setParameterValue("axesScale", axesScale); setParameterValue("axesWindow", true); setParameterValue("axesMolecular", false); setParameterValue("axesUnitcell", false); setParameterValue("axesOrientationRasmol", false); setParameterValue("backgroundModel", 0); - setParameterValue("bondModeOr",bondModeOr); - setParameterValue("bondRadiusMilliAngstroms",bondRadiusMilliAngstroms); - setParameterValue("bondTolerance",bondTolerance); - setParameterValue("cameraDepth",cameraDepth); - setParameterValue("cartoonRockets",cartoonRockets); - setParameterValue("chainCaseSensitive",chainCaseSensitive); - setParameterValue("colorRasmol",false); - setParameterValue("dataSeparator",dataSeparator); - setParameterValue("debugScript",debugScript); - setParameterValue("defaultLattice","{0 0 0}"); - setParameterValue("defaultAngleLabel",defaultAngleLabel); - setParameterValue("defaultColorScheme","Jmol"); - setParameterValue("defaultDrawArrowScale",defaultDrawArrowScale); - setParameterValue("defaultDirectory",defaultDirectory); - setParameterValue("defaultDistanceLabel",defaultDistanceLabel); - setParameterValue("defaultLoadScript",defaultLoadScript); + setParameterValue("bondModeOr", bondModeOr); + setParameterValue("bondRadiusMilliAngstroms", bondRadiusMilliAngstroms); + setParameterValue("bondTolerance", bondTolerance); + setParameterValue("cameraDepth", cameraDepth); + setParameterValue("cartoonRockets", cartoonRockets); + setParameterValue("chainCaseSensitive", chainCaseSensitive); + setParameterValue("colorRasmol", false); + setParameterValue("dataSeparator", dataSeparator); + setParameterValue("debugScript", debugScript); + setParameterValue("defaultLattice", "{0 0 0}"); + setParameterValue("defaultAngleLabel", defaultAngleLabel); + setParameterValue("defaultColorScheme", "Jmol"); + setParameterValue("defaultDrawArrowScale", defaultDrawArrowScale); + setParameterValue("defaultDirectory", defaultDirectory); + setParameterValue("defaultDistanceLabel", defaultDistanceLabel); + setParameterValue("defaultLoadScript", defaultLoadScript); setParameterValue("defaults", "Jmol"); setParameterValue("defaultVDW", "Jmol"); - setParameterValue("defaultTorsionLabel",defaultTorsionLabel); - setParameterValue("defaultTranslucent",defaultTranslucent); + setParameterValue("defaultTorsionLabel", defaultTorsionLabel); + setParameterValue("defaultTranslucent", defaultTranslucent); setParameterValue("delayMaximumMs", delayMaximumMs); - setParameterValue("diffusePercent",diffusePercent); + setParameterValue("diffusePercent", diffusePercent); setParameterValue("dipoleScale", dipoleScale); - setParameterValue("disablePopupMenu",disablePopupMenu); - setParameterValue("displayCellParameters",displayCellParameters); - setParameterValue("dotsSelectedOnly",dotsSelectedOnly); - setParameterValue("dotSurface",dotSurface); - setParameterValue("drawHover",false); - setParameterValue("drawPicking",drawPicking); - setParameterValue("dynamicMeasurements",dynamicMeasurements); + setParameterValue("disablePopupMenu", disablePopupMenu); + setParameterValue("displayCellParameters", displayCellParameters); + setParameterValue("dotsSelectedOnly", dotsSelectedOnly); + setParameterValue("dotSurface", dotSurface); + setParameterValue("drawHover", false); + setParameterValue("drawPicking", drawPicking); + setParameterValue("dynamicMeasurements", dynamicMeasurements); setParameterValue("ellipsoidArcs", ellipsoidArcs); setParameterValue("ellipsoidAxes", ellipsoidAxes); setParameterValue("ellipsoidAxisDiameter", ellipsoidAxisDiameter); - setParameterValue("ellipsoidBall", ellipsoidBall); + setParameterValue("ellipsoidBall", ellipsoidBall); setParameterValue("ellipsoidDotCount", ellipsoidDotCount); setParameterValue("ellipsoidDots", ellipsoidDots); setParameterValue("ellipsoidFill", ellipsoidFill); setParameterValue("exportDrivers", JmolConstants.EXPORT_DRIVER_LIST); - setParameterValue("fontScaling",fontScaling); - setParameterValue("forceAutoBond",forceAutoBond); - setParameterValue("greyscaleRendering",greyscaleRendering); - setParameterValue("hbondsBackbone",hbondsBackbone); - setParameterValue("hbondsSolid",hbondsSolid); - setParameterValue("helpPath",helpPath); - setParameterValue("hermiteLevel",hermiteLevel); - setParameterValue("hideNameInPopup",hideNameInPopup); - setParameterValue("hideNavigationPoint",hideNavigationPoint); - setParameterValue("hideNotSelected",false); // saved in selectionManager - setParameterValue("highResolution",highResolutionFlag); + setParameterValue("fontScaling", fontScaling); + setParameterValue("forceAutoBond", forceAutoBond); + setParameterValue("greyscaleRendering", greyscaleRendering); + setParameterValue("hbondsBackbone", hbondsBackbone); + setParameterValue("hbondsSolid", hbondsSolid); + setParameterValue("helpPath", helpPath); + setParameterValue("hermiteLevel", hermiteLevel); + setParameterValue("hideNameInPopup", hideNameInPopup); + setParameterValue("hideNavigationPoint", hideNavigationPoint); + setParameterValue("hideNotSelected", false); // saved in selectionManager + setParameterValue("highResolution", highResolutionFlag); setParameterValue("historyLevel", 0); - setParameterValue("hoverDelay",hoverDelayMs/1000f); - setParameterValue("isosurfacePropertySmoothing", isosurfacePropertySmoothing); - setParameterValue("justifyMeasurements",justifyMeasurements); - setParameterValue("loadFormat",loadFormat); - setParameterValue("measureAllModels",measureAllModels); - setParameterValue("measurementLabels",measurementLabels=true); + setParameterValue("hoverDelay", hoverDelayMs / 1000f); + setParameterValue("isosurfacePropertySmoothing", + isosurfacePropertySmoothing); + setParameterValue("justifyMeasurements", justifyMeasurements); + setParameterValue("loadFormat", loadFormat); + setParameterValue("measureAllModels", measureAllModels); + setParameterValue("measurementLabels", measurementLabels = true); setParameterValue("measurementUnits", measureDistanceUnits); setParameterValue("messageStyleChime", messageStyleChime); - setParameterValue("minBondDistance",minBondDistance); - setParameterValue("minimizationSteps",minimizationSteps); - setParameterValue("minimizationRefresh",minimizationRefresh); - setParameterValue("minimizationCriterion",minimizationCriterion); - setParameterValue("navigationMode",navigationMode); - setParameterValue("navigationPeriodic",navigationPeriodic); - setParameterValue("navigationDepth",0); - setParameterValue("navigationSlab",0); - setParameterValue("navigationSpeed",navigationSpeed); + setParameterValue("minBondDistance", minBondDistance); + setParameterValue("minimizationSteps", minimizationSteps); + setParameterValue("minimizationRefresh", minimizationRefresh); + setParameterValue("minimizationCriterion", minimizationCriterion); + setParameterValue("navigationMode", navigationMode); + setParameterValue("navigationPeriodic", navigationPeriodic); + setParameterValue("navigationDepth", 0); + setParameterValue("navigationSlab", 0); + setParameterValue("navigationSpeed", navigationSpeed); + setParameterValue("pdbGetHeader", pdbGetHeader); // new 11.5.39 setParameterValue("pdbSequential", pdbSequential); // new 11.5.39 - setParameterValue("perspectiveModel",11); - setParameterValue("perspectiveDepth",perspectiveDepth); - setParameterValue("percentVdwAtom",percentVdwAtom); - setParameterValue("picking","ident"); - setParameterValue("pickingSpinRate",pickingSpinRate); - setParameterValue("pickingStyle","toggle"); - setParameterValue("propertyColorScheme",propertyColorScheme); - setParameterValue("propertyDataField",0); - setParameterValue("propertyAtomNumberField",0); - setParameterValue("quaternionFrame",quaternionFrame); - setParameterValue("rangeSelected",rangeSelected); - setParameterValue("refreshing",true); - setParameterValue("ribbonAspectRatio",ribbonAspectRatio); - setParameterValue("ribbonBorder",ribbonBorder); - setParameterValue("rocketBarrels",rocketBarrels); - setParameterValue("scaleAngstromsPerInch",0); - setParameterValue("scriptReportingLevel",0); - setParameterValue("selectionHalos",false); - setParameterValue("selectHetero",rasmolHeteroSetting); - setParameterValue("selectHydrogen",rasmolHydrogenSetting); - setParameterValue("sheetSmoothing",sheetSmoothing); - setParameterValue("showaxes",false); - setParameterValue("showboundbox",false); - setParameterValue("showfrank",false); - setParameterValue("showHiddenSelectionHalos",showHiddenSelectionHalos); - setParameterValue("showHydrogens",showHydrogens); - setParameterValue("showMeasurements",showMeasurements); - setParameterValue("showMultipleBonds",showMultipleBonds); - setParameterValue("showNavigationPointAlways",showNavigationPointAlways); - setParameterValue("showScript",scriptDelay); - setParameterValue("showUnitcell",false); - setParameterValue("slabEnabled",false); - setParameterValue("smartAromatic",smartAromatic); - setParameterValue("solventProbe",solventOn); - setParameterValue("solventProbeRadius",solventProbeRadius); - setParameterValue("specular",specular); - setParameterValue("specularExponent",specularExponent); - setParameterValue("specularPercent",specularPercent); - setParameterValue("specularPower",specularPower); + setParameterValue("perspectiveModel", 11); + setParameterValue("perspectiveDepth", perspectiveDepth); + setParameterValue("percentVdwAtom", percentVdwAtom); + setParameterValue("picking", "ident"); + setParameterValue("pickingSpinRate", pickingSpinRate); + setParameterValue("pickingStyle", "toggle"); + setParameterValue("propertyColorScheme", propertyColorScheme); + setParameterValue("propertyDataField", 0); + setParameterValue("propertyAtomNumberField", 0); + setParameterValue("quaternionFrame", quaternionFrame); + setParameterValue("rangeSelected", rangeSelected); + setParameterValue("refreshing", true); + setParameterValue("ribbonAspectRatio", ribbonAspectRatio); + setParameterValue("ribbonBorder", ribbonBorder); + setParameterValue("rocketBarrels", rocketBarrels); + setParameterValue("scaleAngstromsPerInch", 0); + setParameterValue("scriptReportingLevel", 0); + setParameterValue("selectionHalos", false); + setParameterValue("selectHetero", rasmolHeteroSetting); + setParameterValue("selectHydrogen", rasmolHydrogenSetting); + setParameterValue("sheetSmoothing", sheetSmoothing); + setParameterValue("showaxes", false); + setParameterValue("showboundbox", false); + setParameterValue("showfrank", false); + setParameterValue("showHiddenSelectionHalos", showHiddenSelectionHalos); + setParameterValue("showHydrogens", showHydrogens); + setParameterValue("showMeasurements", showMeasurements); + setParameterValue("showMultipleBonds", showMultipleBonds); + setParameterValue("showNavigationPointAlways", showNavigationPointAlways); + setParameterValue("showScript", scriptDelay); + setParameterValue("showUnitcell", false); + setParameterValue("slabEnabled", false); + setParameterValue("smartAromatic", smartAromatic); + setParameterValue("solventProbe", solventOn); + setParameterValue("solventProbeRadius", solventProbeRadius); + setParameterValue("specular", specular); + setParameterValue("specularExponent", specularExponent); + setParameterValue("specularPercent", specularPercent); + setParameterValue("specularPower", specularPower); setParameterValue("spinX", 0); setParameterValue("spinY", 30); setParameterValue("spinZ", 0); setParameterValue("spinFps", 30); - setParameterValue("ssbondsBackbone",ssbondsBackbone); - setParameterValue("stereoDegrees",stereoDegrees); - setParameterValue("statusReporting",statusReporting); - setParameterValue("strandCount",strandCountForStrands); - setParameterValue("strandCountForStrands",strandCountForStrands); - setParameterValue("strandCountForMeshRibbon",strandCountForMeshRibbon); - setParameterValue("syncMouse",false); - setParameterValue("syncScript",false); - setParameterValue("testFlag1",testFlag1); - setParameterValue("testFlag2",testFlag2); - setParameterValue("testFlag3",testFlag3); - setParameterValue("testFlag4",testFlag4); - setParameterValue("traceAlpha",traceAlpha); - setParameterValue("undo",true); - setParameterValue("useNumberLocalization",useNumberLocalization); - setParameterValue("vectorScale",vectorScale); - setParameterValue("vibrationPeriod",vibrationPeriod); - setParameterValue("vibrationScale",vibrationScale); - setParameterValue("visualRange",visualRange); - setParameterValue("windowCentered",true); - ... [truncated message content] |