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 TypeFieldDescriptionprivate Viewer.ACCESSbooleanprivate booleanprivate JmolAnnotationParserbooleanstatic Stringstatic Stringstatic Stringbooleanintbooleanprivate boolean(package private) javajs.util.BSprivate booleanprivate javajs.util.Lst<String>(package private) booleanprivate CommandHistoryprivate Stringprivate intbooleanintprivate intprivate Stringprivate boolean(package private) VDWboolean(package private) JmolDataManagerprivate JmolAnnotationParserprivate Stringprivate Stringbooleanprivate ObjectA graphics from a "slave" stereo display that has been synchronized with this this applet.booleanbooleanprivate booleanbooleandetermined 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 private intprivate booleanprivate Stringprivate Stringfloatprivate booleanprivate Stringbooleanbooleanstatic booleanboolean(package private) booleanprivate booleanbooleanbooleanbooleanprivate booleanprivate booleanbooleanprivate booleanA flag to indicate that THIS is the right-side panel of a pair of synced applets running a left-right stereo display (that would be piped into a dual-image polarized projector system such as GeoWall).static booleanbooleanboolean(package private) booleanboolean(package private) BioResolverprivate JmolChimeMessengerstatic JmolToJSmolInterface(package private) GenericMenuInterface(package private) JmolStateCreatorstatic Stringprivate JmolRendererInterfaceprivate javajs.util.JSJSONParserprivate JmolJSpecViewprivate javajs.api.GenericZipToolsprivate Object[]boolean(package private) Map<String,JmolScriptFunction> (package private) String(package private) Stringprivate intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate Minimizerprivate JmolAdapterprivate ModelKitstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate intprivate GenericMouseInterfaceeither org.jmol.awt.Mouse or org.jmol.awtjs2d.Mousejavajs.util.BSprivate booleanprivate boolean(package private) booleanprivate NBOParser(package private) JmolNMRInterfacebooleanbooleanstatic intstatic final booleanprivate OutputManager(package private) JmolPropertyManagerprivate intprivate floatprivate doubleprivate javajs.util.P3private javajs.util.P3private javajs.util.P3private javajs.util.P3booleanstatic final intstatic final intstatic final intstatic final intstatic final intprivate boolean(package private) JmolRepaintManagerprivate JmolScriptManager(package private) int(package private) intprivate JmolScriptEditorInterfacebooleanprivate booleanprivate booleanprivate SmilesMatcherInterfaceint(package private) static final Map<String,JmolScriptFunction> static Stringstatic Stringstatic Stringstatic final Stringstatic final String(package private) Stringprivate TempArraybooleanprivate Triangulatorintprivate boolean(package private) int[](package private) float[]private static StringFields inherited from class org.jmol.api.JmolViewer
apiPlatform, menuStructure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(String command) Adds one or more commands to the command historyvoidaddFunction(JmolScriptFunction function) javajs.util.BSaddHydrogens(javajs.util.BS bsAtoms, int flags) javajs.util.BSaddHydrogensInline(javajs.util.BS bsAtoms, javajs.util.Lst<Atom> vConnections, javajs.util.P3[] pts, Map<String, Object> htParams) voidaddSelectionListener(JmolSelectionListener listener) addStateScript(String script, boolean addFrameNumber, boolean postDefinitions) voidaddUnitCellOffset(javajs.util.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) javajs.util.P3[]allocTempPoints(int size) javajs.util.P3i[]allocTempScreens(int size) booleanbooleanbooleanassignSpaceGroup(javajs.util.BS bs, String type, int modelIndex) voidautoCalculate(int tokProperty, String dataType) intautoHbond(javajs.util.BS bsFrom, javajs.util.BS bsTo, boolean onlyIfHaveCalculated) private voidbeginRendering(boolean isDouble, boolean isImageWrite) voidbindAction(String desc, String name) javajs.util.BSbsA()voidintcacheFileByName(String fileName, boolean isAdd) voidJSInterface -- allows saving files in memory for later retrievalvoidcalcAtomsMinMax(javajs.util.BS bs, BoxInfo boxInfo) voidcalcBoundBoxDimensions(javajs.util.BS bs, float scale) calculateChirality(javajs.util.BS bsAtoms) String[]calculateChiralityForSmiles(String smiles) intcalculateFormalCharges(javajs.util.BS bs) javajs.util.V3calculateMolecularDipole(javajs.util.BS bsAtoms) voidcalculatePartialCharges(javajs.util.BS bsSelected) voidcalculateStructures(javajs.util.BS bsAtoms, boolean asDSSP, boolean setStructure, int version) intcalculateStruts(javajs.util.BS bs1, javajs.util.BS bs2) javajs.util.P3[]calculateSurface(javajs.util.BS bsSelected, float envelopeRadius) private voidcheckCIR(boolean forceCheck) Check to see if the resolver is workingvoidprivate static floatcheckFloatRange(float value, float min, float max) booleanvoidcheckInMotion(int state) private static intcheckIntRange(int value, int min, int max) voidprivate voidbooleancheckMotionRendering(int tok) check motion for rendering during mouse movement, spin, vibration, and animationcheckObjectClicked(int x, int y, int modifiers) (package private) booleancheckObjectDragged(int prevX, int prevY, int x, int y, int action) booleancheckObjectHovered(int x, int y) private booleancheckOption2(String key1, String key2) 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) voidprivate void(package private) voidvoidvoid(package private) voidvoidprivate voidclearRepaintManager(int iShape) voidvoidvoidvoidvoidclearTimeout(String name) voidclipImageOrPasteText(String text) T[]compileExpr(String expr) intvoidconnectNBO(String type) private StringcreateModelSetAndReturnError(Object atomSetCollection, boolean isAppend, javajs.util.SB loadScript, Map<String, Object> htParams) finally(!) we are ready to create the "model set" from the "atom set collection" - does NOT repaintvoiddefineAtomSets(Map<String, Object> info) intdeleteAtoms(javajs.util.BS bsAtoms, boolean fullModels) voiddeleteBonds(javajs.util.BS bsDeleted) voiddeleteMeasurement(int i) voiddeleteModelAtoms(int modelIndex, int firstAtomIndex, int nAtoms, javajs.util.BS bsModelAtoms) intdeleteModels(int modelIndex, javajs.util.BS bsAtoms) called by ZAP {atomExpression} when atoms are present or the command is specific for a model, such as ZAP 2.1(package private) voiddepthByPixels(int pixels) Ask for new file name when saving or opening a file in Java and saving a file in JavaScript.voiddisplayAtoms(javajs.util.BS bs, boolean isDisplay, boolean isGroup, int addRemove, boolean isQuiet) voiddispose()end of life for this viewerprivate boolean(package private) voiddragMinimizeAtom(int iAtom) private void(package private) voidechoMessage(String msg) 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) private ObjectvoidexitJmol()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(javajs.util.BS bsAtoms, String xyzList, float[] unitCell, boolean asString, boolean isAssign) static StringfixInlineString(String strModel, char newLine) formatText(String text0) booleanfrankClicked(int x, int y) booleanfrankClickedModelKit(int x, int y) voidfreeTempEnum(STR[] temp) voidfreeTempPoints(javajs.util.P3[] tempPoints) voidfreeTempScreens(javajs.util.P3i[] tempScreens) float[][]functionXY(String functionName, int nX, int nY) fills an array with data -- if nX < 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-Rayjavajs.util.P3[]getAdditionalHydrogens(javajs.util.BS bsAtoms, javajs.util.Lst<Atom> vConnections, int flags) javajs.util.BSgetAllSettings(String prefix) getAnnotationInfo(SV d, String match, int type) getAnnotationParser(boolean isDSSR) getAsciiFileOrNull(String name) javajs.util.BSgetAtomBitSet(Object atomExpression) (package private) javajs.util.BSgetAtomBitSetEval(JmolScriptEvaluator eval, Object atomExpression) getAtomDefs(Map<String, Object> names) javajs.util.Quat[]getAtomGroupQuaternions(javajs.util.BS bsAtoms, int nMax) (package private) voidgetAtomicPropertyState(javajs.util.SB commands, byte type, javajs.util.BS bs, String name, float[] data) getAtomInfo(int atomOrPointIndex) private StringgetAtomInfoXYZ(int atomIndex, int mode) javajs.util.BSgetAtomsNearPt(float distance, javajs.util.P3 coord, javajs.util.BS bs) javajs.util.Lst<Float>getAtomValidation(String type, Atom atom) intjavajs.util.BSgetBindingInfo(String qualifiers) getBioSmiles(javajs.util.BS bs) javajs.util.BSgetBondsForSelectedAtoms(javajs.util.BS bsAtoms) (package private) booleanbooleangetBoolean(int tok) booleangetBooleanProperty(String key) javajs.util.P3intintjavajs.util.V3javajs.util.BSgetBranchBitSet(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) javajs.util.P3[][]getCenterAndPoints(javajs.util.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, javajs.util.BS bsAtoms) getChimeInfo(int tok) getCifData(int modelIndex) javajs.util.P3getColorPointForPropertyValue(float val) intgetCoordinateState(javajs.util.BS bsSelected) float[]getCurrentFileAsString(String state) intintprivate JmolDataManagergetDataObj(String key, javajs.util.BS bsSelected, int dataType) Retrieve a data object(package private) Stringjavajs.util.P3getDefaultMeasurementLabel(int nPoints) getDefaultPropertyParam(int propertyID) getDefaultVdwNameOrData(int mode, VDW type, javajs.util.BS bs) javajs.util.BSgetDefinedAtomSet(String name) int(package private) booleanbooleanjavajs.util.BSgetElementsPresentBitSet(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) (package private) Object(package private) StringfloatgetFloat(int tok) getFormulaForAtoms(javajs.util.BS bs, String type, boolean isEmpirical) Get formula -- MF or CELLFORMULA, possibly empiricaljavajs.util.BSString[]getFullPathNameOrError(String filename) getFunction(String name) getFunctionCalls(String selectedFunction) getFunctions(boolean isStatic) This method is only called by JmolGLmol applet._refresh();javajs.util.BSgetGroupsWithin(int nResidues, javajs.util.BS bs) voidintintgetHybridizationAndAxes(int atomIndex, javajs.util.V3 z, javajs.util.V3 x, String lcaoType) private ObjectgetImage(boolean isDouble, boolean isImageWrite) 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) 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.static Stringprivate javajs.util.JSJSONParsergetJspecViewProperties(Object myParam) (package private) JmolJSpecViewgetJSV()javajs.api.GenericZipToolsgetJzt()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(javajs.util.BS bs, int nAtomsMax, boolean addBonds, boolean doTransform) javajs.util.V3getModelExtract(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) intgetModelInfo(String key) get a value from the current model's Model.auxiliaryInfogetModelkit(boolean andShow) Get a ModelKit property.getModelName(int modelIndex) intgetModelNumber(int modelIndex) getModelNumberDotted(int modelIndex) getModelProperties(int modelIndex) getModelSetAuxiliaryInfoForAtoms(Object atomExpression) javajs.util.BSgetModelUndeletedAtomsBitSet(int modelIndex) javajs.util.BSgetModelUndeletedAtomsBitSetBs(javajs.util.BS bsModels) intjavajs.util.BSbooleangetNBOAtomLabel(Atom atom) private NBOParsergetNMRPredict(String type) shortgetObjectColix(int objId) intgetObjectMad10(int objId) voidgetObjectMap(Map<String, ?> map, char c) used in autocompletion in console using TABgetOpenSmiles(javajs.util.BS bs) Only return symmetry that has operators.float[]getOrCalcPartialCharges(javajs.util.BS bsSelected, javajs.util.BS bsIgnore) getOrientation(int type, String name, javajs.util.BS bs) javajs.util.OCgetOutputChannel(String localName, String[] fullPath) private OutputManagergetParameter(String key) getPdbAtomData(javajs.util.BS bs, javajs.util.OC out, boolean asPQR, boolean doTransform) getPdbData(int modelIndex, String type, javajs.util.BS bsAtoms, Object[] parameters, javajs.util.OC oc, boolean getStructure) getPdbID()intvoidgetPolymerPointsAndVectors(javajs.util.BS bs, javajs.util.Lst<javajs.util.P3[]> vList) (package private) ObjectgetPOrNull(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) private JmolPropertyManagerintgetPropertyNumber(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) private JmolScriptManagergetSelectedAtomIterator(javajs.util.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 <= -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) private intgetShapePropertyAsInt(int shapeID, String propertyName) booleanbooleanbooleanbooleanbooleanbooleanint[][]getSmartsMap(String smilesOrSmarts, javajs.util.BS bsSelected, int flags) javajs.util.BSgetSmartsMatch(String smarts, javajs.util.BS bsSelected) javajs.util.BSgetSmartsMatchForNodes(String smarts, Node[] atoms) getSmiles(javajs.util.BS bs) Node[]getSmilesAtoms(String smiles) getSmilesOpt(javajs.util.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) javajs.util.Lst<javajs.util.Lst<javajs.util.Lst<Object>>>getStatusChanged(String statusNameList) intgetStrandCount(int type) javajs.util.BS[]getSubstructureSetArray(String pattern, javajs.util.BS bsSelected, int flags) javajs.util.BS[]getSubstructureSetArrayForNodes(String pattern, Node[] nodes, int flags) javajs.util.Lst<?>getSymmetryEquivPointList(javajs.util.Lst<javajs.util.P3> pts, String flags) javajs.util.Lst<javajs.util.P3>getSymmetryEquivPoints(javajs.util.P3 pt, String flags) getSymmetryInfo(int iatom, String xyz, int iOp, javajs.util.P3 translation, javajs.util.P3 pt1, javajs.util.P3 pt2, int type, String desc, float scaleFactor, int nth, int options) A general method for retrieving symmetry information with full capability of the symop() scripting function.Retrieve a Symmetry object, possibly re-using an old one.javajs.util.BSprivate javajs.util.BSgetUndeletedGroupAtomBits(javajs.util.BS bs) private SymmetryInterfacegetUnitCell(int m) floatgetUnitCellInfo(int infoType) javajs.util.T3[]convert string abc;offset or M3 or M4 to origin and three vectors -- a, b, c.intgetVanderwaalsMar(int i) intgetVanderwaalsMarType(int atomicAndIsotopeNumber, VDW type) javajs.util.BSgetZipDirectoryAsString(String fileName) voidvoidhandleError(Error er, boolean doClear) static booleanhasDatabasePrefix(String fileName) booleanhasFocus()booleanbooleanvoidhighlight(javajs.util.BS bs) voidhighlightBond(int index, int closestAtomIndex, int x, int y) from StickshistoryFind(String cmd, int dir) void(package private) voidhoverOff()(package private) voidhoverOn(int atomIndex, boolean isLabel) voidHover over an arbitrary point.voidinitialize(boolean clearUserVariables, boolean isPyMOL) initializeExporter(Map<String, Object> params) private voidinitializeModel(boolean isAppend) voidinvertAtomCoord(javajs.util.P3 pt, javajs.util.P4 plane, javajs.util.BS bs, int ringAtomIndex, boolean isClick) voidinvertSelected(javajs.util.P3 pt, javajs.util.P4 plane, int iAtom, javajs.util.BS bsAtoms) booleanisBound(int mouseAction, int jmolAction) static booleanisDatabaseCode(char ch) booleanisFunction(String name) boolean(package private) booleanisKiosk()private booleanisModel2D(javajs.util.BS bs) (package private) booleanbooleanisModelKitOption(char type, String value) private booleanbooleanbooleanisModelPDB(int i) booleanbooleanbooleanprivate boolean(package private) static booleanisStaticFunction(String name) private voidjmolTest()private StringloadAtomDataAndReturnError(Object atomSetCollection, int tokType) or just apply the data to the current model setprivate voidloadDefaultModelKitModel(Map<String, Object> htParams) 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 consoleprivate StringloadInlineScript(String strModel, char newLine, boolean isAppend, Map<String, Object> htParams) used by loadInline and openFileFullprivate StringloadInlineScriptRepaint(String strModel, char newLine, boolean isAppend) loadModelFromFile(String fullPathName, String fileName, String[] fileNames, Object reader, boolean isAppend, Map<String, Object> htParams, javajs.util.SB loadScript, javajs.util.SB sOptions, int tokType, String filecat) Used by the ScriptEvaluator LOAD command to open one or more files.private StringloadModelFromFileRepaint(String fullPathName, String fileName, String[] fileNames, Object reader) for JmolSimpleViewer -- external applications only (and no-script JavaScript)voidint[]makeConnections(float minDistance, float maxDistance, int order, int connectOperation, javajs.util.BS bsA, javajs.util.BS bsB, javajs.util.BS bsBonds, boolean isBonds, boolean addGroup, float energy) booleanvoidminimize(JmolScriptEvaluator eval, int steps, float crit, javajs.util.BS bsSelected, javajs.util.BS bsFixed, float rangeFixed, int flags) booleanmodelHasVibrationVectors(int modelIndex) voidmove(JmolScriptEvaluator eval, javajs.util.V3 dRot, float dZoom, javajs.util.V3 dTrans, float dSlab, float floatSecondsTotal, int fps) voidmoveAtoms(javajs.util.M4 m4, javajs.util.M3 mNew, javajs.util.M3 rotation, javajs.util.V3 translation, javajs.util.P3 center, boolean isInternal, javajs.util.BS bsAtoms, boolean translationOnly) protected voidmoveAtomWithHydrogens(int atomIndex, int deltaX, int deltaY, int deltaZ, javajs.util.BS bsAtoms) voidmoveSelected(int deltaX, int deltaY, int deltaZ, int x, int y, javajs.util.BS bsSelected, boolean isTranslation, boolean asAtoms, int modifiers) voidmoveTo(JmolScriptEvaluator eval, float floatSecondsTotal, javajs.util.P3 center, javajs.util.V3 rotAxis, float degrees, javajs.util.M3 rotationMatrix, float zoom, float xTrans, float yTrans, float rotationRadius, javajs.util.P3 navCenter, float xNav, float yNav, float navDepth, float cameraDepth, float cameraX, float cameraY) voidmoveUpdate(float floatSecondsTotal) (package private) voidnavigate(int keyWhere, int modifiers) voidnavigateAxis(javajs.util.V3 rotAxis, float degrees) voidnavigatePt(javajs.util.P3 center) voidnavTranslatePercent(float x, float y) newMeasurementData(String id, javajs.util.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 statejavajs.util.OCopenExportChannel(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) private ObjectopenFileFull(String fileName, boolean isAppend, Map<String, Object> htParams, javajs.util.SB loadScript) does NOT repaintfor 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.private StringopenStringsInlineParamsAppend(String[] arrayModels, Map<String, Object> htParams, boolean isAppend) opens multiple files inline; does NOT repaintoutputToFile(Map<String, Object> params) javajs.util.Lst<Object>parseJSONArray(String jsonArray) parseJSONMap(String jsonMap) voidvoidpopHoldRepaint(String why) voidpopState()(package private) voidpopupMenu(int x, int y, char type) 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) private voidrender()voidrenderScreenImage(Object g, int width, int height) JmolViewer interface uses this, but that is allvoidrenderScreenImageStereo(Object gLeft, boolean checkStereoSlave, int width, int height) (package private) voidreportSelection(String msg) voidvoidreset(boolean includingSpin) voidresetShapes(boolean andCreateNew) (package private) voidresizeImage(int width, int height, boolean isImageWrite, boolean isExport, boolean isReset) int[]resizeInnerPanel(int width, int height) (package private) StringresolveDatabaseFormat(String fileName) (package private) voidrestoreModelOrientation(int modelIndex) (package private) voidrestoreModelRotation(int modelIndex) javajs.util.BSrestrictToModel(javajs.util.BS bs, int mi) Restrict this bitset to the current model or its initial atom's model.booleanrotateAboutPointsInternal(JmolScriptEvaluator eval, javajs.util.P3 point1, javajs.util.P3 point2, float degreesPerSecond, float endDegrees, boolean isSpin, javajs.util.BS bsSelected, javajs.util.V3 translation, javajs.util.Lst<javajs.util.P3> finalPoints, float[] dihedralList, javajs.util.M4 m4) booleanrotateAxisAngleAtCenter(JmolScriptEvaluator eval, javajs.util.P3 rotCenter, javajs.util.V3 rotAxis, float degreesPerSecond, float endDegrees, boolean isSpin, javajs.util.BS bsSelected) void(package private) voidrotateSelected(float deltaX, float deltaY, javajs.util.BS bsSelected) (package private) voidrotateXYBy(float degX, float degY) voidrotateZBy(int zDelta, int x, int y) Run a script 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.(package private) voidscriptCheck(String strScript) private ObjectscriptCheckRet(String strScript, boolean returnContext) 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) voidselect(javajs.util.BS bs, boolean isGroup, int addRemove, boolean isQuiet) voidvoidselectBonds(javajs.util.BS bs) voidselectStatus(javajs.util.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) voidsetAnimation(int tok) voidsetAnimationFps(int fps) private voidsetAnimationMode(String mode) voidsetAnimationOn(boolean animationOn) voidsetAnimationRange(int modelIndex1, int modelIndex2) voidsetAnimDisplay(javajs.util.BS bs) private voidsetAntialias(int tok, boolean TF) (package private) voidsetApplySymmetryToBonds(boolean TF) voidsetAtomCoords(javajs.util.BS bs, int tokType, Object xyzValues) voidsetAtomCoordsRelative(javajs.util.T3 offset, javajs.util.BS bs) voidsetAtomData(int type, String name, String coordinateData, boolean isDefault) voidsetAtomProperty(javajs.util.BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list) voidsetAutoBond(boolean TF) (package private) voidsetAxesMode(int mode) voidsetAxesOrientationRasmol(boolean TF) private voidsetAxesScale(int tok, float val) voidsetBackgroundImage(String fileName, Object image) voidsetBackgroundModelIndex(int modelIndex) voidsetBondTolerance(float bondTolerance) voidsetBooleanProperty(String key, boolean value) private voidsetBooleanPropertyTok(String key, int tok, boolean value) voidsetCenterBitSet(javajs.util.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) private voidsetDefaultColors(boolean isRasmol) voidsetDefaultLattice(javajs.util.P3 p) private voidsetDefaultsType(String type) voidsetDihedrals(float[] dihedralList, javajs.util.BS[] bsBranches, float rate) voidsetDisplay(Object canvas) voidsetElementArgb(int elementNumber, int argb) setErrorMessage(String errMsg, String errMsgUntranslated) private voidsetFileLoadStatus(FIL ptLoad, String fullPathName, String fileName, String modelName, String strError, Boolean isAsync) voidsetFloatProperty(String key, float value) private voidsetFloatPropertyTok(String key, int tok, float value) voidsetFocus()voidsetFrameDelayMs(long millis) voidsetFrameOffsets(javajs.util.BS bsAtoms, boolean isFull) voidsetFrameTitle(int modelIndex, String title) voidsetFrameTitleObj(Object title) (package private) voidvoidsetFrankOn(boolean TF) voidsetHistory(String fileName) private voidsetHoverEnabled(boolean tf) voidsetHoverLabel(String strLabel) private voidsetHydrogens(javajs.util.BS bsAtoms) voidsetInMotion(boolean inMotion) voidsetInsertedCommand(String strScript) voidsetIntProperty(String key, int value) private voidsetIntPropertyTok(String key, int tok, int value) voidsetIteratorForAtom(AtomIndexIterator iterator, int atomIndex, float distance) voidsetIteratorForPoint(AtomIndexIterator iterator, int modelIndex, javajs.util.T3 pt, float distance) voidsetJmolCallbackListener(JmolCallbackListener listener) voidvoidsetJmolStatusListener(JmolStatusListener listener) voidsetLigandModel(String key, String data) setLoadFormat(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) private voidsetMaximumSize(int x) 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) private voidsetModelKitMode(boolean value) setModelkitPropertySafely(String key, Object value) voidsetModelSet(ModelSet modelSet) voidvoidsetModulation(javajs.util.BS bs, boolean isOn, javajs.util.P3 t1, boolean isQ) voidsetMotionFixed(javajs.util.BS bs) voidsetMotionFixedAtoms(javajs.util.BS bs) private javajs.util.BSsetMovableBitSet(javajs.util.BS bsSelected, boolean checkMolecule) voidsetNavigationDepthPercent(float percent) voidsetNavigationMode(boolean TF) voidsetNewRotationCenter(javajs.util.P3 center) voidsetObjectArgb(String name, int argb) (package private) voidsetObjectColor(String name, String colorName) 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) (package private) voidvoidsetPercentVdwAtom(int value) voidsetPerspectiveDepth(boolean perspectiveDepth) voidsetPicked(int atomIndex, boolean andReset) voidsetPickingMode(String strMode, int pickingMode) (package private) voidsetPickingStyle(String style, int pickingStyle) voidsetPropertyColorScheme(String scheme, boolean isTranslucent, boolean isOverloaded) voidsetProteinType(STR type, javajs.util.BS bs) voidprivate voidsetRefreshing(boolean TF) voidsetRotationRadius(float angstroms, boolean doAll) voidsetScreenDimension(int width, int height) private voidsetScriptQueue(boolean TF) voidsetScriptStatus(String strStatus, String statusMessage, int msWalltime, String strErrorMessageUntranslated) voidsetSelectionHalosEnabled(boolean TF) voidsetSelectionSet(javajs.util.BS set) voidsetShapeErrorState(int shapeID, String state) voidsetShapeProperty(int shapeID, String propertyName, Object value) voidsetShapeSize(int shapeID, int madOrMad10, javajs.util.BS bsSelected) voidsetShowAxes(boolean value) voidsetShowBbcage(boolean value) voidsetShowHydrogens(boolean TF) voidsetShowMeasurements(boolean TF) voidsetShowUnitCell(boolean value) voidvoidprivate voidvoidsetStatusAtomMoved(boolean andCheckMinimize, javajs.util.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.(package private) voidsetStatusFrameChanged(boolean isVib, boolean doNotify) 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(javajs.util.BS bs) Make the SelectCallback call and reset the hasSelected value to false.voidvoidsetStereoMode(int[] twoColors, STER stereoMode, float degrees) private voidsetStrandCount(int type, int value) voidsetStringProperty(String key, String value) private voidsetStringPropertyTok(String key, int tok, String value) voidsetStructureList(float[] list, STR type) private voidsetSync()voidsetSyncDriver(int mode) private voidsetSyncTarget(int mode, boolean TF) voidsetTainted(boolean TF) voidsetTimeout(String name, int mSec, String script) void(package private) voidsetUserVdw(VDW mode) (package private) voidvoidsetVectorScale(float scale) voidsetVibrationPeriod(float period) voidsetVibrationScale(float scale) voidvoidsetWindowDimensions(float[] dims) voidshowConsole(boolean showConsole) voidshowEditor(String[] file_text) voidshowParameter(String key, boolean ifNotSet, int nMax) voidshowString(String str, boolean isPrint) showTimeout(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]...(package private) voidslabByPixels(int pixels) (package private) voidslabDepthByPixels(int pixels) voidspinXYBy(int xDelta, int yDelta, float speed) voidstartHoverWatcher(boolean tf) voidvoidstartPlugin(String plugin) startup -U nbo optionvoidstartSpinningAxis(javajs.util.T3 pt1, javajs.util.T3 pt2, boolean isClockwise) (package private) voidvoidsyncScript(String script, String applet, int port) voidtoCartesian(javajs.util.T3 pt, boolean ignoreOffset) absolute or relative to origin of UNITCELL {x y z}voidtoCartesianUC(SymmetryInterface unitCell, javajs.util.T3 pt, boolean ignoreOffset) voidtoFractional(javajs.util.T3 pt, boolean ignoreOffset) voidtoFractionalUC(SymmetryInterface unitCell, javajs.util.T3 pt, boolean ignoreOffset) voidtoUnitCell(javajs.util.P3 pt, javajs.util.P3 offset) Returns the relative to origin without regard to offset created using the UNITCELL command.voidtranslate(char xyz, float x, char type, javajs.util.BS bsAtoms) voidtranslateXYBy(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 onlyprivate voidupdateJSView(int imodel, int iatom) File has been loaded or model has been changed or atom picked.private booleanupdateWindow(int width, int height) booleanwasmInchiHack(String cmd) WASM inchi must be initialized asynchronouslywriteFileData(String fileName, String type, int modelIndex, Object[] parameters) writeTextFile(String fileName, String data) voidzap(boolean notify, boolean resetUndo, boolean zapModelKit) private void(package private) voidzoomBy(int pixels) (package private) voidzoomByFactor(float factor, int x, int y) 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 -
mustRender
boolean mustRender -
htmlName
-
appletName
-
tryPt
public int tryPt -
insertedCommand
-
gdata
-
html5Applet
-
jmolObject
-
acm
-
am
-
cm
-
dm
-
shm
-
slm
-
rm
-
g
-
sm
-
tm
-
strJavaVendor
-
strOSName
-
strJavaVersion
-
syncId
String syncId -
logFilePath
String logFilePath -
allowScripting
private boolean allowScripting -
isPrintOnly
public boolean isPrintOnly -
isSignedApplet
public boolean isSignedApplet -
isSignedAppletLocal
private boolean isSignedAppletLocal -
isSilent
private boolean isSilent -
multiTouch
private boolean multiTouch -
noGraphicsAllowed
public boolean noGraphicsAllowed -
useCommandThread
private boolean useCommandThread -
commandOptions
-
vwrOptions
-
display
-
modelAdapter
-
access
-
commandHistory
-
mm
-
stm
-
scm
-
eval
-
tempArray
-
allowArrayDotNotation
public boolean allowArrayDotNotation -
async
public boolean async -
executor
-
version_date
-
screenWidth
int screenWidth -
screenHeight
int screenHeight -
defaultVdw
VDW defaultVdw -
rd
-
chainMap
-
chainList
-
errorMessage
-
errorMessageUntranslated
-
privateKey
private double privateKey -
dataOnly
private boolean dataOnly -
maximumSize
private int maximumSize -
gRight
A graphics from a "slave" stereo display that has been synchronized with this this applet. -
isStereoSlave
private boolean isStereoSlaveA flag to indicate that THIS is the right-side panel of a pair of synced applets running a left-right stereo display (that would be piped into a dual-image polarized projector system such as GeoWall). -
imageFontScaling
public float imageFontScaling -
antialiased
public boolean antialiased -
prevFrame
private int prevFrame -
prevMorphModel
private float prevMorphModel -
haveJDX
private boolean haveJDX -
jsv
-
outputManager
-
jzt
private javajs.api.GenericZipTools jzt -
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
public javajs.util.BS movableBitSet -
hasSelected
public boolean hasSelected -
mouse
either org.jmol.awt.Mouse or org.jmol.awtjs2d.Mouse -
ligandModels
-
ligandModelSet
-
annotationParser
-
dssrParser
-
minimizer
-
smilesMatcher
-
jsc
JmolStateCreator jsc -
lastData
-
motionEventNumber
private int motionEventNumber -
inMotion
private boolean inMotion -
refreshing
private boolean refreshing -
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:
-
axesAreTainted
private boolean axesAreTainted -
captureParams
-
jsParams
-
cirChecked
boolean cirChecked -
hoverAtomIndex
private int hoverAtomIndex -
hoverText
-
hoverLabel
-
hoverEnabled
private boolean hoverEnabled -
currentCursor
public int currentCursor -
ptTemp
private javajs.util.P3 ptTemp -
selectionHalosEnabled
private boolean selectionHalosEnabled -
frankOn
public boolean frankOn -
noFrankEcho
public boolean noFrankEcho -
scriptEditorVisible
public boolean scriptEditorVisible -
appConsole
-
scriptEditor
-
jmolpopup
GenericMenuInterface jmolpopup -
modelkit
-
headlessImageParams
-
pm
-
isTainted
boolean isTainted -
movingSelected
private boolean movingSelected -
showSelected
private boolean showSelected -
ptScreen
private javajs.util.P3 ptScreen -
ptScreenNew
private javajs.util.P3 ptScreenNew -
ptNew
private javajs.util.P3 ptNew -
atomHighlighted
public int atomHighlighted -
creatingImage
public boolean creatingImage -
SYNC_GRAPHICS_MESSAGE
- See Also:
-
SYNC_NO_GRAPHICS_MESSAGE
- See Also:
-
bsUserVdws
javajs.util.BS bsUserVdws -
userVdws
float[] userVdws -
userVdwMars
int[] userVdwMars -
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:
-
currentShapeID
private int currentShapeID -
currentShapeState
-
staticFunctions
-
localFunctions
Map<String,JmolScriptFunction> localFunctions -
isKiosk
boolean isKiosk -
MIN_SILENT
public static final int MIN_SILENT- 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_NO_RANGE
public static final int MIN_NO_RANGE- See Also:
-
MIN_XX
public static final int MIN_XX- See Also:
-
nProcessors
public static int nProcessors -
displayLoadErrors
public boolean displayLoadErrors -
isParallel
private boolean isParallel -
stateScriptVersionInt
public int stateScriptVersionInt -
jsExporter3D
-
timeouts
-
chainCaseSpecified
private boolean chainCaseSpecified -
nmrCalculation
JmolNMRInterface nmrCalculation -
logFileName
String logFileName -
jbr
BioResolver jbr -
jcm
-
jsonParser
private javajs.util.JSJSONParser jsonParser -
triangulator
-
nboParser
-
macros
-
consoleFontScale
private int consoleFontScale
-
-
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:
getModelAdapterin classJmolViewer
-
getSmartsMatch
- Specified by:
getSmartsMatchin classJmolViewer- Throws:
Exception
-
getSmartsMatchForNodes
- Throws:
Exception
-
getSmartsMap
public int[][] getSmartsMap(String smilesOrSmarts, javajs.util.BS bsSelected, int flags) throws Exception - 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
-
setMaximumSize
private void setMaximumSize(int x) -
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
-
resizeImage
void resizeImage(int width, int height, boolean isImageWrite, boolean isExport, boolean isReset) -
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() -
updateWindow
private boolean updateWindow(int width, int height) -
getImage
- Parameters:
isDouble-isImageWrite-- Returns:
- a java.awt.Image in the case of standard Jmol; an int[] in the case of Jmol-Android a canvas in the case of JSmol
-
beginRendering
private void beginRendering(boolean isDouble, boolean isImageWrite) -
render
private void render() -
drawImage
- Parameters:
graphic- In JavaScript/HTML5, a Canvas.Context2dimg-x-y-isDTI- DTI format -- scrunch width by factor of two
-
getScreenImage
-
getScreenImageBuffer
Image.getJpgImage, ImageCreator.clipImage, getImageBytes, Viewer.renderScreenImageStereo- Specified by:
getScreenImageBufferin classJmolViewer
-
evalStringWaitStatusQueued
-
popupMenu
void popupMenu(int x, int y, char type) -
getModelkit
-
getPopupMenu
Object getPopupMenu() -
setMenu
- Specified by:
setMenuin classJmolViewer
-
setStatusFrameChanged
void setStatusFrameChanged(boolean isVib, boolean doNotify) - Parameters:
isVib-doNotify- ignored; not implemented
-
doHaveJDX
private boolean doHaveJDX() -
getJSV
JmolJSpecView getJSV() -
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
-
isScriptQueued
private boolean isScriptQueued() -
notifyError
-
jsEval
-
jsEvalSV
-
setFileLoadStatus
-
getZapName
-
setStatusMeasuring
-
notifyMinimizationStatus
public void notifyMinimizationStatus() -
setStatusAtomPicked
-
getProperty
- Specified by:
getPropertyin classJmolViewer- Parameters:
returnType- "JSON", "string", "readable", and anything else returns the Java object.- Returns:
- property data -- see org.jmol.viewer.PropertyManager.java
-
notifyMouseClicked
public int notifyMouseClicked(int x, int y, int action, int mode) -
getOutputManager
-
getJzt
public javajs.api.GenericZipTools getJzt() -
readFileAsMap
-
getZipDirectoryAsString
-
getImageAsBytes
- Specified by:
getImageAsBytesin classJmolViewererrMsg- TODO- Returns:
- byte[] image, or null and an error message
-
releaseScreenImage
public void releaseScreenImage()- Specified by:
releaseScreenImagein classJmolViewer
-
setDisplay
-
newMeasurementData
-
getDataManager
-
getScriptManager
-
checkOption2
-
setStartupBooleans
private void setStartupBooleans() -
getExportDriverList
-
dispose
public void dispose()end of life for this viewer- Overrides:
disposein classJmolViewer
-
reset
public void reset(boolean includingSpin) -
homePosition
public void homePosition()- Specified by:
homePositionin classJmolViewer
-
initialize
public void initialize(boolean clearUserVariables, boolean isPyMOL) -
saveModelOrientation
void saveModelOrientation() -
restoreModelOrientation
void restoreModelOrientation(int modelIndex) -
restoreModelRotation
void restoreModelRotation(int modelIndex) -
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
public void setCenterBitSet(javajs.util.BS bsCenter, boolean doScale) -
setNewRotationCenter
public void setNewRotationCenter(javajs.util.P3 center) -
move
public void move(JmolScriptEvaluator eval, javajs.util.V3 dRot, float dZoom, javajs.util.V3 dTrans, float dSlab, float floatSecondsTotal, int fps) -
moveTo
public void moveTo(JmolScriptEvaluator eval, float floatSecondsTotal, javajs.util.P3 center, javajs.util.V3 rotAxis, float degrees, javajs.util.M3 rotationMatrix, float zoom, float xTrans, float yTrans, float rotationRadius, javajs.util.P3 navCenter, float xNav, float yNav, float navDepth, float cameraDepth, float cameraX, float cameraY) -
moveUpdate
public void moveUpdate(float floatSecondsTotal) -
zoomBy
void zoomBy(int pixels) -
zoomByFactor
void zoomByFactor(float factor, int x, int y) -
rotateXYBy
void rotateXYBy(float degX, float degY) -
spinXYBy
public void spinXYBy(int xDelta, int yDelta, float speed) -
rotateZBy
public void rotateZBy(int zDelta, int x, int y) -
rotateSelected
void rotateSelected(float deltaX, float deltaY, javajs.util.BS bsSelected) -
setMovableBitSet
private javajs.util.BS setMovableBitSet(javajs.util.BS bsSelected, boolean checkMolecule) -
translateXYBy
public void translateXYBy(int xDelta, int yDelta) -
rotateFront
public void rotateFront()- Specified by:
rotateFrontin classJmolViewer
-
translate
public void translate(char xyz, float x, char type, javajs.util.BS bsAtoms) -
slabByPixels
void slabByPixels(int pixels) -
depthByPixels
void depthByPixels(int pixels) -
slabDepthByPixels
void slabDepthByPixels(int pixels) -
finalizeTransformParameters
public void finalizeTransformParameters() -
getScalePixelsPerAngstrom
public float getScalePixelsPerAngstrom(boolean asAntialiased) -
setSpin
-
getSpinState
-
getOrientation
- Parameters:
type-name-bs-- Returns:
- String or Quat or P3[]
-
getCurrentColorRange
public float[] getCurrentColorRange() -
setDefaultColors
private void setDefaultColors(boolean isRasmol) -
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
-
setObjectColor
-
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
public javajs.util.P3 getColorPointForPropertyValue(float val) -
select
public void select(javajs.util.BS bs, boolean isGroup, int addRemove, boolean isQuiet) -
setSelectionSet
public void setSelectionSet(javajs.util.BS set) - Specified by:
setSelectionSetin classJmolViewer
-
selectBonds
public void selectBonds(javajs.util.BS bs) -
displayAtoms
public void displayAtoms(javajs.util.BS bs, boolean isDisplay, boolean isGroup, int addRemove, boolean isQuiet) -
getUndeletedGroupAtomBits
private javajs.util.BS getUndeletedGroupAtomBits(javajs.util.BS bs) -
reportSelection
-
clearAtomSets
private void clearAtomSets() -
getDefinedAtomSet
-
selectAll
public void selectAll()- Specified by:
selectAllin classJmolViewer
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin classJmolViewer
-
bsA
public javajs.util.BS bsA() -
addSelectionListener
- Specified by:
addSelectionListenerin classJmolViewer
-
removeSelectionListener
- Specified by:
removeSelectionListenerin classJmolViewer
-
getAtomBitSetEval
-
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
-
loadModelFromFileRepaint
private String loadModelFromFileRepaint(String fullPathName, String fileName, String[] fileNames, Object reader) for JmolSimpleViewer -- external applications only (and no-script JavaScript)- Parameters:
fullPathName-fileName-fileNames-reader-- Returns:
- error message or null
-
loadModelFromFile
public String loadModelFromFile(String fullPathName, String fileName, String[] fileNames, Object reader, boolean isAppend, Map<String, Object> htParams, javajs.util.SB loadScript, javajs.util.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
-
openFileFull
private Object openFileFull(String fileName, boolean isAppend, Map<String, Object> htParams, javajs.util.SB loadScript) does NOT repaint- Parameters:
fileName-isAppend-htParams-loadScript- only necessary for string reading- Returns:
- an AtomSetCollection or a String (error)
-
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
-
loadInlineScriptRepaint
-
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 String- 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
-
loadInlineScript
private String loadInlineScript(String strModel, char newLine, boolean isAppend, Map<String, Object> htParams) used by loadInline and openFileFull- Parameters:
strModel-newLine-isAppend-htParams-- Returns:
- null or error message
-
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
-
openStringsInlineParamsAppend
private String openStringsInlineParamsAppend(String[] arrayModels, Map<String, Object> htParams, boolean isAppend) opens multiple files inline; does NOT repaint- Parameters:
arrayModels-htParams-isAppend-- Returns:
- null or error message
-
getInlineChar
public char getInlineChar() -
getDataSeparator
String getDataSeparator() -
createModelSetAndReturnError
private String createModelSetAndReturnError(Object atomSetCollection, boolean isAppend, javajs.util.SB loadScript, Map<String, Object> htParams) finally(!) we are ready to create the "model set" from the "atom set collection" - does NOT repaint- Parameters:
atomSetCollection-isAppend-loadScript- if null, then some special method like DOM; turn off preserveStatehtParams-- Returns:
- errMsg
-
loadAtomDataAndReturnError
or just apply the data to the current model set- Parameters:
atomSetCollection-tokType-- Returns:
- error or null
-
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
public javajs.util.P3[] calculateSurface(javajs.util.BS bsSelected, float envelopeRadius) -
getStructureList
-
setStructureList
-
calculateStructures
public String calculateStructures(javajs.util.BS bsAtoms, boolean asDSSP, boolean setStructure, int version) - Parameters:
bsAtoms-asDSSP-setStructure- to actually change structuresversion-- Returns:
- structure string from DSSP
-
getAnnotationParser
-
getSelectedAtomIterator
public AtomIndexIterator getSelectedAtomIterator(javajs.util.BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean isMultiModel) - Specified by:
getSelectedAtomIteratorin interfaceAtomDataServer
-
setIteratorForAtom
- Specified by:
setIteratorForAtomin interfaceAtomDataServer
-
setIteratorForPoint
public void setIteratorForPoint(AtomIndexIterator iterator, int modelIndex, javajs.util.T3 pt, float distance) - 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) -
loadDefaultModelKitModel
-
zapMsg
-
echoMessage
-
initializeModel
private void initializeModel(boolean isAppend) -
startHoverWatcher
public void startHoverWatcher(boolean tf) -
getModelSetPathName
- Specified by:
getModelSetPathNamein classJmolViewer
-
getModelSetFileName
- Specified by:
getModelSetFileNamein 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
-
getUnitCell
-
getPolymerPointsAndVectors
public void getPolymerPointsAndVectors(javajs.util.BS bs, javajs.util.Lst<javajs.util.P3[]> vList) -
getHybridizationAndAxes
-
getAllAtoms
public javajs.util.BS getAllAtoms() -
getFrameAtoms
public javajs.util.BS getFrameAtoms() -
getVisibleFramesBitSet
public javajs.util.BS getVisibleFramesBitSet()- Specified by:
getVisibleFramesBitSetin classJmolViewer
-
getModelUndeletedAtomsBitSet
public javajs.util.BS getModelUndeletedAtomsBitSet(int modelIndex) -
getModelUndeletedAtomsBitSetBs
public javajs.util.BS getModelUndeletedAtomsBitSetBs(javajs.util.BS bsModels) -
getBoundBoxCenter
public javajs.util.P3 getBoundBoxCenter()- Specified by:
getBoundBoxCenterin classJmolViewer
-
calcBoundBoxDimensions
public void calcBoundBoxDimensions(javajs.util.BS bs, float scale) -
getBoundBoxCornerVector
public javajs.util.V3 getBoundBoxCornerVector()- Specified by:
getBoundBoxCornerVectorin classJmolViewer
-
getModelSetProperties
- Specified by:
getModelSetPropertiesin classJmolViewer
-
getModelProperties
- Specified by:
getModelPropertiesin classJmolViewer
-
getModelForAtomIndex
-
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
public javajs.util.BS getBondsForSelectedAtoms(javajs.util.BS bsAtoms) -
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
public void toCartesian(javajs.util.T3 pt, boolean ignoreOffset) absolute or relative to origin of UNITCELL {x y z}- Parameters:
pt-ignoreOffset- TODO
-
toCartesianUC
-
toFractional
public void toFractional(javajs.util.T3 pt, boolean ignoreOffset) - Parameters:
pt-ignoreOffset- set true for relative to {0 0 0}; otherwise relative to origin of UNITCELL {x y z}
-
toFractionalUC
-
toUnitCell
public void toUnitCell(javajs.util.P3 pt, javajs.util.P3 offset) 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
public void addUnitCellOffset(javajs.util.P3 pt) -
setAtomData
-
setCenterSelected
public void setCenterSelected()- Specified by:
setCenterSelectedin classJmolViewer
-
setApplySymmetryToBonds
void setApplySymmetryToBonds(boolean TF) -
setBondTolerance
public void setBondTolerance(float bondTolerance) - Specified by:
setBondTolerancein classJmolViewer
-
setMinBondDistance
public void setMinBondDistance(float minBondDistance) - Specified by:
setMinBondDistancein classJmolViewer
-
getAtomsNearPt
public javajs.util.BS getAtomsNearPt(float distance, javajs.util.P3 coord, javajs.util.BS bs) -
getBranchBitSet
public javajs.util.BS 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.- Parameters:
atomIndex-atomIndexNot-allowCyclic-- Returns:
- bitset for this branch
-
getElementsPresentBitSet
public javajs.util.BS getElementsPresentBitSet(int modelIndex) - Specified by:
getElementsPresentBitSetin classJmolViewer
-
getFileHeader
String getFileHeader() -
getFileData
Object getFileData() -
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
public int autoHbond(javajs.util.BS bsFrom, javajs.util.BS bsTo, boolean onlyIfHaveCalculated) -
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
-
setPendingMeasurement
-
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
-
setAnimationMode
-
setAnimationOn
public void setAnimationOn(boolean animationOn) -
setAnimationRange
public void setAnimationRange(int modelIndex1, int modelIndex2) -
defineAtomSets
-
setAnimDisplay
public void setAnimDisplay(javajs.util.BS bs) -
setCurrentModelIndex
public void setCurrentModelIndex(int modelIndex) -
getTrajectoryState
-
setFrameOffsets
public void setFrameOffsets(javajs.util.BS bsAtoms, boolean isFull) -
setCurrentModelIndexClear
public void setCurrentModelIndexClear(int modelIndex, boolean clearBackground) -
haveFileSet
public boolean haveFileSet() -
setBackgroundModelIndex
public void setBackgroundModelIndex(int modelIndex) -
setFrameVariables
void setFrameVariables() -
getInMotion
public boolean getInMotion(boolean includeAnim) -
getMotionEventNumber
public int getMotionEventNumber()- Specified by:
getMotionEventNumberin classJmolViewer
-
setInMotion
public void setInMotion(boolean inMotion) - Specified by:
setInMotionin classJmolViewer
-
setRefreshing
private void setRefreshing(boolean TF) -
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- Returns:
- INI file
-
clearRepaintManager
private void clearRepaintManager(int iShape) -
renderScreenImage
JmolViewer interface uses this, but that is all- Specified by:
renderScreenImagein classJmolViewer
-
renderScreenImageStereo
-
updateJS
public void updateJS()for JavaScript only -
updateJSView
private void updateJSView(int imodel, int iatom) File has been loaded or model has been changed or atom picked. This is a call to Jmol.View for view sets (new in Jmol 14.1.8)- Parameters:
imodel-iatom-
-
evalFile
- Specified by:
evalFilein classJmolViewer
-
getInsertedCommand
-
script
- Specified by:
scriptin classJmolViewer
-
evalString
- Specified by:
evalStringin classJmolViewer
-
evalStringQuiet
- Specified by:
evalStringQuietin classJmolViewer
-
evalStringQuietSync
-
clearScriptQueue
public void clearScriptQueue() -
setScriptQueue
private void setScriptQueue(boolean TF) -
checkHalt
- Specified by:
checkHaltin classJmolViewer
-
scriptWait
- Specified by:
scriptWaitin classJmolViewer
-
scriptWaitStatus
- Specified by:
scriptWaitStatusin classJmolViewer
-
evalWait
-
exitJmol
public void exitJmol() -
scriptCheckRet
-
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() -
resolveDatabaseFormat
-
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:
name-type- a character to distinguish the type of file, '?' means we are just doing an isosurface checkwithPrefix-- Returns:
- String or String[]
-
checkCIR
private void checkCIR(boolean forceCheck) Check to see if the resolver is working- Parameters:
forceCheck-
-
getStandardLabelFormat
-
getAdditionalHydrogens
public javajs.util.P3[] getAdditionalHydrogens(javajs.util.BS bsAtoms, javajs.util.Lst<Atom> vConnections, int flags) -
setMarBond
public void setMarBond(short marBond) - Specified by:
setMarBondin classJmolViewer
-
setHoverLabel
-
setHoverEnabled
private void setHoverEnabled(boolean tf) -
hoverOn
void hoverOn(int atomIndex, boolean isLabel) -
isModelkitPickingActive
private boolean isModelkitPickingActive() -
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
-
hoverOff
void hoverOff() -
setDebugScript
public void setDebugScript(boolean debugScript) - Specified by:
setDebugScriptin classJmolViewer
-
clearClickCount
void clearClickCount() -
setCursor
public void setCursor(int cursor) -
setPickingMode
-
getPickingMode
public int getPickingMode() -
setPickingStyle
-
getDrawHover
public boolean getDrawHover() -
getAtomInfo
-
getAtomInfoXYZ
-
setSync
private void setSync() -
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() -
getDragSelected
boolean getDragSelected() -
getBondsPickable
boolean getBondsPickable() -
isModelKitOpen
boolean isModelKitOpen() -
useMinimizationThread
public boolean useMinimizationThread() -
getFloat
public float getFloat(int tok) - Specified by:
getFloatin classJmolViewer
-
setStringProperty
- Specified by:
setStringPropertyin classJmolViewer
-
setStringPropertyTok
-
setFloatProperty
- Specified by:
setFloatPropertyin classJmolViewer
-
setFloatPropertyTok
-
setIntProperty
- Specified by:
setIntPropertyin classJmolViewer
-
setIntPropertyTok
-
checkIntRange
private static int checkIntRange(int value, int min, int max) -
checkFloatRange
private static float checkFloatRange(float value, float min, float max) -
setBooleanProperty
- Specified by:
setBooleanPropertyin classJmolViewer
-
setBooleanPropertyTok
-
setModelKitMode
private void setModelKitMode(boolean value) -
setSmilesString
-
removeUserVariable
-
jmolTest
private void jmolTest() -
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
-
setAxesScale
private void setAxesScale(int tok, float val) -
setAxesMode
void setAxesMode(int mode) -
getSelectionHalosEnabled
public boolean getSelectionHalosEnabled() -
setSelectionHalosEnabled
public void setSelectionHalosEnabled(boolean TF) -
getShowSelectedOnce
public boolean getShowSelectedOnce() -
setStrandCount
private void setStrandCount(int type, int value) -
getStrandCount
public int getStrandCount(int type) -
setAutoBond
public void setAutoBond(boolean TF) - Specified by:
setAutoBondin classJmolViewer
-
makeConnections
public int[] makeConnections(float minDistance, float maxDistance, int order, int connectOperation, javajs.util.BS bsA, javajs.util.BS bsB, javajs.util.BS bsBonds, boolean isBonds, boolean addGroup, float energy) -
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
-
setDefaultsType
-
setAntialias
private void setAntialias(int tok, boolean TF) -
allocTempPoints
public javajs.util.P3[] allocTempPoints(int size) -
freeTempPoints
public void freeTempPoints(javajs.util.P3[] tempPoints) -
allocTempScreens
public javajs.util.P3i[] allocTempScreens(int size) -
freeTempScreens
public void freeTempScreens(javajs.util.P3i[] tempScreens) -
allocTempEnum
-
freeTempEnum
-
getFont3D
-
getAtomGroupQuaternions
public javajs.util.Quat[] getAtomGroupQuaternions(javajs.util.BS bsAtoms, int nMax) -
setStereoMode
-
getChimeInfo
-
getModelFileInfo
-
getModelFileInfoAll
-
showEditor
-
getPropertyManager
-
setTainted
public void setTainted(boolean TF) -
checkObjectClicked
-
checkObjectHovered
public boolean checkObjectHovered(int x, int y) -
checkObjectDragged
boolean checkObjectDragged(int prevX, int prevY, int x, int y, int action) -
rotateAxisAngleAtCenter
public boolean rotateAxisAngleAtCenter(JmolScriptEvaluator eval, javajs.util.P3 rotCenter, javajs.util.V3 rotAxis, float degreesPerSecond, float endDegrees, boolean isSpin, javajs.util.BS bsSelected) -
rotateAboutPointsInternal
public boolean rotateAboutPointsInternal(JmolScriptEvaluator eval, javajs.util.P3 point1, javajs.util.P3 point2, float degreesPerSecond, float endDegrees, boolean isSpin, javajs.util.BS bsSelected, javajs.util.V3 translation, javajs.util.Lst<javajs.util.P3> finalPoints, float[] dihedralList, javajs.util.M4 m4) -
startSpinningAxis
public void startSpinningAxis(javajs.util.T3 pt1, javajs.util.T3 pt2, boolean isClockwise) -
getModelDipole
public javajs.util.V3 getModelDipole() -
calculateMolecularDipole
- Throws:
Exception
-
setDefaultLattice
public void setDefaultLattice(javajs.util.P3 p) -
getDefaultLattice
public javajs.util.P3 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:
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
public String getPdbAtomData(javajs.util.BS bs, javajs.util.OC out, boolean asPQR, boolean doTransform) -
isJmolDataFrame
public boolean isJmolDataFrame() -
setFrameTitle
-
setFrameTitleObj
-
getFrameTitle
-
setAtomProperty
-
checkCoordinatesChanged
public void checkCoordinatesChanged() -
setAtomCoords
-
setAtomCoordsRelative
public void setAtomCoordsRelative(javajs.util.T3 offset, javajs.util.BS bs) -
invertAtomCoord
public void invertAtomCoord(javajs.util.P3 pt, javajs.util.P4 plane, javajs.util.BS bs, int ringAtomIndex, boolean isClick) -
invertSelected
public void invertSelected(javajs.util.P3 pt, javajs.util.P4 plane, int iAtom, javajs.util.BS bsAtoms) -
moveAtoms
public void moveAtoms(javajs.util.M4 m4, javajs.util.M3 mNew, javajs.util.M3 rotation, javajs.util.V3 translation, javajs.util.P3 center, boolean isInternal, javajs.util.BS bsAtoms, boolean translationOnly) -
moveSelected
public void moveSelected(int deltaX, int deltaY, int deltaZ, int x, int y, javajs.util.BS bsSelected, boolean isTranslation, boolean asAtoms, int modifiers) -
highlightBond
public void highlightBond(int index, int closestAtomIndex, int x, int y) from Sticks- Parameters:
index-closestAtomIndex- ignoredx-y-
-
highlight
public void highlight(javajs.util.BS bs) -
refreshMeasures
public void refreshMeasures(boolean andStopMinimization) -
functionXY
fills an array with data -- if nX < 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
- 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 <= -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
-
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
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:
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
-
setSyncTarget
private void setSyncTarget(int mode, boolean TF) -
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
-
setVdwStr
-
setUserVdw
-
getDefaultVdwNameOrData
-
deleteAtoms
public int deleteAtoms(javajs.util.BS bsAtoms, boolean fullModels) -
deleteModels
public int deleteModels(int modelIndex, javajs.util.BS bsAtoms) 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
public void deleteBonds(javajs.util.BS bsDeleted) -
deleteModelAtoms
public void deleteModelAtoms(int modelIndex, int firstAtomIndex, int nAtoms, javajs.util.BS bsModelAtoms) -
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
-
isStaticFunction
-
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
public int calculateStruts(javajs.util.BS bs1, javajs.util.BS bs2) -
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
-
isKiosk
boolean isKiosk() -
hasFocus
public boolean hasFocus() -
setFocus
public void setFocus() -
stopMinimization
void stopMinimization() -
clearMinimization
void clearMinimization() -
getMinimizationInfo
-
checkMinimization
private void checkMinimization() -
minimize
public void minimize(JmolScriptEvaluator eval, int steps, float crit, javajs.util.BS bsSelected, javajs.util.BS bsFixed, float rangeFixed, int flags) throws Exception - Parameters:
eval-steps- Integer.MAX_VALUE --> use defaultscrit- -1 --> use defaultsbsSelected-bsFixed-rangeFixed-flags-- Throws:
Exception
-
setHydrogens
private void setHydrogens(javajs.util.BS bsAtoms) -
setMotionFixedAtoms
public void setMotionFixedAtoms(javajs.util.BS bs) -
setMotionFixed
public void setMotionFixed(javajs.util.BS bs) -
getMotionFixedAtoms
public javajs.util.BS getMotionFixedAtoms() -
getAtomicPropertyState
void getAtomicPropertyState(javajs.util.SB commands, byte type, javajs.util.BS bs, String name, float[] data) -
getCenterAndPoints
-
writeFileData
-
getPdbData
-
getGroupsWithin
public javajs.util.BS getGroupsWithin(int nResidues, javajs.util.BS bs) -
setShapeSize
public void setShapeSize(int shapeID, int madOrMad10, javajs.util.BS bsSelected) - Parameters:
shapeID-madOrMad10- for axes, unitcell, and boundbox 10*mad; otherwise milliangstrom diameterbsSelected-
-
setShapeProperty
-
getShapeProperty
-
getShapePropertyAsInt
-
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
protected void moveAtomWithHydrogens(int atomIndex, int deltaX, int deltaY, int deltaZ, javajs.util.BS bsAtoms) -
isModelPDB
public boolean isModelPDB(int i) -
deleteMeasurement
public void deleteMeasurement(int i) - Specified by:
deleteMeasurementin classJmolViewer
-
getSmiles
- Specified by:
getSmilesin classJmolViewer- Throws:
Exception
-
getOpenSmiles
- Specified by:
getOpenSmilesin classJmolViewer- Throws:
Exception
-
getBioSmiles
- Throws:
Exception
-
getSmilesOpt
public String getSmilesOpt(javajs.util.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
-
isModel2D
private boolean isModel2D(javajs.util.BS bs) -
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:
calcAtomsMinMaxin classJmolViewer
-
getObjectMap
used in autocompletion in console using TAB- Parameters:
map-c-
-
setPicked
public void setPicked(int atomIndex, boolean andReset) -
runScript
Run a script using the script function script("xxxxxx") using direct script tokens for script ( "xxxxxxx" )- Specified by:
runScriptin classJmolViewer- 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
public javajs.util.BS getBaseModelBitSet() -
clearTimeouts
public void clearTimeouts() -
setTimeout
-
triggerTimeout
-
clearTimeout
-
showTimeout
-
getOrCalcPartialCharges
public float[] getOrCalcPartialCharges(javajs.util.BS bsSelected, javajs.util.BS bsIgnore) throws JmolAsyncException - 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
public javajs.util.BS addHydrogens(javajs.util.BS bsAtoms, int flags) -
addHydrogensInline
public javajs.util.BS addHydrogensInline(javajs.util.BS bsAtoms, javajs.util.Lst<Atom> vConnections, javajs.util.P3[] pts, Map<String, Object> htParams) throws Exception- Throws:
Exception
-
evalFunctionFloat
- Specified by:
evalFunctionFloatin interfaceAtomDataServer
-
evalParallel
-
evaluateExpression
synchronized here trapped the eventQueue; see also evaluateExpressionAsVariable- Specified by:
evaluateExpressionin classJmolViewer- Returns:
- a String representation of the evaluated expression
-
evaluateExpressionAsVariable
- Specified by:
evaluateExpressionAsVariablein classJmolViewer- Returns:
- a String representation of the evaluated expression as a script variable (org.jmol.script.SV)
-
getAtomBitSet
-
getScriptContext
-
getAtomDefs
-
setCGO
-
setModelSet
-
setObjectProp
-
setDihedrals
public void setDihedrals(float[] dihedralList, javajs.util.BS[] bsBranches, float rate) -
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- < 256 is just the character of a single-character upper-case chain id, upper or lower case query; >= 256 < 300 is lower case found in structureisAssign- from a file reader, not a select query- Returns:
- i
-
getChainIDStr
-
getScriptQueueInfo
-
getNMRCalculation
-
getDistanceUnits
-
calculateFormalCharges
public int calculateFormalCharges(javajs.util.BS bs) -
setModulation
public void setModulation(javajs.util.BS bs, boolean isOn, javajs.util.P3 t1, boolean isQ) -
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 javajs.util.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
-
dragMinimizeAtom
void dragMinimizeAtom(int iAtom) -
getJBR
-
checkMenuUpdate
public void checkMenuUpdate() -
getChimeMessenger
-
getModelSetAuxiliaryInfoForAtoms
-
getJSJSONParser
private javajs.util.JSJSONParser getJSJSONParser() -
parseJSON
-
parseJSONMap
-
parseJSONArray
-
getSymTemp
Retrieve a Symmetry object, possibly re-using an old one.- Returns:
- org.jmol.symmetry.Symmetry object
-
setWindowDimensions
public void setWindowDimensions(float[] dims) -
getTriangulator
-
getCurrentModelAuxInfo
-
startNBO
-
startPlugin
startup -U nbo option- Parameters:
plugin-
-
connectNBO
-
getNBOParser
-
getNBOAtomLabel
-
calculateChirality
-
getSubstructureSetArray
public javajs.util.BS[] getSubstructureSetArray(String pattern, javajs.util.BS bsSelected, int flags) throws Exception - Throws:
Exception
-
getSubstructureSetArrayForNodes
public javajs.util.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.- Parameters:
name-- Returns:
- value
-
setModelkitPropertySafely
-
getSymmetryInfo
public Object getSymmetryInfo(int iatom, String xyz, int iOp, javajs.util.P3 translation, javajs.util.P3 pt1, javajs.util.P3 pt2, int type, String desc, float scaleFactor, int nth, int options) 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 555- Returns:
- string, Object[], or Lst<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(javajs.util.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
public void setStatusSelect(javajs.util.BS bs) 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(javajs.util.BS bsAtoms, String xyzList, float[] unitCell, boolean asString, boolean isAssign) - Parameters:
bsAtoms-xyzList- if present, a semicolon-separated list of operatorsunitCell-asString-isAssign- from ModelKit- Returns:
- either an array of space group identifiers or, if asString, "", or null
-
restrictToModel
public javajs.util.BS restrictToModel(javajs.util.BS bs, int mi) 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
public javajs.util.BS getThisModelAtoms() -
getSymmetryEquivPoints
-
getSymmetryEquivPointList
public javajs.util.Lst<?> getSymmetryEquivPointList(javajs.util.Lst<javajs.util.P3> pts, String flags) -
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
-
assignSpaceGroup
-
setStatusAtomMoved
public void setStatusAtomMoved(boolean andCheckMinimize, javajs.util.BS bs) -
isModelKitOption
-
getFormulaForAtoms
Get formula -- MF or CELLFORMULA, possibly empirical- Parameters:
bs-type-isEmpirical-- Returns:
- formula as H xx C xx X xx...
-