Package org.jmol.viewer
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 TypeFieldDescriptionboolean
boolean
static String
static String
static String
boolean
int
boolean
boolean
int
boolean
boolean
boolean
boolean
boolean
determined 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 float
boolean
static final boolean
static boolean
adjustableboolean
static boolean
boolean
boolean
boolean
boolean
boolean
static boolean
boolean
boolean
boolean
static JmolToJSmolInterface
static String
boolean
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
org.jmol.viewer.ModelManager
static final int
static final int
static final int
static final int
static final int
static final int
static final int
boolean
boolean
static int
static final boolean
boolean
static final int
static final int
static final int
static final int
static final int
boolean
int
static String
static String
static String
static final String
static final String
boolean
int
Fields inherited from class org.jmol.api.JmolViewer
apiPlatform, menuStructure
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(String command) Adds one or more commands to the command historyvoid
addFunction
(JmolScriptFunction function) addHydrogens
(BS bsAtoms, int flags) void
addSelectionListener
(JmolSelectionListener listener) addStateScript
(String script, boolean addFrameNumber, boolean postDefinitions) void
addUnitCellOffset
(P3 pt) void
protected static JmolViewer
allocateViewer
(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) boolean
boolean
boolean
void
autoCalculate
(int tokProperty, String dataType) int
void
bindAction
(String desc, String name) bsA()
void
int
cacheFileByName
(String fileName, boolean isAdd) void
JSInterface -- allows saving files in memory for later retrievalvoid
calcAtomsMinMax
(BS bs, BoxInfo boxInfo) void
calcBoundBoxDimensions
(BS bs, float scale) calculateChirality
(BS bsAtoms) String[]
calculateChiralityForSmiles
(String smiles) int
calculateMolecularDipole
(BS bsAtoms) void
calculatePartialCharges
(BS bsSelected) void
calculateStructures
(BS bsAtoms, boolean asDSSP, boolean setStructure, int version) int
calculateStruts
(BS bs1, BS bs2) P3[]
calculateSurface
(BS bsSelected, float envelopeRadius) boolean
checkConsoleScript
(String strScript) void
checkCoordinatesChanged
(BS bsAtoms) boolean
void
checkInMotion
(int state) void
boolean
checkMotionRendering
(int tok) check motion for rendering during mouse movement, spin, vibration, and animationboolean
checkObjectHovered
(int x, int y) 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.boolean
checkPropertyParameter
(String name) boolean
checkSelect
(Map<String, SV> h, T[] value) void
void
void
void
void
void
void
void
void
clearTimeout
(String name) void
clipImageOrPasteText
(String text) T[]
compileExpr
(String expr) int
void
connectNBO
(String type) void
defineAtomSets
(Map<String, Object> info) int
deleteAtoms
(BS bsAtoms, boolean fullModels) void
deleteBonds
(BS bsDeleted) void
deleteMeasurement
(int i) void
deleteModelAtoms
(int modelIndex, int firstAtomIndex, int nAtoms, BS bsModelAtoms) int
deleteModels
(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.void
displayAtoms
(BS bs, boolean isDisplay, boolean isGroup, int addRemove, boolean isQuiet) void
dispose()
end of life for this viewervoid
evalCallback
(String cmd, Object[] params, boolean doWait) evalFileArgs
(String strFilename, String args) float
evalFunctionFloat
(Object func, Object params, float[] values) boolean
evalParallel
(ScriptContext context, ShapeManager shapeManager) evalString
(String strScript) void
evalStringGUI
(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) void
exitJmol()
extractMolData
(String what) extractProperty
(Object property, Object args, int pt) void
fillAtomData
(AtomData atomData, int mode) protected void
finalize()
void
int
findNearestAtomIndex
(int x, int y) int
findNearestAtomIndexMovable
(int x, int y, boolean mustBeMovable) findSpaceGroup
(SymmetryInterface sym, BS bsAtoms, String xyzList, float[] unitCellParams, T3 origin, T3[] oabc, int flags) static String
fixInlineString
(String strModel, char newLine) formatText
(String text0) boolean
frankClicked
(int x, int y) boolean
frankClickedModelKit
(int x, int y) void
freeTempEnum
(STR[] temp) void
freeTempPoints
(P3[] tempPoints) void
freeTempScreens
(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) int
getBindingInfo
(String qualifiers) getBioSmiles
(BS bs) getBondsForSelectedAtoms
(BS bsAtoms) boolean
getBoolean
(int tok) boolean
getBooleanProperty
(String key) int
int
getBranchBitSet
(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) int
getChainID
(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) int
getCoordinateState
(BS bsSelected) float[]
getCurrentFileAsString
(String state) int
int
getDataObj
(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) int
boolean
getElementsPresentBitSet
(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) float
getFloat
(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) void
int
int
getHybridizationAndAxes
(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.char
boolean
getInMotion
(boolean includeAnim) int
getInt
(int tok) int
getIsosurfacePropertySmoothing
(boolean asPower) int
getItaNumberFor
(String name) getJBR()
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.static String
getJspecViewProperties
(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 directoryshort
int
int[]
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) int
getModelFileNumber
(int modelIndex) getModelForAtomIndex
(int iatom) int
getModelIndexForAtom
(int iatom) int
getModelInfo
(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) int
getModelNumber
(int modelIndex) getModelNumberDotted
(int modelIndex) getModelProperties
(int modelIndex) getModelSetAuxiliaryInfoForAtoms
(Object atomExpression) getModelUndeletedAtomsBitSet
(int modelIndex) getModelUndeletedAtomsBitSetBs
(BS bsModels) int
getMotionFixedAtoms
(SymmetryInterface sym, BS bsFixed) For the current SINGLE model only.boolean
getNBOAtomLabel
(Atom atom) getNMRPredict
(String type) short
getObjectColix
(int objId) int
getObjectMad10
(int objId) void
getObjectMap
(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()
int
void
getPolymerPointsAndVectors
(BS bs, Lst<P3[]> vList) getPOrNull
(String key) boolean
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.getProperty
(String returnType, String infoType, Object paramInfo) int
getPropertyNumber
(String name) char
boolean
float
getScalePixelsPerAngstrom
(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.int
int
getScreenImageBuffer
(Object g, boolean isImageWrite) Image.getJpgImage, ImageCreator.clipImage, getImageBytes, Viewer.renderScreenImageStereoint
getScriptContext
(String why) getSelectedAtomIterator
(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean isMultiModel) boolean
getSetHistory
(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) boolean
boolean
boolean
boolean
boolean
boolean
int[][]
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) int
getStrandCount
(int type) BS[]
getSubstructureSetArray
(String pattern, BS bsSelected, int flags) BS[]
getSubstructureSetArrayForNodes
(String pattern, Node[] nodes, int flags) Lst
<?> getSymmetryEquivPointList
(Lst<P3> pts, String flags) getSymmetryEquivPoints
(P3 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.float
getUnitCellInfo
(int infoType) T3[]
convert string abc;offset or M3 or M4 to origin and three vectors -- a, b, c.int
getVanderwaalsMar
(int i) int
getVanderwaalsMarType
(int atomicAndIsotopeNumber, VDW type) getZipDirectoryAsString
(String fileName) void
void
handleError
(Throwable er, boolean doClear) static boolean
hasDatabasePrefix
(String fileName) boolean
hasFocus()
boolean
hasStructure
(String pattern, String smiles, boolean isSmarts) boolean
final boolean
haveAccessInternal
(String path) Check for allowed access only to the designated path starting with this path.boolean
void
void
highlightBond
(int index, int closestAtomIndex, int x, int y) from StickshistoryFind
(String cmd, int dir) void
void
Hover over an arbitrary point.void
initialize
(boolean clearUserVariables, boolean isPyMOL) initializeExporter
(Map<String, Object> params) void
invertAtomCoord
(P3 pt, P4 plane, BS bs, int ringAtomIndex, boolean isClick) void
invertSelected
(P3 pt, P4 plane, int iAtom, BS bsAtoms) boolean
is2D()
boolean
isBound
(int mouseAction, int jmolAction) static boolean
isDatabaseCode
(char ch) boolean
isFunction
(String name) boolean
boolean
isModelKitOption
(char type, String value) Check for an option type 'M' 'S' 'U' 'B'.boolean
boolean
isModelPDB
(int i) boolean
boolean
boolean
boolean
isSubstructure
(String smarts, String smiles) boolean
loadImageData
(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.void
int[]
makeConnections
(float minDistance, float maxDistance, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy) boolean
void
minimize
(JmolScriptEvaluator eval, int steps, float crit, BS bsSelected, BS bsFixed, BS bsInFrame, float rangeFixed, int flags) From the MINIMIZE command and other sources.boolean
modelHasVibrationVectors
(int modelIndex) void
move
(JmolScriptEvaluator eval, V3 dRot, float dZoom, V3 dTrans, float dSlab, float floatSecondsTotal, int fps) void
moveAtoms
(M4 m4, M3 mNew, M3 rotation, V3 translation, P3 center, boolean isInternal, BS bsAtoms, boolean translationOnly, boolean useModelKit) int
moveAtomWithHydrogens
(int atomIndex, int deltaX, int deltaY, int deltaZ, P3 ptNew, BS bsAtoms) 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) void
moveUpdate
(float floatSecondsTotal) void
navigateAxis
(V3 rotAxis, float degrees) void
navigatePt
(P3 center) void
navTranslatePercent
(float x, float y) newMeasurementData
(String id, Lst<Object> points) void
notifyError
(String errType, String errMsg, String errMsgUntranslated) void
int
notifyMouseClicked
(int x, int y, int action, int mode) void
notifyScriptEditor
(int msWalltime, Object[] data) void
notifyStatusReady
(boolean isReady) void
applet DOM method -- does not preserve stateopenExportChannel
(double privateKey, String fileName, boolean asWriter) for JmolSimpleViewer -- external applications only (and no-script JavaScript)void
openFileAsyncSpecial
(String fileName, int flags) opens a file as a model, a script, or a surface via the creation of a script that is queued.void
openFileAsyncSpecialType
(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) void
void
popHoldRepaint
(String why) void
popState()
void
processKeyEvent
(Object event) boolean
processMouseEvent
(int id, int x, int y, int modifiers, long time) void
processTwoPointGesture
(float[][][] touches) processWriteOrCapture
(Map<String, Object> params) from eval write command only includes option to write set of filesvoid
void
pushHoldRepaintWhy
(String why) void
readCifData
(String fileName, Object rdrOrStringData, String type) readCifData
(String fileName, String type) void
readFileAsMap
(BufferedInputStream bis, Map<String, Object> map, String name) void
rebond()
void
rebondState
(boolean isStateScript) void
initiate a repaint/update sequence if it has not already been requested.void
refreshMeasures
(boolean andStopMinimization) void
Removes one command from the command historyvoid
removeFunction
(String name) void
removeSelectionListener
(JmolSelectionListener listener) void
removeUserVariable
(String key) void
renderScreenImage
(Object g, int width, int height) JmolViewer interface uses this, but that is allvoid
renderScreenImageStereo
(Object gLeft, boolean checkStereoSlave, int width, int height) void
void
reset
(boolean includingSpin) void
resetShapes
(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.boolean
rotateAboutPointsInternal
(JmolScriptEvaluator eval, P3 point1, P3 point2, float degreesPerSecond, float endDegrees, boolean isSpin, BS bsSelected, V3 translation, Lst<P3> finalPoints, float[] dihedralList, M4 m4, boolean useModelKit, P3[][] centerAndPoints) boolean
rotateAxisAngleAtCenter
(JmolScriptEvaluator eval, P3 rotCenter, V3 rotAxis, float degreesPerSecond, float endDegrees, boolean isSpin, BS bsSelected) void
void
rotateZBy
(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) void
scriptEcho
(String strEcho) void
scriptStatus
(String strStatus) scriptCallback is the primary way to monitor script status.void
scriptStatusMsg
(String strStatus, String statusMessage) scriptWait
(String strScript) scriptWaitStatus
(String strScript, String statusList) void
void
void
selectBonds
(BS bs) void
selectStatus
(BS bs, boolean isGroup, int addRemove, boolean isQuiet, boolean reportStatus) "SELECT" starting with comma triggers the SELECT callback from a SELECT command.void
sendConsoleMessage
(String msg) void
setAccessInternal
(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.void
setAnimation
(int tok) void
setAnimationFps
(int fps) void
setAnimationOn
(boolean animationOn) void
setAnimationRange
(int modelIndex1, int modelIndex2) void
setAnimDisplay
(BS bs) void
setAtomCoords
(BS bs, int tokType, Object xyzValues) void
setAtomCoordsRelative
(T3 offset, BS bs) void
setAtomData
(int type, String name, String coordinateData, boolean isDefault) void
setAtomProperty
(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list) void
setAutoBond
(boolean TF) void
setAxesOrientationRasmol
(boolean TF) void
setBackgroundImage
(String fileName, Object image) void
setBackgroundModelIndex
(int modelIndex) void
setBondTolerance
(float bondTolerance) void
setBooleanProperty
(String key, boolean value) void
setBooleanPropertyTok
(String key, int tok, boolean value) void
setCenterBitSet
(BS bsCenter, boolean doScale) void
void
void
setColorBackground
(String colorName) void
setConsoleFontScale
(int scale) void
setCurrentCage
(String isosurfaceId) void
setCurrentColorRange
(String label) void
void
setCurrentModelIndex
(int modelIndex) void
setCurrentModelIndexClear
(int modelIndex, boolean clearBackground) void
setCursor
(int cursor) void
setData
(String key, Object[] data, int dataType, int matchField, int matchFieldColumnCount, int dataField, int dataFieldColumnCount) A general-purpose data storage method.void
setDebugScript
(boolean debugScript) void
void
setDihedrals
(float[] dihedralList, BS[] bsBranches, float rate) void
setDisplay
(Object canvas) void
setElementArgb
(int elementNumber, int argb) setErrorMessage
(String errMsg, String errMsgUntranslated) void
setFloatProperty
(String key, float value) void
setFocus()
void
setFrameDelayMs
(long millis) void
setFrameOffsets
(BS bsAtoms, boolean isFull) void
setFrameTitle
(int modelIndex, String title) void
setFrameTitleObj
(Object title) void
setFrankOn
(boolean TF) void
setHistory
(String fileName) void
setHoverLabel
(String strLabel) void
setInMotion
(boolean inMotion) void
setInsertedCommand
(String strScript) void
setIntProperty
(String key, int value) void
setIntPropertyTok
(String key, int tok, int value) void
setIteratorForAtom
(AtomIndexIterator iterator, int atomIndex, float distance) void
setIteratorForPoint
(AtomIndexIterator iterator, int modelIndex, T3 pt, float distance) void
setJmolCallbackListener
(JmolCallbackListener listener) void
void
setJmolStatusListener
(JmolStatusListener listener) void
setLigandModel
(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) void
setMarBond
(short marBond) void
void
setMeshCreator
(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.void
setMinBondDistance
(float minBondDistance) setModelkitPropertySafely
(String key, Object value) Set a ModelKit property, but only if the modelkit exists already.void
setModelSet
(ModelSet modelSet) void
void
setModulation
(BS bs, boolean isOn, P3 t1, boolean isQ) void
setMotionFixed
(BS bs) void
void
setNavigationDepthPercent
(float percent) void
setNavigationMode
(boolean TF) void
setNewRotationCenter
(P3 center) void
setObjectArgb
(String name, int argb) void
setObjectMad10
(int iShape, String name, int mad10) input here is a JC.SHAPE_xxxx identifiersetObjectProp
(String id, int tokCommand) void
setObjectVisibility
(String name, boolean b) void
setOptions
(Map<String, Object> info) boolean
setParallel
(boolean TF) void
setPercentVdwAtom
(int value) void
setPerspectiveDepth
(boolean perspectiveDepth) void
setPicked
(int atomIndex, boolean andReset) void
setPickingMode
(String strMode, int pickingMode) void
setPropertyColorScheme
(String scheme, boolean isTranslucent, boolean isOverloaded) void
setProteinType
(STR type, BS bs) void
void
setRotationRadius
(float angstroms, boolean doAll) void
setScreenDimension
(int width, int height) void
setScriptStatus
(String strStatus, String statusMessage, int msWalltime, String strErrorMessageUntranslated) void
setSelectionHalosEnabled
(boolean TF) void
setSelectionSet
(BS set) void
setShapeErrorState
(int shapeID, String state) void
setShapeProperty
(int shapeID, String propertyName, Object value) void
setShapeSize
(int shapeID, int madOrMad10, BS bsSelected) void
setShowAxes
(boolean value) void
setShowBbcage
(boolean value) void
setShowHydrogens
(boolean TF) void
setShowMeasurements
(boolean TF) void
setShowUnitCell
(boolean value) void
void
void
setStatusAtomMoved
(boolean andCheckMinimize, BS bs) void
setStatusAtomPicked
(int atomIndex, String info, Map<String, Object> map, boolean andSelect) boolean
setStatusDragDropped
(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.void
setStatusMeasuring
(String status, int intInfo, String strMeasure, float value) 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) {}void
setStatusSelect
(BS bs) Make the SelectCallback call and reset the hasSelected value to false.void
void
setStereoMode
(int[] twoColors, STER stereoMode, float degrees) void
setStringProperty
(String key, String value) void
setStructureList
(float[] list, STR type) void
setSyncDriver
(int mode) void
setTainted
(boolean TF) void
setTimeout
(String name, int mSec, String script) void
void
setVectorScale
(float scale) void
setVibrationPeriod
(float period) void
setVibrationScale
(float scale) void
void
setWindowDimensions
(float[] dims) void
showConsole
(boolean showConsole) void
showEditor
(String[] file_text) void
showParameter
(String key, boolean ifNotSet, int nMax) void
showString
(String str, boolean isPrint) showTimeout
(String name) void
syncCallback traps script synchronization messages and allows for cancellation (by returning "") or modification jmolSetCallback("syncCallback", "mySyncCallback") function mySyncCallback(app, script, appletName) { ...[modify script here]...void
spinXYBy
(int xDelta, int yDelta, float speed) void
startHoverWatcher
(boolean tf) void
void
startPlugin
(String plugin) startup -U nbo optionvoid
startSpinningAxis
(T3 pt1, T3 pt2, boolean isClockwise) void
syncScript
(String script, String applet, int port) void
toCartesian
(T3 pt, boolean ignoreOffset) absolute or relative to origin of UNITCELL {x y z}void
toCartesianUC
(SymmetryInterface unitCell, T3 pt, boolean ignoreOffset) void
toFractional
(T3 pt, boolean ignoreOffset) void
toFractionalUC
(SymmetryInterface unitCell, T3 pt, boolean ignoreOffset) void
toUnitCell
(P3 pt, P3 offset) Returns the relative to origin without regard to offset created using the UNITCELL command.void
void
translateXYBy
(int xDelta, int yDelta) void
triggerTimeout
(String name) void
unBindAction
(String desc, String name) int
undoMoveAction
(int action, int n) void
undoMoveActionClear
(int taintedAtom, int type, boolean clearRedo) void
unsetProperty
(String key) void
updateJS()
for JavaScript onlyboolean
void
warnAtom
(int iatom) wasmInchiHack
(String cmd) WASM inchi must be initialized asynchronouslywriteFileData
(String fileName, String type, int modelIndex, Object[] parameters) writeTextFile
(String fileName, String data) void
zap
(boolean notify, boolean resetUndo, boolean zapModelKit) Methods inherited from class org.jmol.api.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
-
allowArrayDotNotation
public boolean allowArrayDotNotation -
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 -
isDoublePrecision
public static final boolean isDoublePrecision- See Also:
-
displayLoadErrors
public boolean displayLoadErrors -
stateScriptVersionInt
public int stateScriptVersionInt -
timeouts
-
-
Constructor Details
-
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:
getModelAdapter
in classJmolViewer
-
getSmartsMatch
- Specified by:
getSmartsMatch
in classJmolViewer
- Throws:
Exception
-
isSubstructure
-
hasStructure
-
getSmartsMatchForNodes
- Throws:
Exception
-
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:
resizeInnerPanel
in classJmolViewer
-
setScreenDimension
public void setScreenDimension(int width, int height) - Specified by:
setScreenDimension
in classJmolViewer
-
getScreenWidth
public int getScreenWidth()- Specified by:
getScreenWidth
in classJmolViewer
-
getScreenHeight
public int getScreenHeight()- Specified by:
getScreenHeight
in 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:
getScreenImageBuffer
in classJmolViewer
-
evalStringWaitStatusQueued
-
getModelkit
-
setMenu
- Specified by:
setMenu
in 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:
getProperty
in classJmolViewer
- Parameters:
returnType
- "JSON", "string", "readable", and anything else returns the Java object.infoType
-paramInfo
-- Returns:
- property data -- see org.jmol.viewer.PropertyManager.java
-
notifyMouseClicked
public int notifyMouseClicked(int x, int y, int action, int mode) -
getJzt
-
readFileAsMap
-
getZipDirectoryAsString
-
getImageAsBytes
- Specified by:
getImageAsBytes
in classJmolViewer
- Parameters:
type
-width
-height
-quality
-errMsg
- TODO- Returns:
- byte[] image, or null and an error message
-
releaseScreenImage
public void releaseScreenImage()- Specified by:
releaseScreenImage
in classJmolViewer
-
setDisplay
-
newMeasurementData
-
getExportDriverList
-
dispose
public void dispose()end of life for this viewer- Overrides:
dispose
in classJmolViewer
-
reset
public void reset(boolean includingSpin) -
homePosition
public void homePosition()- Specified by:
homePosition
in 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:
rotateFront
in classJmolViewer
-
translate
-
finalizeTransformParameters
public void finalizeTransformParameters() -
getScalePixelsPerAngstrom
public float getScalePixelsPerAngstrom(boolean asAntialiased) -
setSpin
-
getSpinState
-
getOrientation
- Parameters:
type
-name
-bs
-points
-- Returns:
- String or Quat or P3[]
-
getCurrentColorRange
public float[] getCurrentColorRange() -
setElementArgb
public void setElementArgb(int elementNumber, int argb) -
setVectorScale
public void setVectorScale(float scale) - Specified by:
setVectorScale
in classJmolViewer
-
setVibrationScale
public void setVibrationScale(float scale) - Specified by:
setVibrationScale
in classJmolViewer
-
setVibrationPeriod
public void setVibrationPeriod(float period) - Specified by:
setVibrationPeriod
in classJmolViewer
-
setObjectVisibility
-
setObjectArgb
-
setBackgroundImage
-
getObjectColix
public short getObjectColix(int objId) -
setColorBackground
- Specified by:
setColorBackground
in classJmolViewer
-
getBackgroundArgb
public int getBackgroundArgb()- Specified by:
getBackgroundArgb
in 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:
setSelectionSet
in classJmolViewer
-
selectBonds
-
displayAtoms
-
getDefinedAtomSet
-
selectAll
public void selectAll()- Specified by:
selectAll
in classJmolViewer
-
clearSelection
public void clearSelection()- Specified by:
clearSelection
in classJmolViewer
-
bsA
-
addSelectionListener
- Specified by:
addSelectionListener
in classJmolViewer
-
removeSelectionListener
- Specified by:
removeSelectionListener
in 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:
getBufferedInputStream
in 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:
openFileAsyncSpecial
in 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:
openFileAsyncSpecialType
in classJmolViewer
-
openFile
for JmolSimpleViewer -- external applications only (and no-script JavaScript)- Specified by:
openFile
in classJmolViewer
- Parameters:
fileName
-- Returns:
- null or error
-
openFiles
for JmolSimpleViewer -- external applications only- Specified by:
openFiles
in classJmolViewer
- Parameters:
fileNames
-- Returns:
- null or error
-
openReader
Opens the file, given an already-created reader.- Specified by:
openReader
in 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:
openDOM
in 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:
openStringInline
in classJmolViewer
-
loadInline
from Applet and external applications only- Specified by:
loadInline
in classJmolViewer
-
loadInline
external apps only- Specified by:
loadInline
in classJmolViewer
-
loadInlineAppend
used by applet and console- Specified by:
loadInlineAppend
in classJmolViewer
-
loadInline
external apps only- Specified by:
loadInline
in classJmolViewer
-
loadInline
external apps and applet only- Specified by:
loadInline
in 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:
loadInline
in classJmolViewer
- Parameters:
arrayData
-isAppend
-- Returns:
- null or error string
-
fixInlineString
-
openStringInlineParamsAppend
public String 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.- Parameters:
strModel
-htParams
-isAppend
-- Returns:
- null or error string
-
getInlineChar
public char getInlineChar() -
getCurrentFileAsString
-
getFullPathNameOrError
- Parameters:
filename
-- Returns:
- String[2] where [0] is fullpathname and [1] is error message or null
-
getFileAsString3
-
getFileAsString4
-
getAsciiFileOrNull
-
autoCalculate
-
calculateStraightness
public void calculateStraightness() -
calculateSurface
-
getStructureList
-
setStructureList
-
calculateStructures
- Parameters:
bsAtoms
-asDSSP
-setStructure
- to actually change structuresversion
-- Returns:
- structure string from DSSP
-
getAnnotationParser
-
getSelectedAtomIterator
public AtomIndexIterator getSelectedAtomIterator(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean isMultiModel) - Specified by:
getSelectedAtomIterator
in interfaceAtomDataServer
-
setIteratorForAtom
- Specified by:
setIteratorForAtom
in interfaceAtomDataServer
-
setIteratorForPoint
- Specified by:
setIteratorForPoint
in interfaceAtomDataServer
-
fillAtomData
- Specified by:
fillAtomData
in 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:
getModelSetPathName
in classJmolViewer
-
getModelSetFileName
- Specified by:
getModelSetFileName
in classJmolViewer
-
getUnitCellInfoText
-
getUnitCellInfo
public float getUnitCellInfo(int infoType) -
getV0abc
convert string abc;offset or M3 or M4 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, but it still needs a semicolon: "a/2,b/2,c;"- Parameters:
iModel
-def
- a string or an M3 or M4- Returns:
- vectors [origin a b c]
-
getCurrentUnitCell
-
getPolymerPointsAndVectors
-
getHybridizationAndAxes
-
getAllAtoms
-
getFrameAtoms
-
getVisibleFramesBitSet
- Specified by:
getVisibleFramesBitSet
in classJmolViewer
-
getModelUndeletedAtomsBitSet
-
getModelUndeletedAtomsBitSetBs
-
getBoundBoxCenter
- Specified by:
getBoundBoxCenter
in classJmolViewer
-
calcBoundBoxDimensions
-
getBoundBoxCornerVector
- Specified by:
getBoundBoxCornerVector
in classJmolViewer
-
getModelSetProperties
- Specified by:
getModelSetProperties
in classJmolViewer
-
getModelProperties
- Specified by:
getModelProperties
in classJmolViewer
-
getModelForAtomIndex
-
getModelIndexForAtom
public int getModelIndexForAtom(int iatom) -
getModelSetAuxiliaryInfo
- Specified by:
getModelSetAuxiliaryInfo
in classJmolViewer
-
getModelNumber
public int getModelNumber(int modelIndex) - Specified by:
getModelNumber
in classJmolViewer
-
getModelFileNumber
public int getModelFileNumber(int modelIndex) -
getModelNumberDotted
- Specified by:
getModelNumberDotted
in classJmolViewer
-
getModelName
- Specified by:
getModelName
in 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:
findNearestAtomIndex
in 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:
setCenterSelected
in classJmolViewer
-
setBondTolerance
public void setBondTolerance(float bondTolerance) - Specified by:
setBondTolerance
in classJmolViewer
-
setMinBondDistance
public void setMinBondDistance(float minBondDistance) - Specified by:
setMinBondDistance
in 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:
getElementsPresentBitSet
in classJmolViewer
-
getCifData
-
readCifData
-
readCifData
- Specified by:
readCifData
in interfaceAtomDataServer
-
getStateCreator
-
getWrappedStateScript
-
getStateInfo
- Specified by:
getStateInfo
in 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:
getMeasurementCount
in classJmolViewer
-
getMeasurementStringValue
- Specified by:
getMeasurementStringValue
in classJmolViewer
-
getMeasurementInfoAsString
-
getMeasurementCountPlusIndices
public int[] getMeasurementCountPlusIndices(int i) - Specified by:
getMeasurementCountPlusIndices
in classJmolViewer
-
getPendingMeasurement
-
clearAllMeasurements
public void clearAllMeasurements() -
clearMeasurements
public void clearMeasurements()- Specified by:
clearMeasurements
in classJmolViewer
-
setAnimation
public void setAnimation(int tok) -
setAnimationFps
public void setAnimationFps(int fps) - Specified by:
setAnimationFps
in 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:
getMotionEventNumber
in classJmolViewer
-
setInMotion
public void setInMotion(boolean inMotion) - Specified by:
setInMotion
in classJmolViewer
-
getRefreshing
public boolean getRefreshing() -
pushHoldRepaint
public void pushHoldRepaint()- Specified by:
pushHoldRepaint
in classJmolViewer
-
pushHoldRepaintWhy
- Parameters:
why
-
-
popHoldRepaint
- Specified by:
popHoldRepaint
in 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:
refresh
in 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:
notifyViewerRepaintDone
in classJmolViewer
-
areAxesTainted
public boolean areAxesTainted() -
generateOutputForExport
Description copied from class:JmolViewer
for POV-Ray- Specified by:
generateOutputForExport
in classJmolViewer
- Parameters:
params
-- Returns:
- INI file
-
renderScreenImage
JmolViewer interface uses this, but that is all- Specified by:
renderScreenImage
in classJmolViewer
-
renderScreenImageStereo
-
updateJS
public void updateJS()for JavaScript only -
evalFile
- Specified by:
evalFile
in classJmolViewer
-
evalFileArgs
- Specified by:
evalFileArgs
in classJmolViewer
-
getInsertedCommand
-
script
- Specified by:
script
in classJmolViewer
-
evalString
- Specified by:
evalString
in classJmolViewer
-
evalStringQuiet
- Specified by:
evalStringQuiet
in classJmolViewer
-
evalStringQuietSync
-
clearScriptQueue
public void clearScriptQueue() -
checkHalt
- Specified by:
checkHalt
in classJmolViewer
-
scriptWait
- Specified by:
scriptWait
in classJmolViewer
-
scriptWaitStatus
- Specified by:
scriptWaitStatus
in classJmolViewer
-
exitJmol
public void exitJmol() -
scriptCheck
- Specified by:
scriptCheck
in classJmolViewer
-
isScriptExecuting
public boolean isScriptExecuting()- Specified by:
isScriptExecuting
in classJmolViewer
-
haltScriptExecution
public void haltScriptExecution()- Specified by:
haltScriptExecution
in 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:
setMarBond
in classJmolViewer
-
setHoverLabel
-
isModelkitPickingRotateBond
public boolean isModelkitPickingRotateBond() -
hoverOnPt
Hover over an arbitrary point.- Parameters:
x
-y
-text
-id
- optional id to set _objecthovered topt
- optional pt to set "hovered" to
-
setDebugScript
public void setDebugScript(boolean debugScript) - Specified by:
setDebugScript
in classJmolViewer
-
setCursor
public void setCursor(int cursor) -
setPickingMode
-
getPickingMode
public int getPickingMode() -
getDrawHover
public boolean getDrawHover() -
getAtomInfo
-
setJmolCallbackListener
- Specified by:
setJmolCallbackListener
in classJmolViewer
-
setJmolStatusListener
- Specified by:
setJmolStatusListener
in 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:
showUrl
in 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:
getParameter
in classJmolViewer
-
getP
-
getPOrNull
-
unsetProperty
-
notifyStatusReady
public void notifyStatusReady(boolean isReady) - Specified by:
notifyStatusReady
in classJmolViewer
-
getBooleanProperty
- Specified by:
getBooleanProperty
in classJmolViewer
-
getInt
public int getInt(int tok) - Specified by:
getInt
in classJmolViewer
-
getDelayMaximumMs
public int getDelayMaximumMs() -
getHermiteLevel
public int getHermiteLevel() -
getHoverDelay
public int getHoverDelay() -
getBoolean
public boolean getBoolean(int tok) - Specified by:
getBoolean
in classJmolViewer
-
allowEmbeddedScripts
public boolean allowEmbeddedScripts() -
useMinimizationThread
public boolean useMinimizationThread() -
getFloat
public float getFloat(int tok) - Specified by:
getFloat
in classJmolViewer
-
setStringProperty
- Specified by:
setStringProperty
in classJmolViewer
-
setFloatProperty
- Specified by:
setFloatProperty
in classJmolViewer
-
setIntProperty
- Specified by:
setIntProperty
in classJmolViewer
-
setIntPropertyTok
-
setBooleanProperty
- Specified by:
setBooleanProperty
in classJmolViewer
-
setBooleanPropertyTok
-
setSmilesString
-
removeUserVariable
-
showParameter
-
showString
-
getAllSettings
-
getBindingInfo
-
getIsosurfacePropertySmoothing
public int getIsosurfacePropertySmoothing(boolean asPower) -
setPerspectiveDepth
public void setPerspectiveDepth(boolean perspectiveDepth) - Specified by:
setPerspectiveDepth
in classJmolViewer
-
setAxesOrientationRasmol
public void setAxesOrientationRasmol(boolean TF) - Specified by:
setAxesOrientationRasmol
in 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:
setAutoBond
in classJmolViewer
-
makeConnections
-
rebond
public void rebond()- Specified by:
rebond
in classJmolViewer
-
rebondState
public void rebondState(boolean isStateScript) -
setPercentVdwAtom
public void setPercentVdwAtom(int value) - Specified by:
setPercentVdwAtom
in classJmolViewer
-
getMadBond
public short getMadBond()- Specified by:
getMadBond
in classJmolViewer
-
setShowHydrogens
public void setShowHydrogens(boolean TF) - Specified by:
setShowHydrogens
in 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:
setFrankOn
in classJmolViewer
-
getShowFrank
public boolean getShowFrank() -
setShowMeasurements
public void setShowMeasurements(boolean TF) - Specified by:
setShowMeasurements
in classJmolViewer
-
setUnits
-
setRasmolDefaults
public void setRasmolDefaults()- Specified by:
setRasmolDefaults
in classJmolViewer
-
setJmolDefaults
public void setJmolDefaults()- Specified by:
setJmolDefaults
in 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
- Throws:
Exception
-
setDefaultLattice
-
getDefaultLattice
-
getModelExtract
public String getModelExtract(Object atomExpression, boolean doTransform, boolean isModelKit, String type) V3000, SDF, JSON, CD, XYZ, XYZVIB, XYZRN, CML, PDB, PQR- Parameters:
atomExpression
-doTransform
-isModelKit
-type
-- Returns:
- full file data
-
getData
- Specified by:
getData
in 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() -
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:
extractMolData
in classJmolViewer
-
getNMRPredict
- Parameters:
type
- C13 or H1- Returns:
- null
-
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
Removes one command from the command history- Returns:
- command removed
-
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:
getSetHistory
in classJmolViewer
- Parameters:
howFarBack
- number of lines (-1 for next line)- Returns:
- one or more lines of command history
-
historyFind
-
setHistory
-
getOutputChannel
-
writeTextFile
- Specified by:
writeTextFile
in classJmolViewer
-
writeFile
-
clipImageOrPasteText
- Specified by:
clipImageOrPasteText
in 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:
getClipboardText
in classJmolViewer
-
processWriteOrCapture
from eval write command only includes option to write set of files- Parameters:
params
-- Returns:
- message starting with "OK" or an error message
-
createZip
-
outputToFile
- Specified by:
outputToFile
in 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:
syncScript
in classJmolViewer
-
getModelIndexFromId
- Specified by:
getModelIndexFromId
in 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:
getErrorMessage
in classJmolViewer
-
getErrorMessageUn
- Specified by:
getErrorMessageUn
in 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:
deleteMeasurement
in classJmolViewer
-
getSmiles
NOT getting aromatic smiles- Specified by:
getSmiles
in classJmolViewer
- Throws:
Exception
-
getOpenSmiles
- Specified by:
getOpenSmiles
in classJmolViewer
- Throws:
Exception
-
getBioSmiles
- Throws:
Exception
-
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
Ask for new file name when saving or opening a file in Java and saving a file in JavaScript. JavaScript use of FileReader goes through loadFileAsync- Parameters:
type
-fileName
-params
-- Returns:
- new file name
-
initializeExporter
-
getMouseEnabled
public boolean getMouseEnabled() -
calcAtomsMinMax
- Specified by:
calcAtomsMinMax
in classJmolViewer
-
getObjectMap
used in autocompletion in console using TAB- Parameters:
map
-c
-
-
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:
runScript
in 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:
runScriptCautiously
in 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
JSInterface -- allows saving files in memory for later retrieval- Parameters:
key
-data
-
-
cacheFileByName
-
clearThreads
public void clearThreads() -
getEvalContextAndHoldQueue
-
getDefaultPropertyParam
-
getPropertyNumber
-
checkPropertyParameter
-
extractProperty
-
addHydrogens
-
addHydrogensInline
public BS addHydrogensInline(BS bsAtoms, Lst<Atom> vConnections, P3[] pts, Map<String, Object> htParams) throws Exception- Throws:
Exception
-
evalFunctionFloat
- Specified by:
evalFunctionFloat
in interfaceAtomDataServer
-
evalParallel
-
evaluateExpression
synchronized here trapped the eventQueue; see also evaluateExpressionAsVariable- Specified by:
evaluateExpression
in classJmolViewer
- Parameters:
stringOrTokens
-- Returns:
- a String representation of the evaluated expression
-
evaluateExpressionAsVariable
- Specified by:
evaluateExpressionAsVariable
in 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:
log
in 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
startup -U nbo option- Parameters:
plugin
-
-
connectNBO
-
getNBOAtomLabel
-
calculateChirality
-
getSubstructureSetArray
- Throws:
Exception
-
getSubstructureSetArrayForNodes
public BS[] getSubstructureSetArrayForNodes(String pattern, Node[] nodes, int flags) throws Exception - Throws:
Exception
-
getSmilesAtoms
- Throws:
Exception
-
calculateChiralityForSmiles
-
getPdbID
-
getModelInfo
get a value from the current model's Model.auxiliaryInfo- Parameters:
key
-- Returns:
- value, or null if there is no SINGLE current model
-
notifyScriptEditor
-
sendConsoleMessage
-
getModelkitPropertySafely
Get a ModelKit property, but only if the modelkit exists already.- Parameters:
name
- if null returns Boolean.TRUE if modelkit is instantiated- Returns:
- value
-
setModelkitPropertySafely
Set a ModelKit property, but only if the modelkit exists already.- Parameters:
key
-value
-- Returns:
- varies, quite possibly null
-
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
retrieve macros.json from the directory- Parameters:
key
-- Returns:
- the macro path
-
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
WASM inchi must be initialized asynchronously- Parameters:
cmd
-- Returns:
- cmd
-
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 keyoptions
-- 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
Depending upon the measure text, we need to indicate |-------| 1 A or 0.1 A for example.- Parameters:
units
-isAntialiased
-min
-ret
- return bar length in pixels- Returns:
- text
-
setStatusAtomMoved
-
getFormulaForAtoms
Get formula -- MF or CELLFORMULA, possibly empirical- Parameters:
bs
-type
-isEmpirical
-- Returns:
- formula as H xx C xx X xx...
-
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
-