Class Viewer
java.lang.Object
org.jmol.api.JmolViewer
org.jmol.viewer.Viewer
- All Implemented Interfaces:
PlatformViewer, AtomDataServer
- Direct Known Subclasses:
NMR_Viewer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanstatic Stringstatic Stringstatic Stringbooleanintbooleanbooleanintbooleanbooleanbooleanbooleanbooleandetermined by GraphicsEnvironment.isHeadless() from java -Djava.awt.headless=true disables command threading disables DELAY, TIMEOUT, PAUSE, LOOP, GOTO, SPIN, ANIMATION ON turns SPIN into just ROTATE floatbooleanstatic booleanadjustablestatic final booleanlegacy Jmolbooleanstatic booleanbooleanbooleanbooleanbooleanbooleanstatic booleanbooleanbooleanbooleanstatic JmolToJSmolInterfacestatic Stringbooleanstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intorg.jmol.viewer.ModelManagerstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intbooleanbooleanstatic intstatic final booleanbooleanstatic final intstatic final intstatic final intstatic final intstatic final intbooleanintstatic Stringstatic Stringstatic Stringstatic final Stringstatic final StringbooleanintFields inherited from class JmolViewer
apiPlatform, menuStructure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(String command) Adds one or more commands to the command historyvoidaddFunction(JmolScriptFunction function) addHydrogens(BS bsAtoms, int flags) / requiring ScriptEvaluator:voidaddSelectionListener(JmolSelectionListener listener) addStateScript(String script, boolean addFrameNumber, boolean postDefinitions) voidaddUnitCellOffset(P3 pt) voidprotected static JmolViewerallocateViewer(Object display, JmolAdapter modelAdapter, String fullName, URL documentBase, URL codeBase, String commandOptions, JmolStatusListener statusListener, GenericPlatform implementedPlatform) old way...STR[]allocTempEnum(int size) P3[]allocTempPoints(int size) P3i[]allocTempScreens(int size) booleanbooleanbooleanvoidautoCalculate(int tokProperty, String dataType) intvoidbindAction(String desc, String name) bsA()voidintcacheFileByName(String fileName, boolean isAdd) voidJSInterface -- allows saving files in memory for later retrievalvoidcalcAtomsMinMax(BS bs, BoxInfo boxInfo) voidcalcBoundBoxDimensions(BS bs, float scale) calculateChirality(BS bsAtoms) String[]calculateChiralityForSmiles(String smiles) intcalculateMolecularDipole(BS bsAtoms) voidcalculatePartialCharges(BS bsSelected) voidcalculateStructures(BS bsAtoms, boolean asDSSP, boolean setStructure, int version) intcalculateStruts(BS bs1, BS bs2) P3[]calculateSurface(BS bsSelected, float envelopeRadius) booleancheckConsoleScript(String strScript) voidcheckCoordinatesChanged(BS bsAtoms) booleanvoidcheckInMotion(int state) voidbooleancheckMotionRendering(int tok) check motion for rendering during mouse movement, spin, vibration, and animationbooleancheckObjectHovered(int x, int y) booleancheckPrivateKey(double privateKey) Simple method to ensure that the image creator (which writes files) was in fact opened by this vwr and not by some manipulation of the applet.booleancheckPropertyParameter(String name) booleancheckSelect(Map<String, SV> h, T[] value) voidvoidvoidvoidvoidvoidvoidvoidvoidclearTimeout(String name) voidclipImageOrPasteText(String text) T[]compileExpr(String expr) intvoidconnectNBO(String type) voiddefineAtomSets(Map<String, Object> info) intdeleteAtoms(BS bsAtoms, boolean fullModels) voiddeleteBonds(BS bsDeleted) voiddeleteMeasurement(int i) voiddeleteModelAtoms(int modelIndex, int firstAtomIndex, int nAtoms, BS bsModelAtoms) intdeleteModels(int modelIndex, BS bsAtoms) called by ZAP {atomExpression} when atoms are present or the command is specific for a model, such as ZAP 2.1Ask for new file name when saving or opening a file in Java and saving a file in JavaScript.voiddisplayAtoms(BS bs, boolean isDisplay, boolean isGroup, int addRemove, boolean isQuiet) voiddispose()end of life for this viewervoidvoidevalCallback(String cmd, Object[] params, boolean doWait) evalFileArgs(String strFilename, String args) floatevalFunctionFloat(Object func, Object params, float[] values) booleanevalParallel(ScriptContext context, ShapeManager shapeManager) evalString(String strScript) voidevalStringGUI(String script) Run a script asynchronously, adding the GUI flag to indicate that we should fire the SELECT callback at the end if there is one.evalStringQuiet(String strScript) evalStringQuietSync(String strScript, boolean isQuiet, boolean allowSyncScript) evalStringWaitStatusQueued(String returnType, String strScript, String statusList, boolean isQuiet, boolean isQueued) evaluateExpression(Object stringOrTokens) synchronized here trapped the eventQueue; see also evaluateExpressionAsVariableevaluateExpressionAsVariable(Object stringOrTokens) voidexitJmol()extractMolData(String what) extractProperty(Object property, Object args, int pt) voidfillAtomData(AtomData atomData, int mode) protected voidfinalize()voidintfindNearestAtomIndex(int x, int y) intfindNearestAtomIndexMovable(int x, int y, boolean mustBeMovable) findSpaceGroup(SymmetryInterface sym, BS bsAtoms, String xyzList, float[] unitCellParams, T3 origin, T3[] oabc, int flags) static StringfixInlineString(String strModel, char newLine) formatText(String text0) booleanfrankClicked(int x, int y) booleanfrankClickedModelKit(int x, int y) voidfreeTempEnum(STR[] temp) voidfreeTempPoints(P3[] tempPoints) voidfreeTempScreens(P3i[] tempScreens) float[][]functionXY(String functionName, int nX, int nY) fills an array with data -- if nX invalid input: '<' 0 and this would involve JavaScript, then this reads a full set of Double[][] in one function call.float[][][]functionXYZ(String functionName, int nX, int nY, int nZ) generateOutputForExport(Map<String, Object> params) for POV-RayP3[]getAdditionalHydrogens(BS bsAtoms, Lst<Atom> vConnections, int flags) getAllSettings(String prefix) getAnnotationInfo(SV d, String match, int type) getAnnotationParser(boolean isDSSR) getAsciiFileOrNull(String name) getAtomBitSet(Object atomExpression) getAtomDefs(Map<String, Object> names) Quat[]getAtomGroupQuaternions(BS bsAtoms, int nMax) getAtomInfo(int atomOrPointIndex) getAtomsNearPt(float distance, P3 coord, BS bs) getAtomValidation(String type, Atom atom) intgetBindingInfo(String qualifiers) getBioSmiles(BS bs) getBondsForSelectedAtoms(BS bsAtoms) booleangetBoolean(int tok) booleangetBooleanProperty(String key) intintgetBranchBitSet(int atomIndex, int atomIndexNot, boolean allowCyclic) given a set of atoms, a subset of atoms to test, two atoms that start the branch, and whether or not to allow the branch to cycle back on itself,deliver the set of atoms constituting this branch.getBufferedInputStream(String fullPathName) P3[][]getCenterAndPoints(Lst<Object[]> atomSets, boolean addCenter) intgetChainID(String id, boolean isAssign) Create a unique integer for any chain string.getChainIDStr(int id) getChemicalInfo(String smiles, String info, BS bsAtoms) getChimeInfo(int tok) getCifData(int modelIndex) getColorPointForPropertyValue(float val) intgetCoordinateState(BS bsSelected) float[]getCurrentFileAsString(String state) /////// File-related methods ////////////intintgetDataObj(String key, BS bsSelected, int dataType) Retrieve a data objectgetDefaultMeasurementLabel(int nPoints) getDefaultPropertyParam(int propertyID) getDefaultVdwNameOrData(int mode, VDW type, BS bs) getDefinedAtomSet(String name) intbooleangetElementsPresentBitSet(int modelIndex) getFileAsString(String fileName) getFileAsString3(String name, boolean checkProtected, String state) getFileAsString4(String name, int nBytesMax, boolean doSpecialLoad, boolean allowBinary, boolean checkProtected, String state) floatgetFloat(int tok) getFormulaForAtoms(BS bs, String type, boolean isEmpirical) Get formula -- MF or CELLFORMULA, possibly empiricalString[]getFullPathNameOrError(String filename) getFunction(String name) getFunctionCalls(String selectedFunction) getFunctions(boolean isStatic) This method is only called by JmolGLmol applet._refresh();getGroupsWithin(int nResidues, BS bs) voidintintgetHybridizationAndAxes(int atomIndex, V3 z, V3 x, String lcaoType) byte[]getImageAsBytes(String type, int width, int height, int quality, String[] errMsg) Get an InChI or InChIKey for a set of atoms or MOL data.charbooleangetInMotion(boolean includeAnim) intgetInt(int tok) intgetIsosurfacePropertySmoothing(boolean asPower) intgetItaNumberFor(String name) getJBR()intgetJDXBaseModelIndex(int modelIndex) get the model designated as "baseModel" in a JCamp-MOL file for example, the model used for bonding for an XYZVIB file or the model used as the base model for a mass spec file.intintstatic StringgetJspecViewProperties(Object myParam) getJzt()getLigandModel(String id, String prefix, String suffix, String terminator) obtain CIF data for a ligand for purposes of adding hydrogens or for any other purpose in terms of saving a data set for a file in a stategetLocalUrl(String fileName) retrieve macros.json from the directoryshortintint[]getMeasurementStringValue(int i) getMinimizer(boolean createNew) getModelCml(BS bs, int nAtomsMax, boolean addBonds, boolean doTransform) getModelExtract(Object atomExpression, boolean doTransform, boolean isModelKit, String type) V3000, SDF, JSON, CD, XYZ, XYZVIB, XYZRN, CML, PDB, PQRgetModelFileData(String atomExpression, String type, boolean allTrajectories) intgetModelFileNumber(int modelIndex) getModelForAtomIndex(int iatom) intgetModelIndexForAtom(int iatom) intgetModelInfo(String key) get a value from the current model's Model.auxiliaryInfogetModelkit(boolean andShow) Get a ModelKit property, but only if the modelkit exists already.getModelName(int modelIndex) intgetModelNumber(int modelIndex) getModelNumberDotted(int modelIndex) getModelProperties(int modelIndex) getModelSetAuxiliaryInfoForAtoms(Object atomExpression) getModelUndeletedAtomsBitSet(int modelIndex) getModelUndeletedAtomsBitSetBs(BS bsModels) intgetMotionFixedAtoms(SymmetryInterface sym, BS bsFixed) For the current SINGLE model only.booleangetNBOAtomLabel(Atom atom) getNMRPredict(String type) shortgetObjectColix(int objId) intgetObjectMad10(int objId) voidgetObjectMap(Map<String, ?> map, char c) used in autocompletion in console using TABgetOpenSmiles(BS bs) Only return symmetry that has operators.float[]getOrCalcPartialCharges(BS bsSelected, BS bsIgnore) getOrientation(int type, String name, BS bs, P3[] points) getOutputChannel(String localName, String[] fullPath) getParameter(String key) getPdbAtomData(BS bs, OC out, boolean asPQR, boolean doTransform) getPdbData(int modelIndex, String type, BS bsAtoms, Object[] parameters, OC oc, boolean getStructure) getPdbID()intvoidgetPolymerPointsAndVectors(BS bs, Lst<P3[]> vList) getPOrNull(String key) booleanThis flag if set FALSE: 1) turns UNDO off for the application 2) turns history off 3) prevents saving of inlinedata for later LOAD "" commands 4) turns off the saving of changed atom properties 5) does not guarantee accurate state representation 6) disallows generation of the state It is useful in situations such as web sites where memory is an issue and there is no need for such.getProperty(String returnType, String infoType, Object paramInfo) intgetPropertyNumber(String name) charbooleanfloatgetScalePixelsPerAngstrom(boolean asAntialiased) getScaleText(String units, boolean isAntialiased, float min, float[] ret) Depending upon the measure text, we need to indicate |-------| 1 A or 0.1 A for example.intintgetScreenImageBuffer(Object g, boolean isImageWrite) Image.getJpgImage, ImageCreator.clipImage, getImageBytes, Viewer.renderScreenImageStereointgetScriptContext(String why) getSelectedAtomIterator(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean isMultiModel) booleangetSetHistory(int howFarBack) Options include: ; all n == Integer.MAX_VALUE ; n prev n >= 1 ; next n == -1 ; set max to -2 - n n invalid input: '<'= -3 ; just clear n == -2 ; clear and turn off; return "" n == 0 ; clear and turn on; return "" n == Integer.MIN_VALUE;getShapeProperty(int shapeType, String propertyName) booleanbooleanbooleanbooleanbooleanbooleanint[][]getSmartsMap(String smilesOrSmarts, BS bsSelected, int flags) getSmartsMatch(String smarts, BS bsSelected) getSmartsMatchForNodes(String smarts, Node[] atoms) NOT getting aromatic smilesNode[]getSmilesAtoms(String smiles) getSmilesOpt(BS bsSelected, int index1, int index2, int flags, String options) returns the SMILES string for a sequence or atom set does not include attached protons on groupsgetStandardLabelFormat(int type) getStateInfo3(String type, int width, int height) getStatusChanged(String statusNameList) intgetStrandCount(int type) BS[]getSubstructureSetArray(Object pattern, BS bsSelected, int flags) BS[]getSubstructureSetArrayForNodes(Object pattern, Node[] nodes, int flags) getSymmetryEquivPointList(Lst<Point3fi> pts, String flags) getSymmetryEquivPoints(Point3fi pt, String flags) getSymmetryInfo(int iatom, String xyz, int iOp, P3 translation, P3 pt1, P3 pt2, int type, String desc, float scaleFactor, int nth, int options, int[] opList) A general method for retrieving symmetry information with full capability of the symop() scripting function.Retrieve the static Symmetry object, which should be used only staticallyRetrieve a new Symmetry object.intfloatgetUnitCellInfo(int infoType) floatgetUnitCellInfoStr(String type) T3[]Convert string abc;offset or M3d or M4d to origin and three vectors -- a, b, c.intgetVanderwaalsMar(int i) intgetVanderwaalsMarType(int atomicAndIsotopeNumber, VDW type) getZipDirectoryAsString(String fileName) voidvoidhandleError(Throwable er, boolean doClear) static booleanhasDatabasePrefix(String fileName) booleanhasFocus()booleanhasStructure(String pattern, String smiles, boolean isSmarts) booleanfinal booleanhaveAccessInternal(String path) Check for allowed access only to the designated path starting with this path.booleanvoidvoidhighlightBond(int index, int closestAtomIndex, int x, int y) from StickshistoryFind(String cmd, int dir) voidvoidHover over an arbitrary point.voidinitialize(boolean clearUserVariables, boolean isPyMOL) initializeExporter(Map<String, Object> params) voidinvertAtomCoord(P3 pt, P4 plane, BS bs, int ringAtomIndex, boolean isClick) voidinvertSelected(P3 pt, P4 plane, int iAtom, BS bsAtoms) booleanis2D()booleanisBound(int mouseAction, int jmolAction) booleanstatic booleanisDatabaseCode(char ch) booleanisFunction(String name) booleanbooleanisModelKitOption(char type, String value) Check for an option type 'M' 'S' 'U' 'B'.booleanbooleanisModelPDB(int i) booleanbooleanbooleanbooleanisSubstructure(String smarts, String smiles) booleanloadImageData(Object image, String nameOrError, String echoName, Object sco) NOTE: This method is called from within a j2sNative block in awtjs2d.Platform.java as well as from FileManager.loadImageloadInline(String strModel) from Applet and external applications onlyloadInline(String[] arrayModels) external apps onlyloadInline(String[] arrayModels, boolean isAppend) external apps and applet onlyloadInline(String strModel, char newLine) external apps onlyloadInline(List<Object> arrayData, boolean isAppend) External applications only; does not preserve state -- intentionally!loadInlineAppend(String strModel, boolean isAppend) used by applet and consoleloadModelFromFile(String fullPathName, String fileName, String[] fileNames, Object reader, boolean isAppend, Map<String, Object> htParams, SB loadScript, SB sOptions, int tokType, String filecat) Used by the ScriptEvaluator LOAD command to open one or more files.voidint[]makeConnections(float minDistance, float maxDistance, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy) booleanvoidminimize(JmolScriptEvaluator eval, int steps, float crit, BS bsSelected, BS bsFixed, BS bsInFrame, float rangeFixed, int flags) From the MINIMIZE command and other sources.booleanmodelHasVibrationVectors(int modelIndex) voidmove(JmolScriptEvaluator eval, V3 dRot, float dZoom, V3 dTrans, float dSlab, float floatSecondsTotal, int fps) voidmoveAtoms(M4 m4, M3 mNew, M3 rotation, V3 translation, P3 center, boolean isInternal, BS bsAtoms, boolean translationOnly, boolean useModelKit) intmoveAtomWithHydrogens(int atomIndex, int deltaX, int deltaY, int deltaZ, P3 ptNew, BS bsAtoms) voidmoveTo(JmolScriptEvaluator eval, float floatSecondsTotal, P3 center, V3 rotAxis, float degrees, M3 rotationMatrix, float zoom, float xTrans, float yTrans, float rotationRadius, P3 navCenter, float xNav, float yNav, float navDepth, float cameraDepth, float cameraX, float cameraY) voidmoveUpdate(float floatSecondsTotal) voidnavigateAxis(V3 rotAxis, float degrees) voidnavigatePt(P3 center) voidnavTranslatePercent(float x, float y) newMeasurementData(String id, Lst<Object> points) voidnotifyError(String errType, String errMsg, String errMsgUntranslated) voidintnotifyMouseClicked(int x, int y, int action, int mode) voidnotifyScriptEditor(int msWalltime, Object[] data) voidnotifyStatusReady(boolean isReady) voidapplet DOM method -- does not preserve stateopenExportChannel(double privateKey, String fileName, boolean asWriter) for JmolSimpleViewer -- external applications only (and no-script JavaScript)voidopenFileAsyncSpecial(String fileName, int flags) opens a file as a model, a script, or a surface via the creation of a script that is queued.voidopenFileAsyncSpecialType(String fileName, int flags, String fileType) for JmolSimpleViewer -- external applications onlyopenReader(String fullPathName, String fileName, Object reader) Opens the file, given an already-created reader.openStringInline(String strModel) only used by file dropper.openStringInlineParamsAppend(String strModel, Map<String, Object> htParams, boolean isAppend) Only used for adding hydrogen atoms and adding the model kit methane model; not part of the public interface.outputToFile(Map<String, Object> params) parseJSONArray(String jsonArray) parseJSONMap(String jsonMap) voidvoidpopHoldRepaint(String why) voidpopState()voidprocessKeyEvent(Object event) booleanprocessMouseEvent(int id, int x, int y, int modifiers, long time) voidprocessTwoPointGesture(float[][][] touches) processWriteOrCapture(Map<String, Object> params) from eval write command only includes option to write set of filesvoidvoidpushHoldRepaintWhy(String why) voidreadCifData(String fileName, Object rdrOrStringData, String type) readCifData(String fileName, String type) voidreadFileAsMap(BufferedInputStream bis, Map<String, Object> map, String name) voidrebond()voidrebondState(boolean isStateScript) voidinitiate a repaint/update sequence if it has not already been requested.voidrefreshMeasures(boolean andStopMinimization) voidRemoves one command from the command historyvoidremoveFunction(String name) voidremoveSelectionListener(JmolSelectionListener listener) voidremoveUserVariable(String key) voidrenderScreenImage(Object g, int width, int height) JmolViewer interface uses this, but that is allvoidrenderScreenImageStereo(Object gLeft, boolean checkStereoSlave, int width, int height) voidvoidreset(boolean includingSpin) voidresetShapes(boolean andCreateNew) int[]resizeInnerPanel(int width, int height) restrictToModel(BS bs, int mi) Restrict this bitset to the current model or its initial atom's model.booleanrotateAboutPointsInternal(JmolScriptEvaluator eval, P3 point1, P3 point2, float degreesPerSecond, float endDegrees, boolean isSpin, BS bsSelected, V3 translation, Lst<P3> finalPoints, float[] dihedralList, M3 vectorMatrix, M4 m4, boolean useModelKit, P3[][] centerAndPoints) booleanrotateAxisAngleAtCenter(JmolScriptEvaluator eval, P3 rotCenter, V3 rotAxis, float degreesPerSecond, float endDegrees, boolean isSpin, BS bsSelected) voidvoidrotateModelSpinVectors(int modelIndex, M3 rot) voidrotateSpins(int deltaX, int deltaY) voidrotateZBy(int zDelta, int x, int y) Run a script immediately using the script function script("xxxxxx") using direct script tokens for script ( "xxxxxxx" )runScriptCautiously(String script) formerly runScript(), this method really can ONLY be called by the viewer being run from an already-running script.scriptCheck(String strScript) voidscriptEcho(String strEcho) voidscriptStatus(String strStatus) scriptCallback is the primary way to monitor script status.voidscriptStatusMsg(String strStatus, String statusMessage) scriptWait(String strScript) scriptWaitStatus(String strScript, String statusList) voidvoidvoidselectBonds(BS bs) voidselectStatus(BS bs, boolean isGroup, int addRemove, boolean isQuiet, boolean reportStatus) "SELECT" starting with comma triggers the SELECT callback from a SELECT command.voidsendConsoleMessage(String msg) voidsetAccessInternal(String path) Set access to the specified path only; used for restricting file read/write access to only those files within the zip block of a PNGJ file Java only.voidsetAnimation(int tok) voidsetAnimationFps(int fps) voidsetAnimationOn(boolean animationOn) voidsetAnimationRange(int modelIndex1, int modelIndex2) voidsetAnimDisplay(BS bs) voidsetAtomCoords(BS bs, int tokType, Object xyzValues) voidsetAtomCoordsRelative(T3 offset, BS bs) voidsetAtomData(int type, String name, String coordinateData, boolean isDefault) voidsetAtomProperty(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list) voidsetAutoBond(boolean TF) voidsetAxesOrientationRasmol(boolean TF) voidsetBackgroundImage(String fileName, Object image) voidsetBackgroundModelIndex(int modelIndex) voidsetBondTolerance(float bondTolerance) voidsetBooleanProperty(String key, boolean value) voidsetBooleanPropertyTok(String key, int tok, boolean value) voidsetCenterBitSet(BS bsCenter, boolean doScale) voidvoidvoidsetColorBackground(String colorName) voidsetConsoleFontScale(int scale) voidsetCurrentCage(String isosurfaceId) voidsetCurrentColorRange(String label) voidvoidsetCurrentModelIndex(int modelIndex) voidsetCurrentModelIndexClear(int modelIndex, boolean clearBackground) voidsetCursor(int cursor) voidsetData(String key, Object[] data, int dataType, int matchField, int matchFieldColumnCount, int dataField, int dataFieldColumnCount) A general-purpose data storage method.voidsetDebugScript(boolean debugScript) voidvoidsetDihedrals(float[] dihedralList, BS[] bsBranches, float rate) voidsetDisplay(Object canvas) voidsetElementArgb(int elementNumber, int argb) setErrorMessage(String errMsg, String errMsgUntranslated) voidsetFloatProperty(String key, float value) voidsetFocus()voidsetFrameDelayMs(long millis) voidsetFrameOffsets(BS bsAtoms, boolean isFull) voidsetFrameTitle(int modelIndex, String title) voidsetFrameTitleObj(Object title) voidsetFrankOn(boolean TF) voidsetHistory(String fileName) voidsetHoverLabel(String strLabel) voidsetInMotion(boolean inMotion) voidsetInsertedCommand(String strScript) voidsetIntProperty(String key, int value) voidsetIntPropertyTok(String key, int tok, int value) voidsetIteratorForAtom(AtomIndexIterator iterator, int atomIndex, float distance) voidsetIteratorForPoint(AtomIndexIterator iterator, int modelIndex, T3 pt, float distance) voidsetJmolCallbackListener(JmolCallbackListener listener) voidvoidsetJmolStatusListener(JmolStatusListener listener) voidsetLigandModel(String key, String data) setLoadFormat(boolean isSurface, String name, char type, boolean withPrefix) Jmol will either specify a type or look for it in the first character, making sure it is found using isDatabaseCode() first.setLoadParameters(Map<String, Object> htParams, boolean isAppend) voidsetMarBond(short marBond) voidvoidsetMeshCreator(Object meshCreator) an external applet or app with class that extends org.jmol.jvxl.MeshCreator might execute: org.jmol.viewer.Viewer vwr = applet.getViewer(); vwr.setMeshCreator(this); then that class's updateMesh(String id) method will be called whenever a mesh is rendered.voidsetMinBondDistance(float minBondDistance) setModelkitPropertySafely(String key, Object value) Set a ModelKit property, but only if the modelkit exists already.voidsetModelSet(ModelSet modelSet) voidvoidsetModulation(BS bs, boolean isOn, P3 t1, boolean isQ) voidsetMotionFixed(BS bs) voidvoidsetNavigationDepthPercent(float percent) voidsetNavigationMode(boolean TF) voidsetNewRotationCenter(P3 center) voidsetObjectArgb(String name, int argb) voidsetObjectMad10(int iShape, String name, int mad10) input here is a JC.SHAPE_xxxx identifiersetObjectProp(String id, int tokCommand) voidsetObjectVisibility(String name, boolean b) voidsetOptions(Map<String, Object> info) booleansetParallel(boolean TF) voidsetPercentVdwAtom(int value) voidsetPerspectiveDepth(boolean perspectiveDepth) voidsetPicked(int atomIndex, boolean andReset) voidsetPickingMode(String strMode, int pickingMode) voidsetPropertyColorScheme(String scheme, boolean isTranslucent, boolean isOverloaded) voidsetProteinType(STR type, BS bs) voidvoidsetRotationRadius(float angstroms, boolean doAll) voidsetScreenDimension(int width, int height) voidsetScriptStatus(String strStatus, String statusMessage, int msWalltime, String strErrorMessageUntranslated) voidsetSelectionHalosEnabled(boolean TF) voidsetSelectionSet(BS set) voidsetShapeErrorState(int shapeID, String state) voidsetShapeProperty(int shapeID, String propertyName, Object value) voidsetShapeSize(int shapeID, int madOrMad10, BS bsSelected) voidsetShowAxes(boolean value) voidsetShowBbcage(boolean value) voidsetShowHydrogens(boolean TF) voidsetShowMeasurements(boolean TF) voidsetShowUnitCell(boolean value) voidvoidvoidsetStatusAtomMoved(boolean andCheckMinimize, BS bs) voidsetStatusAtomPicked(int atomIndex, String info, Map<String, Object> map, boolean andSelect) booleansetStatusDragDropped(int mode, int x, int y, String fileName, String[] retType) Allows a handler to set Jmol variable doDrop=false to cancel and also set the file type directly (Java) via the Jmol variable dropFileType (Java or JavaScript) if desired.voidsetStatusMeasuring(String status, int intInfo, String strMeasure, float value) voidsetStatusResized(int width, int height) resizeCallback is called whenever the applet gets a resize notification from the browser jmolSetCallback("resizeCallback", "myResizeCallback") function myResizeCallback(width, height) {}voidsetStatusSelect(BS bs) Make the SelectCallback call and reset the hasSelected value to false.voidvoidsetStereoMode(int[] twoColors, STER stereoMode, float degrees) voidsetStringProperty(String key, String value) voidsetStructureList(float[] list, STR type) voidsetSyncDriver(int mode) voidsetTainted(boolean TF) voidsetTimeout(String name, int mSec, String script) voidsetUnitCellAtomIndex(int iAtom) voidvoidsetVectorScale(float scale) voidsetVibrationPeriod(float period) voidsetVibrationScale(float scale) voidvoidsetWindowDimensions(float[] dims) voidshowConsole(boolean showConsole) voidshowEditor(String[] file_text) booleanvoidshowParameter(String key, boolean ifNotSet, int nMax) voidshowString(String str, boolean isPrint) voidshowTimeout(String name) voidsyncCallback traps script synchronization messages and allows for cancellation (by returning "") or modification jmolSetCallback("syncCallback", "mySyncCallback") function mySyncCallback(app, script, appletName) { ...[modify script here]...voidspinXYBy(int xDelta, int yDelta, float speed) voidstartHoverWatcher(boolean tf) voidvoidstartPlugin(String plugin) startup -U nbo optionvoidstartSpinningAxis(T3 pt1, T3 pt2, boolean isClockwise) voidsyncScript(String script, String applet, int port) voidtoCartesian(T3 pt, boolean ignoreOffset) absolute or relative to origin of UNITCELL {x y z}voidtoCartesianUC(SymmetryInterface unitCell, T3 pt, boolean ignoreOffset) voidtoFractional(T3 pt, boolean ignoreOffset) voidtoFractionalUC(SymmetryInterface unitCell, T3 pt, boolean ignoreOffset) voidtoUnitCell(P3 pt, P3 offset) Returns the relative to origin without regard to offset created using the UNITCELL command.voidvoidtranslateXYBy(int xDelta, int yDelta) voidtriggerTimeout(String name) voidunBindAction(String desc, String name) intundoMoveAction(int action, int n) voidundoMoveActionClear(int taintedAtom, int type, boolean clearRedo) voidunsetProperty(String key) voidupdateJS()for JavaScript onlybooleanvoidwarnAtom(int iatom) wasmInchiHack(String cmd) WASM inchi must be initialized asynchronouslywriteBinaryFile(String fname, byte[] bytes) writeFileData(String fileName, String type, int modelIndex, Object[] parameters) writeTextFile(String fileName, String data) voidzap(boolean notify, boolean resetUndo, boolean zapModelKit) Methods inherited from class JmolViewer
allocateViewer, allocateViewer, getJmolVersionNoDate, openFileAsync, openReader, renderScreenImage, setConsole
-
Field Details
-
nullDeletedAtoms
public static final boolean nullDeletedAtoms- See Also:
-
testAsync
public boolean testAsync -
autoExit
public boolean autoExit -
haveDisplay
public boolean haveDisplay -
isJS
public static boolean isJS -
isSwingJS
public static boolean isSwingJS -
isJSNoAWT
public boolean isJSNoAWT -
isWebGL
public boolean isWebGL -
isSingleThreaded
public boolean isSingleThreaded -
queueOnHold
public boolean queueOnHold -
fullName
-
appletDocumentBase
-
appletCodeBase
-
appletIdiomaBase
-
jsDocumentBase
-
compiler
-
definedAtomSets
-
ms
-
fm
-
isApplet
public boolean isApplet -
isJNLP
public boolean isJNLP -
isSyntaxAndFileCheck
public boolean isSyntaxAndFileCheck -
isSyntaxCheck
public boolean isSyntaxCheck -
listCommands
public boolean listCommands -
htmlName
-
appletName
-
tryPt
public int tryPt -
gdata
-
html5Applet
-
jmolObject
-
acm
-
am
-
cm
-
shm
-
slm
-
g
-
sm
-
tm
-
strJavaVendor
-
strOSName
-
strJavaVersion
-
isPrintOnly
public boolean isPrintOnly -
isSignedApplet
public boolean isSignedApplet -
noGraphicsAllowed
public boolean noGraphicsAllowed -
vwrOptions
-
display
-
mm
public org.jmol.viewer.ModelManager mm -
stm
-
scm
-
eval
-
async
public boolean async -
executor
-
rd
-
chainMap
-
imageFontScaling
public float imageFontScaling -
antialiased
public boolean antialiased -
isPreviewOnly
public boolean isPreviewOnly -
headless
public boolean headlessdetermined by GraphicsEnvironment.isHeadless() from java -Djava.awt.headless=true disables command threading disables DELAY, TIMEOUT, PAUSE, LOOP, GOTO, SPIN, ANIMATION ON turns SPIN into just ROTATE -
movableBitSet
-
hasSelected
public boolean hasSelected -
REFRESH_REPAINT
public static final int REFRESH_REPAINT- See Also:
-
REFRESH_SYNC
public static final int REFRESH_SYNC- See Also:
-
REFRESH_SYNC_MASK
public static final int REFRESH_SYNC_MASK- See Also:
-
REFRESH_REPAINT_NO_MOTION_ONLY
public static final int REFRESH_REPAINT_NO_MOTION_ONLY- See Also:
-
REFRESH_SEND_WEBGL_NEW_ORIENTATION
public static final int REFRESH_SEND_WEBGL_NEW_ORIENTATION- See Also:
-
captureParams
-
currentCursor
public int currentCursor -
frankOn
public boolean frankOn -
noFrankEcho
public boolean noFrankEcho -
scriptEditorVisible
public boolean scriptEditorVisible -
appConsole
-
atomHighlighted
public int atomHighlighted -
creatingImage
public boolean creatingImage -
SYNC_GRAPHICS_MESSAGE
- See Also:
-
SYNC_NO_GRAPHICS_MESSAGE
- See Also:
-
MODIFY_ASSIGN_ATOM
public static final int MODIFY_ASSIGN_ATOM- See Also:
-
MODIFY_DELETE_BONDS
public static final int MODIFY_DELETE_BONDS- See Also:
-
MODIFY_SET_COORD
public static final int MODIFY_SET_COORD- See Also:
-
MODIFY_DELETE_ATOM
public static final int MODIFY_DELETE_ATOM- See Also:
-
MODIFY_DELETE_MODEL
public static final int MODIFY_DELETE_MODEL- See Also:
-
MODIFY_ASSIGN_BOND
public static final int MODIFY_ASSIGN_BOND- See Also:
-
MODIFY_DELETE_ATOMS
public static final int MODIFY_DELETE_ATOMS- See Also:
-
MIN_SILENT
public static final int MIN_SILENT- See Also:
-
MIN_SELECTED
public static final int MIN_SELECTED- See Also:
-
MIN_HAVE_FIXED
public static final int MIN_HAVE_FIXED- See Also:
-
MIN_QUICK
public static final int MIN_QUICK- See Also:
-
MIN_ADDH
public static final int MIN_ADDH- See Also:
-
MIN_SELECT_ONLY
public static final int MIN_SELECT_ONLY- See Also:
-
MIN_GROUP_SELECT
public static final int MIN_GROUP_SELECT- See Also:
-
MIN_XX
public static final int MIN_XX- See Also:
-
MIN_MODELKIT
public static final int MIN_MODELKIT- See Also:
-
nProcessors
public static int nProcessors -
isHighPrecision
public static boolean isHighPrecisionadjustable -
isJmolD
public static final boolean isJmolDlegacy Jmol- See Also:
-
displayLoadErrors
public boolean displayLoadErrors -
stateScriptVersionInt
public int stateScriptVersionInt -
timeouts
-
-
Constructor Details
-
Viewer
public Viewer() -
Viewer
new way...- Parameters:
info- "display" "adapter" "statusListener" "platform" "options" "fullName" "documentBase" "codeBase" "multiTouch" [options] "noGraphics" "printOnly" "previewOnly" "debug" "applet" "signedApplet" "appletProxy" "useCommandThread" "platform" [option] "backgroundTransparent" "exit" "listCommands" "check" "checkLoad" "silent" "access:READSPT" "access:NONE" "menuFile" "headlessMaxTimeMs" "headlessImage" "isDataOnly" "async"
-
-
Method Details
-
finalize
-
setInsertedCommand
-
getJmolVersion
-
allocateViewer
protected static JmolViewer allocateViewer(Object display, JmolAdapter modelAdapter, String fullName, URL documentBase, URL codeBase, String commandOptions, JmolStatusListener statusListener, GenericPlatform implementedPlatform) old way...- Parameters:
display-modelAdapter-fullName-documentBase-codeBase-commandOptions-statusListener-implementedPlatform-- Returns:
- JmolViewer object
-
haveAccess
-
getModelAdapter
- Specified by:
getModelAdapterin classJmolViewer
-
getSmartsMatch
- Specified by:
getSmartsMatchin classJmolViewer- Throws:
Exception
-
isSubstructure
-
hasStructure
-
getSmartsMatchForNodes
-
getSmartsMap
- Parameters:
smilesOrSmarts-bsSelected-flags- can be bitwise OR of JC.SMILES_* options, in particular, JC.SMILES_TYPE_SMARTS, JC.SMILES_TYPE_SMILES, and JC.SMILES_MAP_UNIQUE- Returns:
- map
- Throws:
Exception
-
setOptions
-
setStereo
-
getMenu
-
resizeInnerPanel
public int[] resizeInnerPanel(int width, int height) - Specified by:
resizeInnerPanelin classJmolViewer
-
setScreenDimension
public void setScreenDimension(int width, int height) - Specified by:
setScreenDimensionin classJmolViewer
-
getScreenWidth
public int getScreenWidth()- Specified by:
getScreenWidthin classJmolViewer
-
getScreenHeight
public int getScreenHeight()- Specified by:
getScreenHeightin classJmolViewer
-
getScreenDim
public int getScreenDim() -
setWidthHeightVar
public void setWidthHeightVar() -
getBoundBoxCenterX
public int getBoundBoxCenterX() -
getBoundBoxCenterY
public int getBoundBoxCenterY() -
getScreenImage
-
getScreenImageBuffer
Image.getJpgImage, ImageCreator.clipImage, getImageBytes, Viewer.renderScreenImageStereo- Specified by:
getScreenImageBufferin classJmolViewer
-
evalStringWaitStatusQueued
-
getModelkit
-
setMenu
- Specified by:
setMenuin classJmolViewer
-
getJDXBaseModelIndex
public int getJDXBaseModelIndex(int modelIndex) get the model designated as "baseModel" in a JCamp-MOL file for example, the model used for bonding for an XYZVIB file or the model used as the base model for a mass spec file. This might then allow pointing off a peak in JSpecView to switch to the model that is involved in HNMR or CNMR- Parameters:
modelIndex-- Returns:
- modelIndex
-
getJspecViewProperties
-
scriptEcho
-
notifyError
-
jsEval
-
jsEvalSV
-
getZapName
-
setStatusMeasuring
-
notifyMinimizationStatus
public void notifyMinimizationStatus() -
setStatusAtomPicked
-
getProperty
- Specified by:
getPropertyin classJmolViewer- Parameters:
returnType- "JSON", "string", "readable", and anything else returns the Java object.infoType-paramInfo-- Returns:
- property data -- see org.jmol.viewer.PropertyManager.java
-
showSystemInfo
public void showSystemInfo() -
notifyMouseClicked
public int notifyMouseClicked(int x, int y, int action, int mode) -
getJzt
-
readFileAsMap
-
getZipDirectoryAsString
-
getImageAsBytes
- Specified by:
getImageAsBytesin classJmolViewer- Parameters:
type-width-height-quality-errMsg- TODO- Returns:
- byte[] image, or null and an error message
-
releaseScreenImage
public void releaseScreenImage()- Specified by:
releaseScreenImagein classJmolViewer
-
setDisplay
-
newMeasurementData
-
getExportDriverList
-
dispose
-
reset
public void reset(boolean includingSpin) -
homePosition
public void homePosition()- Specified by:
homePositionin classJmolViewer
-
initialize
public void initialize(boolean clearUserVariables, boolean isPyMOL) -
getGLmolView
This method is only called by JmolGLmol applet._refresh();- Returns:
- enough data to update a WebGL view
-
setRotationRadius
public void setRotationRadius(float angstroms, boolean doAll) -
setCenterBitSet
-
setNewRotationCenter
-
move
public void move(JmolScriptEvaluator eval, V3 dRot, float dZoom, V3 dTrans, float dSlab, float floatSecondsTotal, int fps) -
moveTo
public void moveTo(JmolScriptEvaluator eval, float floatSecondsTotal, P3 center, V3 rotAxis, float degrees, M3 rotationMatrix, float zoom, float xTrans, float yTrans, float rotationRadius, P3 navCenter, float xNav, float yNav, float navDepth, float cameraDepth, float cameraX, float cameraY) -
moveUpdate
public void moveUpdate(float floatSecondsTotal) -
spinXYBy
public void spinXYBy(int xDelta, int yDelta, float speed) -
rotateZBy
public void rotateZBy(int zDelta, int x, int y) -
translateXYBy
public void translateXYBy(int xDelta, int yDelta) -
rotateFront
public void rotateFront()- Specified by:
rotateFrontin classJmolViewer
-
translate
-
finalizeTransformParameters
public void finalizeTransformParameters() -
getScalePixelsPerAngstrom
public float getScalePixelsPerAngstrom(boolean asAntialiased) -
setSpin
-
getSpinState
-
getOrientation
-
getCurrentColorRange
public float[] getCurrentColorRange() -
setElementArgb
public void setElementArgb(int elementNumber, int argb) -
setVectorScale
public void setVectorScale(float scale) - Specified by:
setVectorScalein classJmolViewer
-
setVibrationScale
public void setVibrationScale(float scale) - Specified by:
setVibrationScalein classJmolViewer
-
setVibrationPeriod
public void setVibrationPeriod(float period) - Specified by:
setVibrationPeriodin classJmolViewer
-
setObjectVisibility
-
setObjectArgb
-
setBackgroundImage
-
getObjectColix
public short getObjectColix(int objId) -
setColorBackground
- Specified by:
setColorBackgroundin classJmolViewer
-
getBackgroundArgb
public int getBackgroundArgb()- Specified by:
getBackgroundArgbin classJmolViewer
-
setObjectMad10
input here is a JC.SHAPE_xxxx identifier- Parameters:
iShape-name-mad10-
-
getObjectMad10
public int getObjectMad10(int objId) - Parameters:
objId-- Returns:
- mad10
-
setPropertyColorScheme
-
getLightingState
-
getColorPointForPropertyValue
-
select
- Parameters:
bs-isGroup-addRemove- T.add, T.remove, or ignoredisQuiet-
-
setSelectionSet
- Specified by:
setSelectionSetin classJmolViewer
-
selectBonds
-
displayAtoms
-
getDefinedAtomSet
-
selectAll
public void selectAll()- Specified by:
selectAllin classJmolViewer
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin classJmolViewer
-
bsA
-
addSelectionListener
- Specified by:
addSelectionListenerin classJmolViewer
-
removeSelectionListener
- Specified by:
removeSelectionListenerin classJmolViewer
-
processTwoPointGesture
public void processTwoPointGesture(float[][][] touches) -
processMouseEvent
public boolean processMouseEvent(int id, int x, int y, int modifiers, long time) -
processKeyEvent
-
getRubberBandSelection
-
isBound
public boolean isBound(int mouseAction, int jmolAction) -
getCursorX
public int getCursorX() -
getCursorY
public int getCursorY() -
getDefaultDirectory
-
getLocalUrl
-
getFileAsString
-
getBufferedInputStream
- Specified by:
getBufferedInputStreamin interfaceAtomDataServer
-
setLoadParameters
-
openFileAsyncSpecial
opens a file as a model, a script, or a surface via the creation of a script that is queued. Called from (JSmolCore.js)Jmol.$appEvent(,,"drop").reader.onloadend()- Specified by:
openFileAsyncSpecialin classJmolViewer- Parameters:
fileName-flags- 1=pdbCartoons, 2=no scripting, 4=append, 8=no autoplay, 16=file dropped, 32=script only (dropped into console) 64=check dims for resize
-
openFileAsyncSpecialType
- Specified by:
openFileAsyncSpecialTypein classJmolViewer
-
openFile
for JmolSimpleViewer -- external applications only (and no-script JavaScript)- Specified by:
openFilein classJmolViewer- Parameters:
fileName-- Returns:
- null or error
-
openFiles
for JmolSimpleViewer -- external applications only- Specified by:
openFilesin classJmolViewer- Parameters:
fileNames-- Returns:
- null or error
-
openReader
Opens the file, given an already-created reader.- Specified by:
openReaderin classJmolViewer- Parameters:
fullPathName-fileName- name without path or can just be nullreader- could be Reader, BufferedInputStream, or byte[]- Returns:
- null or error message
-
openDOM
applet DOM method -- does not preserve state- Specified by:
openDOMin classJmolViewer- Parameters:
DOMNode-- Returns:
- null or error
-
loadModelFromFile
public String loadModelFromFile(String fullPathName, String fileName, String[] fileNames, Object reader, boolean isAppend, Map<String, Object> htParams, SB loadScript, SB sOptions, int tokType, String filecat) Used by the ScriptEvaluator LOAD command to open one or more files. Now necessary for EVERY load of a file, as loadScript must be passed to the ModelLoader.- Parameters:
fullPathName- may be null; used only when reader != nullfileName- must not be nullfileNames- when present, reader is ignoredreader- may be a Reader, BufferedReader, byte[], or BufferedInputStreamisAppend-htParams-loadScript-sOptions-tokType-filecat- + or null, -, or space- Returns:
- null or error
-
setLigandModel
-
getLigandModel
obtain CIF data for a ligand for purposes of adding hydrogens or for any other purpose in terms of saving a data set for a file in a state- Parameters:
id- unique key; if null, clear "bad" entries from the set.prefix-suffix- or fileNameterminator- Only save to this if not null- Returns:
- a ligand model or a string if just file data or null
-
openStringInline
only used by file dropper.- Specified by:
openStringInlinein classJmolViewer
-
loadInline
from Applet and external applications only- Specified by:
loadInlinein classJmolViewer
-
loadInline
external apps only- Specified by:
loadInlinein classJmolViewer
-
loadInlineAppend
used by applet and console- Specified by:
loadInlineAppendin classJmolViewer
-
loadInline
external apps only- Specified by:
loadInlinein classJmolViewer
-
loadInline
external apps and applet only- Specified by:
loadInlinein classJmolViewer- Parameters:
arrayModels- and array of models, each of which is a StringisAppend-- Returns:
- null or error message
-
loadInline
External applications only; does not preserve state -- intentionally!- Specified by:
loadInlinein classJmolViewer- Parameters:
arrayData-isAppend-- Returns:
- null or error string
-
fixInlineString
-
openStringInlineParamsAppend
-
getInlineChar
public char getInlineChar() -
getCurrentFileAsString
-
getFullPathNameOrError
-
getFileAsString3
-
getFileAsString4
-
getAsciiFileOrNull
-
autoCalculate
-
calculateStraightness
public void calculateStraightness() -
calculateSurface
-
getStructureList
-
setStructureList
-
calculateStructures
-
getAnnotationParser
-
getSelectedAtomIterator
public AtomIndexIterator getSelectedAtomIterator(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean isMultiModel) - Specified by:
getSelectedAtomIteratorin interfaceAtomDataServer
-
setIteratorForAtom
- Specified by:
setIteratorForAtomin interfaceAtomDataServer
-
setIteratorForPoint
- Specified by:
setIteratorForPointin interfaceAtomDataServer
-
fillAtomData
- Specified by:
fillAtomDatain interfaceAtomDataServer
-
addStateScript
-
getMinimizer
-
getSmilesMatcher
-
clearModelDependentObjects
public void clearModelDependentObjects() -
zap
public void zap(boolean notify, boolean resetUndo, boolean zapModelKit) -
startHoverWatcher
public void startHoverWatcher(boolean tf) -
getModelSetPathName
- Specified by:
getModelSetPathNamein classJmolViewer
-
getModelSetFileName
- Specified by:
getModelSetFileNamein classJmolViewer
-
getUnitCellInfoText
-
getUnitCellInfo
public float getUnitCellInfo(int infoType) -
getUnitCellInfoStr
-
getV0abc
Convert string abc;offset or M3d or M4d to origin and three vectors -- a, b, c. The string can be preceded by ! for "reverse of". For example, "!a-b,-5a-5b,-c;7/8,0,1/8" offset is optional.- Parameters:
iModel-def- a string or an M3 or M4- Returns:
- vectors [origin a b c]
-
getCurrentUnitCell
-
getPolymerPointsAndVectors
-
getHybridizationAndAxes
-
getAllAtoms
-
getFrameAtoms
-
getVisibleFrameAtomsNoSplitData
-
getVisibleFramesBitSet
- Specified by:
getVisibleFramesBitSetin classJmolViewer
-
getVisibleFramesBitSetNoJmolData
-
getModelUndeletedAtomsBitSet
- Parameters:
modelIndex-- Returns:
- modifiable copy of this bitset
-
getModelUndeletedAtomsBitSetBs
-
getBoundBoxCenter
- Specified by:
getBoundBoxCenterin classJmolViewer
-
calcBoundBoxDimensions
-
getBoundBoxCornerVector
- Specified by:
getBoundBoxCornerVectorin classJmolViewer
-
getModelSetProperties
- Specified by:
getModelSetPropertiesin classJmolViewer
-
getModelProperties
- Specified by:
getModelPropertiesin classJmolViewer
-
getModelForAtomIndex
-
getModelIndexForAtom
public int getModelIndexForAtom(int iatom) -
getModelSetAuxiliaryInfo
- Specified by:
getModelSetAuxiliaryInfoin classJmolViewer
-
getModelNumber
public int getModelNumber(int modelIndex) - Specified by:
getModelNumberin classJmolViewer
-
getModelFileNumber
public int getModelFileNumber(int modelIndex) -
getModelNumberDotted
- Specified by:
getModelNumberDottedin classJmolViewer
-
getModelName
- Specified by:
getModelNamein classJmolViewer
-
modelHasVibrationVectors
public boolean modelHasVibrationVectors(int modelIndex) -
getBondsForSelectedAtoms
-
frankClicked
public boolean frankClicked(int x, int y) -
frankClickedModelKit
public boolean frankClickedModelKit(int x, int y) -
findNearestAtomIndex
public int findNearestAtomIndex(int x, int y) - Specified by:
findNearestAtomIndexin classJmolViewer
-
findNearestAtomIndexMovable
public int findNearestAtomIndexMovable(int x, int y, boolean mustBeMovable) -
toCartesian
absolute or relative to origin of UNITCELL {x y z}- Parameters:
pt-ignoreOffset-
-
toCartesianUC
-
toFractional
- Parameters:
pt-ignoreOffset- set true for relative to {0 0 0}; otherwise relative to origin of UNITCELL {x y z}
-
toFractionalUC
-
toUnitCell
Returns the relative to origin without regard to offset created using the UNITCELL command. This method has limited use. Used in point3f % 1, where {0 0 0} % 1 gives {a b c}- Parameters:
pt- a Cartesian pointoffset- a lattice offset, or null to apply the current offset
-
setCurrentCage
-
addUnitCellOffset
-
setAtomData
-
setCenterSelected
public void setCenterSelected()- Specified by:
setCenterSelectedin classJmolViewer
-
setBondTolerance
public void setBondTolerance(float bondTolerance) - Specified by:
setBondTolerancein classJmolViewer
-
setMinBondDistance
public void setMinBondDistance(float minBondDistance) - Specified by:
setMinBondDistancein classJmolViewer
-
getAtomsNearPt
-
getBranchBitSet
given a set of atoms, a subset of atoms to test, two atoms that start the branch, and whether or not to allow the branch to cycle back on itself,deliver the set of atoms constituting this branch.- Parameters:
atomIndex-atomIndexNot-allowCyclic-- Returns:
- bitset for this branch
-
getElementsPresentBitSet
- Specified by:
getElementsPresentBitSetin classJmolViewer
-
getCifData
-
readCifData
-
readCifData
- Specified by:
readCifDatain interfaceAtomDataServer
-
getStateCreator
-
getWrappedStateScript
-
getStateInfo
- Specified by:
getStateInfoin classJmolViewer
-
getStateInfo3
-
getStructureState
-
getCoordinateState
-
setCurrentColorRange
-
setData
public void setData(String key, Object[] data, int dataType, int matchField, int matchFieldColumnCount, int dataField, int dataFieldColumnCount) A general-purpose data storage method. Note that matchFieldCount and dataFieldCount should both be positive or both be negative.- Parameters:
key- a simple key name for the data, starting with "property_" if user-defineddata- data[0] -- label data[1] -- string or float[] or float[][] or float[][][] data[2] -- selection bitset or int[] atomMap when field > 0 data[3] -- arrayDepth 0(String),1(float[]),2(float[][]),3(float[][][]) or -1 to indidate that it is set by data type data[4] -- Boolean.TRUE == saveInStatedataType- see JmolDataManager interfacematchField- if positive, data must match atomNo in this column if 0, no match columnmatchFieldColumnCount- if positive, this number of characters in match column if 0, reference is to tokens, not charactersdataField- if positive, column containing the data if 0, values are a simple list; clear the data if Integer.MAX_VALUE, values are a simple list; don't clear the data if Integer.MIN_VALUE, have one SINGLE data value for all selected atomsdataFieldColumnCount- if positive, this number of characters in data column if 0, reference is to tokens, not characters
-
getDataObj
Retrieve a data object- Parameters:
key-bsSelected- selected atoms; for DATA_AF onlydataType- see JmolDataManager interface- Returns:
- data object data[0] -- label (same as key) data[1] -- string or float[] or float[][] or float[][][] data[2] -- selection bitset or int[] atomMap when field > 0 data[3] -- arrayDepth 0(String),1(float[]),2(float[][]),3(float[][][]) or -1 to indicate that it is set by data type data[4] -- Boolean.TRUE == saveInState
-
autoHbond
-
getDefaultMeasurementLabel
-
getMeasurementCount
public int getMeasurementCount()- Specified by:
getMeasurementCountin classJmolViewer
-
getMeasurementStringValue
- Specified by:
getMeasurementStringValuein classJmolViewer
-
getMeasurementInfoAsString
-
getMeasurementCountPlusIndices
public int[] getMeasurementCountPlusIndices(int i) - Specified by:
getMeasurementCountPlusIndicesin classJmolViewer
-
getPendingMeasurement
-
clearAllMeasurements
public void clearAllMeasurements() -
clearMeasurements
public void clearMeasurements()- Specified by:
clearMeasurementsin classJmolViewer
-
setAnimation
public void setAnimation(int tok) -
setAnimationFps
public void setAnimationFps(int fps) - Specified by:
setAnimationFpsin classJmolViewer
-
setAnimationOn
public void setAnimationOn(boolean animationOn) -
setAnimationRange
public void setAnimationRange(int modelIndex1, int modelIndex2) -
defineAtomSets
-
setAnimDisplay
-
setCurrentModelIndex
public void setCurrentModelIndex(int modelIndex) -
getTrajectoryState
-
setFrameOffsets
-
setCurrentModelIndexClear
public void setCurrentModelIndexClear(int modelIndex, boolean clearBackground) -
haveFileSet
public boolean haveFileSet() -
setBackgroundModelIndex
public void setBackgroundModelIndex(int modelIndex) -
getInMotion
public boolean getInMotion(boolean includeAnim) -
getMotionEventNumber
public int getMotionEventNumber()- Specified by:
getMotionEventNumberin classJmolViewer
-
setInMotion
public void setInMotion(boolean inMotion) - Specified by:
setInMotionin classJmolViewer
-
getRefreshing
public boolean getRefreshing() -
pushHoldRepaint
public void pushHoldRepaint()- Specified by:
pushHoldRepaintin classJmolViewer
-
pushHoldRepaintWhy
- Parameters:
why-
-
popHoldRepaint
- Specified by:
popHoldRepaintin classJmolViewer
-
refresh
initiate a repaint/update sequence if it has not already been requested. invoked whenever any operation causes changes that require new rendering. The repaint/update sequence will only be invoked if (a) no repaint is already pending and (b) there is no hold flag set in repaintManager. Sequence is as follows: 1) RepaintManager.refresh() checks flags and then calls Viewer.repaint() 2) Viewer.repaint() invokes display.repaint(), provided display is not null (headless) 3) The system responds with an invocation of Jmol.update(Graphics g), which we are routing through Jmol.paint(Graphics g). 4) Jmol.update invokes Viewer.setScreenDimensions(size), which makes the necessary changes in parameters for any new window size. 5) Jmol.update invokes Viewer.renderScreenImage(g, size, rectClip) 6) Viewer.renderScreenImage checks object visibility, invokes render1 to do the actual creation of the image pixel map and send it to the screen, and then invokes repaintView() 7) Viewer.repaintView() invokes RepaintManager.repaintDone(), to clear the flags and then use notify() to release any threads holding on wait().- Specified by:
refreshin classJmolViewer- Parameters:
mode- REFRESH_REPAINT: ONLY do a repaint -- no syncing REFRESH_SYNC: mouse motion requiring synchronization -- not going through Eval so we bypass Eval and mainline on the other vwr! Also called from j2sApplet.js REFRESH_REPAINT_SYNC_MASK: same as REFRESH_REPAINT, but not WebGL REFRESH_NO_MOTION_ONLY: refresh only if not in motion REFRESH_SEND_WEBGL_NEW_ORIENTATION: send WebGL a "new orientation" command at the end of a script using html5applet._refresh()strWhy- debugging or for passing mouse command when using REFRESH_SYNC
-
requestRepaintAndWait
-
clearShapeRenderers
public void clearShapeRenderers() -
isRepaintPending
public boolean isRepaintPending() -
notifyViewerRepaintDone
public void notifyViewerRepaintDone()- Specified by:
notifyViewerRepaintDonein classJmolViewer
-
areAxesTainted
public boolean areAxesTainted() -
generateOutputForExport
Description copied from class:JmolViewerfor POV-Ray- Specified by:
generateOutputForExportin classJmolViewer- Parameters:
params-- Returns:
- INI file
-
renderScreenImage
JmolViewer interface uses this, but that is all- Specified by:
renderScreenImagein classJmolViewer
-
renderScreenImageStereo
-
isCapturing
public boolean isCapturing() -
doCapture
public void doCapture() -
updateJS
public void updateJS()for JavaScript only -
evalFile
- Specified by:
evalFilein classJmolViewer
-
evalFileArgs
- Specified by:
evalFileArgsin classJmolViewer
-
getInsertedCommand
-
script
- Specified by:
scriptin classJmolViewer
-
evalString
- Specified by:
evalStringin classJmolViewer
-
evalStringQuiet
- Specified by:
evalStringQuietin classJmolViewer
-
evalStringQuietSync
-
clearScriptQueue
public void clearScriptQueue() -
checkHalt
- Specified by:
checkHaltin classJmolViewer
-
scriptWait
- Specified by:
scriptWaitin classJmolViewer
-
scriptWaitStatus
- Specified by:
scriptWaitStatusin classJmolViewer
-
exitJmol
public void exitJmol() -
scriptCheck
- Specified by:
scriptCheckin classJmolViewer
-
isScriptExecuting
public boolean isScriptExecuting()- Specified by:
isScriptExecutingin classJmolViewer
-
haltScriptExecution
public void haltScriptExecution()- Specified by:
haltScriptExecutionin classJmolViewer
-
pauseScriptExecution
public void pauseScriptExecution() -
hasDatabasePrefix
-
isDatabaseCode
public static boolean isDatabaseCode(char ch) -
setLoadFormat
Jmol will either specify a type or look for it in the first character, making sure it is found using isDatabaseCode() first. Starting with Jmol 13.1.13, we allow a generalized search using =xxx= where xxx is a known or user-specified database designation.- Parameters:
isSurface- TODOname-type- a character to distinguish the type of file, '?' means we are just doing an isosurface checkwithPrefix-- Returns:
- String or String[]
-
getStandardLabelFormat
-
getAdditionalHydrogens
-
setMarBond
public void setMarBond(short marBond) - Specified by:
setMarBondin classJmolViewer
-
setHoverLabel
-
showHover
public boolean showHover() -
isModelkitPickingRotateBond
public boolean isModelkitPickingRotateBond() -
hoverOnPt
-
setDebugScript
public void setDebugScript(boolean debugScript) - Specified by:
setDebugScriptin classJmolViewer
-
setCursor
public void setCursor(int cursor) -
setPickingMode
-
getPickingMode
public int getPickingMode() -
getDrawHover
public boolean getDrawHover() -
getAtomInfo
-
setJmolCallbackListener
- Specified by:
setJmolCallbackListenerin classJmolViewer
-
setJmolStatusListener
- Specified by:
setJmolStatusListenerin classJmolViewer
-
getStatusChanged
-
setStatusDragDropped
Allows a handler to set Jmol variable doDrop=false to cancel and also set the file type directly (Java) via the Jmol variable dropFileType (Java or JavaScript) if desired.- Parameters:
mode-x-y-fileName-retType-- Returns:
- true if we should still handle this.
-
setStatusResized
public void setStatusResized(int width, int height) resizeCallback is called whenever the applet gets a resize notification from the browser jmolSetCallback("resizeCallback", "myResizeCallback") function myResizeCallback(width, height) {}- Parameters:
width-height-
-
scriptStatus
scriptCallback is the primary way to monitor script status. In addition, it serves to for passing information to the user over the status line of the browser as well as to the console. Note that console messages are also sent by echoCallback. If messageCallback is enabled but not scriptCallback, these messages go to the messageCallback function instead. jmolSetCallback("scriptCallback", "myScriptCallback") function myScriptCallback(app, status, message, intStatus, errorMessageUntranslated) {} intStatus == -2 script start -- message is the script itself intStatus == 0 general messages during script execution; translated error message may be present intStatus >= 1 script termination message; translated and untranslated message may be present value is time for execution in milliseconds Eval.defineAtomSet -- compilation bug indicates problem in JmolConstants array Eval.instructionDispatchLoop -- debugScript messages Eval.logDebugScript -- debugScript messages Eval.pause -- script execution paused message Eval.runEval -- "Script completed" message Eval.script -- Chime "script" message Eval.scriptStatusOrBuffer -- various messages for Eval.checkContinue (error message) Eval.connect Eval.delete Eval.hbond Eval.load (logMessages message) Eval.message Eval.runEval (error message) Eval.write (error reading file) Eval.zap (error message) FileManager.createAtomSetCollectionFromFile "requesting..." for Chime-like compatibility actionManager.atomPicked "pick one more atom in order to spin..." for example Viewer.evalStringWaitStatus -- see above -2, 0 only if error, >=1 at termination Viewer.reportSelection "xxx atoms selected" - Parameters:
strStatus-
-
scriptStatusMsg
-
setScriptStatus
-
showUrl
syncCallback traps script synchronization messages and allows for cancellation (by returning "") or modification jmolSetCallback("syncCallback", "mySyncCallback") function mySyncCallback(app, script, appletName) { ...[modify script here]... return newScript } StatusManager.syncSend Viewer.setSyncTarget Viewer.syncScript- Specified by:
showUrlin classJmolViewer
-
setMeshCreator
an external applet or app with class that extends org.jmol.jvxl.MeshCreator might execute: org.jmol.viewer.Viewer vwr = applet.getViewer(); vwr.setMeshCreator(this); then that class's updateMesh(String id) method will be called whenever a mesh is rendered.- Parameters:
meshCreator-
-
showConsole
public void showConsole(boolean showConsole) -
getConsole
-
getParameter
- Specified by:
getParameterin classJmolViewer
-
getP
-
getPOrNull
-
unsetProperty
-
notifyStatusReady
public void notifyStatusReady(boolean isReady) - Specified by:
notifyStatusReadyin classJmolViewer
-
getBooleanProperty
- Specified by:
getBooleanPropertyin classJmolViewer
-
getInt
public int getInt(int tok) - Specified by:
getIntin classJmolViewer
-
getDelayMaximumMs
public int getDelayMaximumMs() -
getHermiteLevel
public int getHermiteLevel() -
getHoverDelay
public int getHoverDelay() -
getBoolean
public boolean getBoolean(int tok) - Specified by:
getBooleanin classJmolViewer
-
allowEmbeddedScripts
public boolean allowEmbeddedScripts() -
useMinimizationThread
public boolean useMinimizationThread() -
getFloat
public float getFloat(int tok) - Specified by:
getFloatin classJmolViewer
-
setStringProperty
- Specified by:
setStringPropertyin classJmolViewer
-
setFloatProperty
- Specified by:
setFloatPropertyin classJmolViewer
-
setIntProperty
- Specified by:
setIntPropertyin classJmolViewer
-
setIntPropertyTok
-
setBooleanProperty
- Specified by:
setBooleanPropertyin classJmolViewer
-
setBooleanPropertyTok
-
setSmilesString
-
removeUserVariable
-
showParameter
-
showString
-
getAllSettings
-
getBindingInfo
-
getIsosurfacePropertySmoothing
public int getIsosurfacePropertySmoothing(boolean asPower) -
setPerspectiveDepth
public void setPerspectiveDepth(boolean perspectiveDepth) - Specified by:
setPerspectiveDepthin classJmolViewer
-
setAxesOrientationRasmol
public void setAxesOrientationRasmol(boolean TF) - Specified by:
setAxesOrientationRasmolin classJmolViewer
-
getSelectionHalosEnabled
public boolean getSelectionHalosEnabled() -
setSelectionHalosEnabled
public void setSelectionHalosEnabled(boolean TF) -
getShowSelectedOnce
public boolean getShowSelectedOnce() -
getStrandCount
public int getStrandCount(int type) -
setAutoBond
public void setAutoBond(boolean TF) - Specified by:
setAutoBondin classJmolViewer
-
makeConnections
-
rebond
public void rebond()- Specified by:
rebondin classJmolViewer
-
rebondState
public void rebondState(boolean isStateScript) -
setPercentVdwAtom
public void setPercentVdwAtom(int value) - Specified by:
setPercentVdwAtomin classJmolViewer
-
getMadBond
public short getMadBond()- Specified by:
getMadBondin classJmolViewer
-
setShowHydrogens
public void setShowHydrogens(boolean TF) - Specified by:
setShowHydrogensin classJmolViewer
-
setShowBbcage
public void setShowBbcage(boolean value) -
getShowBbcage
public boolean getShowBbcage() -
setShowUnitCell
public void setShowUnitCell(boolean value) -
getShowUnitCell
public boolean getShowUnitCell() -
setShowAxes
public void setShowAxes(boolean value) -
getShowAxes
public boolean getShowAxes() -
setFrankOn
public void setFrankOn(boolean TF) - Specified by:
setFrankOnin classJmolViewer
-
getShowFrank
public boolean getShowFrank() -
setShowMeasurements
public void setShowMeasurements(boolean TF) - Specified by:
setShowMeasurementsin classJmolViewer
-
setUnits
-
setRasmolDefaults
public void setRasmolDefaults()- Specified by:
setRasmolDefaultsin classJmolViewer
-
setJmolDefaults
public void setJmolDefaults()- Specified by:
setJmolDefaultsin classJmolViewer
-
allocTempPoints
-
freeTempPoints
-
allocTempScreens
-
freeTempScreens
-
allocTempEnum
-
freeTempEnum
-
getFont3D
-
getAtomGroupQuaternions
-
setStereoMode
-
getChimeInfo
-
getModelFileInfo
-
getModelFileInfoAll
-
showEditor
-
setTainted
public void setTainted(boolean TF) -
checkObjectHovered
public boolean checkObjectHovered(int x, int y) -
rotateAxisAngleAtCenter
public boolean rotateAxisAngleAtCenter(JmolScriptEvaluator eval, P3 rotCenter, V3 rotAxis, float degreesPerSecond, float endDegrees, boolean isSpin, BS bsSelected) -
rotateAboutPointsInternal
-
startSpinningAxis
-
getModelDipole
-
calculateMolecularDipole
-
setDefaultLattice
-
getDefaultLattice
-
getModelExtract
-
getData
- Specified by:
getDatain classJmolViewer
-
getModelFileData
- Parameters:
atomExpression- -- will be wrapped in { } and evaluatedtype- -- lower case means "atom data only; UPPERCASE returns full file dataallTrajectories-- Returns:
- full or atom-only data formatted as specified
-
getModelCml
-
getPdbAtomData
-
isJmolDataFrame
public boolean isJmolDataFrame() -
getJmolDataSourceFrame
public int getJmolDataSourceFrame() -
getJmolDataFrameTypeInt
public int getJmolDataFrameTypeInt() -
setFrameTitle
-
setFrameTitleObj
-
getFrameTitle
-
setAtomProperty
-
checkCoordinatesChanged
-
setAtomCoords
-
setAtomCoordsRelative
-
invertAtomCoord
-
invertSelected
-
moveAtoms
-
warnAtom
public void warnAtom(int iatom) -
highlightBond
public void highlightBond(int index, int closestAtomIndex, int x, int y) from Sticks- Parameters:
index-closestAtomIndex- ignoredx-y-
-
highlight
-
refreshMeasures
public void refreshMeasures(boolean andStopMinimization) -
functionXY
fills an array with data -- if nX invalid input: '<' 0 and this would involve JavaScript, then this reads a full set of Double[][] in one function call. Otherwise it reads the values using individual function calls, which each return Double. If the functionName begins with "file:" then data are read from a file specified after the colon. The sign of nX is not relevant in that case. The file may contain mixed numeric and non-numeric values; the non-numeric values will be skipped by Parser.parseFloatArray- Parameters:
functionName-nX-nY-- Returns:
- nX by nY array of floating values
-
functionXYZ
-
extractMolData
- Specified by:
extractMolDatain classJmolViewer
-
getNMRPredict
-
getHelp
-
getChemicalInfo
-
addCommand
Adds one or more commands to the command history- Parameters:
command- the command to add
-
pushState
public void pushState() -
popState
public void popState() -
removeCommand
-
getSetHistory
Options include: ; all n == Integer.MAX_VALUE ; n prev n >= 1 ; next n == -1 ; set max to -2 - n n invalid input: '<'= -3 ; just clear n == -2 ; clear and turn off; return "" n == 0 ; clear and turn on; return "" n == Integer.MIN_VALUE;- Specified by:
getSetHistoryin classJmolViewer- Parameters:
howFarBack- number of lines (-1 for next line)- Returns:
- one or more lines of command history
-
historyFind
-
setHistory
-
getOutputChannel
-
writeTextFile
- Specified by:
writeTextFilein classJmolViewer
-
writeFile
-
clipImageOrPasteText
- Specified by:
clipImageOrPasteTextin classJmolViewer- Parameters:
text- null here clips image; String pastes text- Returns:
- "OK image to clipboard: [width] * [height] or "OK text to clipboard: [length]
-
getClipboardText
- Specified by:
getClipboardTextin classJmolViewer
-
processWriteOrCapture
-
createZip
-
outputToFile
- Specified by:
outputToFilein classJmolViewer- Parameters:
params- include type, fileName, text, bytes, quality, width, height- Returns:
- null (canceled) or a message starting with OK or an error message
-
syncScript
- Specified by:
syncScriptin classJmolViewer
-
getModelIndexFromId
- Specified by:
getModelIndexFromIdin classJmolViewer- Parameters:
id- some_id, filename#id, or ~fileNo.modelNo added ".basemodel" indicates to get the first model in a series from a JDX-MOL file.- Returns:
- model index if found; -2 if file found but model not found -2 if no file indicated and no model found -1 if no such file
-
setSyncDriver
public void setSyncDriver(int mode) -
setProteinType
-
getVanderwaalsMar
public int getVanderwaalsMar(int i) -
getVanderwaalsMarType
-
getDefaultVdwNameOrData
-
deleteAtoms
-
deleteModels
called by ZAP {atomExpression} when atoms are present or the command is specific for a model, such as ZAP 2.1- Parameters:
modelIndex-bsAtoms-- Returns:
- number of atoms deleted
-
deleteBonds
-
deleteModelAtoms
-
getQuaternionFrame
public char getQuaternionFrame() -
loadImageData
NOTE: This method is called from within a j2sNative block in awtjs2d.Platform.java as well as from FileManager.loadImage- Parameters:
image- could be a byte arraynameOrError-echoName- if this is an echo rather than the backgroundsco- delivered in JavaScript from Platform.java- Returns:
- false
-
cd
-
setErrorMessage
-
getErrorMessage
- Specified by:
getErrorMessagein classJmolViewer
-
getErrorMessageUn
- Specified by:
getErrorMessageUnin classJmolViewer
-
setShapeErrorState
-
getShapeErrorState
-
handleError
-
getFunctions
-
removeFunction
-
getFunction
-
isFunction
-
clearFunctions
public void clearFunctions() -
addFunction
-
getFunctionCalls
-
checkPrivateKey
public boolean checkPrivateKey(double privateKey) Simple method to ensure that the image creator (which writes files) was in fact opened by this vwr and not by some manipulation of the applet. When the image creator is used it requires both a vwr object and that vwr's private key. But the private key is private, so it is not possible to create a useable image creator without working through a vwr's own methods. Bob Hanson, 9/20/2009- Parameters:
privateKey-- Returns:
- true if privateKey matches
-
bindAction
-
unBindAction
-
calculateStruts
-
getPreserveState
public boolean getPreserveState()This flag if set FALSE: 1) turns UNDO off for the application 2) turns history off 3) prevents saving of inlinedata for later LOAD "" commands 4) turns off the saving of changed atom properties 5) does not guarantee accurate state representation 6) disallows generation of the state It is useful in situations such as web sites where memory is an issue and there is no need for such.- Returns:
- TRUE or FALSE
-
hasFocus
public boolean hasFocus() -
setFocus
public void setFocus() -
getMinimizationInfo
-
minimize
public void minimize(JmolScriptEvaluator eval, int steps, float crit, BS bsSelected, BS bsFixed, BS bsInFrame, float rangeFixed, int flags) throws Exception From the MINIMIZE command and other sources.- Parameters:
eval-steps- Integer.MAX_VALUE --> use defaultscrit- -1 --> use defaultsbsSelected-bsFixed-bsInFrame-rangeFixed-flags-- Throws:
Exception
-
setMotionFixedAtoms
-
setMotionFixed
-
getMotionFixedAtoms
For the current SINGLE model only.- Parameters:
sym- operationalSymmetrybsFixed- optional starting BitSet to be added to- Returns:
- bsFixed
-
getCenterAndPoints
-
writeFileData
-
getPdbData
-
getGroupsWithin
-
setShapeSize
- Parameters:
shapeID-madOrMad10- for axes, unitcell, and boundbox 10*mad; otherwise milliangstrom diameterbsSelected-
-
setShapeProperty
-
getShapeProperty
-
setModelVisibility
public void setModelVisibility() -
resetShapes
public void resetShapes(boolean andCreateNew) -
setParallel
public boolean setParallel(boolean TF) -
isParallel
public boolean isParallel() -
undoMoveAction
public int undoMoveAction(int action, int n) - Parameters:
action- Token.undo or Token.redon- number of steps to go back/forward; 0 for all; -1 for clear; -2 for clear BOTH- Returns:
- stack list count for action = T.count, or 0
-
undoMoveActionClear
public void undoMoveActionClear(int taintedAtom, int type, boolean clearRedo) -
moveAtomWithHydrogens
-
isModelPDB
public boolean isModelPDB(int i) -
deleteMeasurement
public void deleteMeasurement(int i) - Specified by:
deleteMeasurementin classJmolViewer
-
getSmiles
-
getOpenSmiles
- Specified by:
getOpenSmilesin classJmolViewer- Throws:
Exception
-
getBioSmiles
-
getSmilesOpt
public String getSmilesOpt(BS bsSelected, int index1, int index2, int flags, String options) throws Exception returns the SMILES string for a sequence or atom set does not include attached protons on groups- Parameters:
bsSelected- selected atom set or null for current or specified rangeindex1- when bsSeleced == null, first atomIndex or -1 for currentindex2- when bsSeleced == null, end atomIndex or -1 for currentflags- see JC.SMILES_xxxxoptions- e.g. /strict,open/- Returns:
- SMILES string
- Throws:
Exception
-
alert
-
prompt
-
dialogAsk
-
initializeExporter
-
getMouseEnabled
public boolean getMouseEnabled() -
calcAtomsMinMax
- Specified by:
calcAtomsMinMaxin classJmolViewer
-
getObjectMap
-
setPicked
public void setPicked(int atomIndex, boolean andReset) -
runScript
Run a script immediately using the script function script("xxxxxx") using direct script tokens for script ( "xxxxxxx" )- Specified by:
runScriptin classJmolViewer- Parameters:
script-- Returns:
- string from ScriptEvaluator#outputBuffer
-
runScriptCautiously
formerly runScript(), this method really can ONLY be called by the viewer being run from an already-running script. If it is invoked by a separate thread, it can wreak havoc on any queued thread, since they are not thread safe.- Overrides:
runScriptCautiouslyin classJmolViewer- Parameters:
script-- Returns:
- output of the script.
-
setFrameDelayMs
public void setFrameDelayMs(long millis) -
getBaseModelBitSet
-
clearTimeouts
public void clearTimeouts() -
setTimeout
-
triggerTimeout
-
clearTimeout
-
showTimeout
-
getOrCalcPartialCharges
- Throws:
JmolAsyncException
-
calculatePartialCharges
- Throws:
JmolAsyncException
-
setCurrentModelID
-
cacheClear
public void cacheClear() -
cachePut
-
cacheFileByName
-
clearThreads
public void clearThreads() -
getEvalContextAndHoldQueue
-
getDefaultPropertyParam
-
getPropertyNumber
-
checkPropertyParameter
-
extractProperty
-
addHydrogens
-
addHydrogensInline
-
evalFunctionFloat
- Specified by:
evalFunctionFloatin interfaceAtomDataServer
-
evalParallel
-
evaluateExpression
synchronized here trapped the eventQueue; see also evaluateExpressionAsVariable- Specified by:
evaluateExpressionin classJmolViewer- Parameters:
stringOrTokens-- Returns:
- a String representation of the evaluated expression
-
evaluateExpressionAsVariable
- Specified by:
evaluateExpressionAsVariablein classJmolViewer- Parameters:
stringOrTokens-- Returns:
- a String representation of the evaluated expression as a script variable (org.jmol.script.SV)
-
getAtomBitSet
-
getScriptContext
-
getAtomDefs
-
setCGO
-
setModelSet
-
setObjectProp
-
setDihedrals
-
getChainID
Create a unique integer for any chain string. Note that if there are any chains that are more than a single character, chainCaseSensitive is automatically set TRUE- Parameters:
id- invalid input: '<' 256 is just the character of a single-character upper-case chain id, upper or lower case query; >= 256 invalid input: '<' 300 is lower case found in structureisAssign- from a file reader, not a select query- Returns:
- i
-
getChainIDStr
-
getScriptQueueInfo
-
getNMRCalculation
-
getDistanceUnits
-
calculateFormalCharges
-
setModulation
-
checkInMotion
public void checkInMotion(int state) -
checkMotionRendering
public boolean checkMotionRendering(int tok) check motion for rendering during mouse movement, spin, vibration, and animation- Parameters:
tok-- Returns:
- TRUE if allowed
-
openExportChannel
public OC openExportChannel(double privateKey, String fileName, boolean asWriter) throws IOException - Throws:
IOException
-
log
- Specified by:
login interfaceAtomDataServer
-
getLogFileName
-
getCommands
-
allowCapture
public boolean allowCapture() -
compileExpr
-
checkSelect
-
getAnnotationInfo
-
getAtomValidation
-
getJBR
-
checkMenuUpdate
public void checkMenuUpdate() -
getChimeMessenger
-
getModelSetAuxiliaryInfoForAtoms
-
parseJSON
-
parseJSONMap
-
parseJSONArray
-
getSymTemp
Retrieve a new Symmetry object.- Returns:
- org.jmol.symmetry.Symmetry object
-
getSymStatic
Retrieve the static Symmetry object, which should be used only statically- Returns:
- org.jmol.symmetry.Symmetry object
-
setWindowDimensions
public void setWindowDimensions(float[] dims) -
getTriangulator
-
getCurrentModelAuxInfo
-
startNBO
-
startPlugin
-
connectNBO
-
getNBOAtomLabel
-
calculateChirality
-
getSubstructureSetArray
-
getSubstructureSetArrayForNodes
-
getSmilesAtoms
-
calculateChiralityForSmiles
-
getPdbID
-
getModelInfo
-
notifyScriptEditor
-
sendConsoleMessage
-
getModelkitPropertySafely
-
setModelkitPropertySafely
-
isModelKitOption
Check for an option type 'M' 'S' 'U' 'B'.- Parameters:
type-value-- Returns:
- true or false, but true only if the modelkit already exists
-
getSymmetryInfo
public Object getSymmetryInfo(int iatom, String xyz, int iOp, P3 translation, P3 pt1, P3 pt2, int type, String desc, float scaleFactor, int nth, int options, int[] opList) A general method for retrieving symmetry information with full capability of the symop() scripting function.- Parameters:
iatom- atom index specifying the model set and used for pt1 if that is null and also for matching element type.xyz- the desired Jones-Faithful representation of the symmetry operation or nulliOp- the desired symmetry operation [1-n] or 0translation- [i j k] translational addition to symoppt1- the starting point, or null if to use iatom or otherwise unnecessarypt2- the target point, if this is a point-to-point determination, or the offset if not and options is nonzerotype- a token type such as T.list or T.arraydesc- if type == T.nada (0), a name evaluating to a type, or one of the special names: "info", "description", "matrix", "axispoint", or "time" (as in time-reversal); otherwise, if type == T.draw, the root id given to a returned DRAW command setscaleFactor- if nonzero and type == T.draw, a scaling factor to be applied to the rotational vectornth- in the case of a point-to-point determination, the nth matching operator, or 0 for "all"options- if nonzero, a option, currently just T.offset, indicating that pt1 is an {i j k} offset from cell 555opList-- Returns:
- string, Object[], or Lstinvalid input: '<'Object[]>
-
getMacro
-
getConsoleFontScale
public int getConsoleFontScale() -
setConsoleFontScale
public void setConsoleFontScale(int scale) -
confirm
-
evalStringGUI
Run a script asynchronously, adding the GUI flag to indicate that we should fire the SELECT callback at the end if there is one.- Parameters:
script-
-
selectStatus
public void selectStatus(BS bs, boolean isGroup, int addRemove, boolean isQuiet, boolean reportStatus) "SELECT" starting with comma triggers the SELECT callback from a SELECT command. GUI scripts also trigger this if a select command has been given and the last select command given did not start with comma.- Parameters:
bs-isGroup-addRemove-isQuiet-reportStatus-
-
setStatusSelect
Make the SelectCallback call and reset the hasSelected value to false. This method is called by SELECT , ... or by a GUI script command completion or an atom selection using the mouse.- Parameters:
bs-
-
wasmInchiHack
-
getInchi
Get an InChI or InChIKey for a set of atoms or MOL data.- Parameters:
atoms-molData- null, or MOL data, or a database $ or : call, or SMILES, or "InChI=...." to retrieve the key or (Java Only) internal InChI structure as a stringoptions-- Returns:
- InChI or InChIKey
-
findSpaceGroup
public Object findSpaceGroup(SymmetryInterface sym, BS bsAtoms, String xyzList, float[] unitCellParams, T3 origin, T3[] oabc, int flags) - Parameters:
sym-bsAtoms-xyzList- if present, a semicolon-separated list of operatorsunitCellParams-origin-oabc-flags- special flags- Returns:
- either an array of space group identifiers or, if asString, "", or null
-
restrictToModel
Restrict this bitset to the current model or its initial atom's model.- Parameters:
bs- or null for selected (or if none selected, then the current model)mi- >=0 for a specific model, -1 to restrict to current model if a single model or the first model of multiply displayed models- Returns:
- restricted atom set
-
getThisModelAtoms
-
getSymmetryEquivPoints
-
getSymmetryEquivPointList
-
getOperativeSymmetry
Only return symmetry that has operators.- Returns:
- SymmetryInterface or null
-
formatText
-
getScaleText
-
setStatusAtomMoved
-
getFormulaForAtoms
-
evalCallback
-
checkConsoleScript
-
haveAccessInternal
Check for allowed access only to the designated path starting with this path. Restricts access to internal PNGJ files and disallows WRITE and JAVASCRIPT commands from within PNGJ files. Java only.- Parameters:
path-- Returns:
- if path is not null, return true if access is allowed to this path; when path is null, return true if this access is internal only
-
setAccessInternal
Set access to the specified path only; used for restricting file read/write access to only those files within the zip block of a PNGJ file Java only.- Parameters:
path-
-
getItaNumberFor
-
is2D
public boolean is2D() -
getUnitCellCenter
-
setUnitCellAtomIndex
public void setUnitCellAtomIndex(int iAtom) -
getUnitCellAtomIndex
public int getUnitCellAtomIndex() -
writeBinaryFile
-
rotateModelSpinVectors
-
rotateSpins
public void rotateSpins(int deltaX, int deltaY)
-