Package org.jmol.script
Class ScriptEval
java.lang.Object
org.jmol.script.ScriptError
org.jmol.script.ScriptParam
org.jmol.script.ScriptExpr
org.jmol.script.ScriptEval
- All Implemented Interfaces:
JmolScriptEvaluator
-
Field Summary
FieldsModifier and TypeFieldDescriptionT[][]private booleanstatic intstatic final Stringstatic final Stringprivate static intprivate Stringprivate Threadprivate booleanprivate static final longprivate static final intprivate static final intprivate static final intprivate booleanprivate booleanprivate booleanprivate booleanprivate JmolThreadprivate booleanbooleanprivate static intprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanbooleanbooleanprivate intprivate int[][]private short[]private booleanprivate booleanjavajs.util.SBprivate JmolParallelProcessorintprivate intintprivate static final Stringprivate Stringprivate JmolThreadprivate Stringintprivate static intprivate longprivate longbooleanFields inherited from class org.jmol.script.ScriptExpr
debugHigh, privateFuncs, tempStatementFields inherited from class org.jmol.script.ScriptParam
contextFunctions, contextVariables, coordinatesAreFractional, fractionalPoint, isBondSet, iToken, MODE_P_ALLOW_FRACTIONAL, MODE_P_CONVERT_TO_CARTESIAN, MODE_P_IMPLICIT_FRACTIONAL, MODE_P_INT_ONLY, MODE_P_NULL_ON_ERROR, MODE_P3, MODE_P34, MODE_P4, slen, st, theTok, theToken, thisContextFields inherited from class org.jmol.script.ScriptError
chk, error, ERROR_axisExpected, ERROR_backgroundModelError, ERROR_badArgumentCount, ERROR_badMillerIndices, ERROR_badRGBColor, ERROR_booleanExpected, ERROR_booleanOrNumberExpected, ERROR_booleanOrWhateverExpected, ERROR_cannotSet, ERROR_colorExpected, ERROR_colorOrPaletteRequired, ERROR_commandExpected, ERROR_coordinateOrNameOrExpressionRequired, ERROR_drawObjectNotDefined, ERROR_endOfStatementUnexpected, ERROR_expressionExpected, ERROR_expressionOrIntegerExpected, ERROR_filenameExpected, ERROR_fileNotFoundException, ERROR_incompatibleArguments, ERROR_insufficientArguments, ERROR_integerExpected, ERROR_integerOutOfRange, ERROR_invalidArgument, ERROR_invalidParameterOrder, ERROR_keywordExpected, ERROR_moCoefficients, ERROR_moIndex, ERROR_moModelError, ERROR_moOccupancy, ERROR_moOnlyOne, ERROR_multipleModelsDisplayedNotOK, ERROR_multipleModelsNotOK, ERROR_noData, ERROR_noPartialCharges, ERROR_noUnitCell, ERROR_numberExpected, ERROR_numberMustBe, ERROR_numberOutOfRange, ERROR_objectNameExpected, ERROR_planeExpected, ERROR_propertyNameExpected, ERROR_spaceGroupNotFound, ERROR_stringExpected, ERROR_stringOrIdentifierExpected, ERROR_tooManyPoints, ERROR_tooManyScriptLevels, ERROR_unrecognizedAtomProperty, ERROR_unrecognizedBondProperty, ERROR_unrecognizedCommand, ERROR_unrecognizedExpression, ERROR_unrecognizedObject, ERROR_unrecognizedParameter, ERROR_unrecognizedParameterWarning, ERROR_unrecognizedShowParameter, ERROR_what, ERROR_writeWhat, errorMessage, errorMessageUntranslated, errorType, iCommandError, ignoreError, vwr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate intaddLoadData(javajs.util.SB loadScript, String key, Map<String, Object> htParams, int i) private voidaddProcess(javajs.util.Lst<T[]> vProcess, int pc, int pt) private voidappendBuffer(String str, boolean mustDo) private voidbreakAt(int pt) private voidprivate booleanchecks to see if there is a pause condition, during which commands can still be issued, but with the ! first.private voidcheckExtension(int tok) checkFileExists(String prefix, boolean isAsync, String filename, int i, boolean doClear) checkScriptSilent(String script) a method for just checking a scriptbooleancheckSelect(Map<String, SV> h, T[] where) Check a map for a WHERE phrasevoidprivate voidclearState(boolean tQuiet) private voidprivate voidcmdAxes(int index) private voidcmdBackground(int i) private voidcmdBind()private voidprivate voidcmdBoundbox(int index) private voidcmdCD()private voidcmdCenter(int i) private voidcmdColor()private voidprivate voidcmdDelay()private voidprivate voidcmdDisplay(boolean isDisplay) private voidcmdDots(int iShape) private voidcmdEcho(int index) private voidcmdFile()private voidcmdFixed()private booleanprivate intcmdFlowSwitch(ContextToken c, int tok) private voidcmdFont(int shapeType, float fontsize) private booleancmdFor(int tok, boolean isForCheck) private voidcmdFrank(int i) private voidcmdFunc()private voidprivate voidcmdGoto(boolean isCmd) private voidcmdHbond()private voidcmdHelp()private voidcmdHistory(int pt) private voidcmdHover()private voidcmdLabel(int index, javajs.util.BS bs) voidcmdLoad()private voidcmdLog()private voidcmdLoop()private voidprivate voidcmdModel(int offset) ONE difference between FRAME and MODEL: model 1 sets model NAMED one in the case of PDB frame 1 always sets the first modelprivate voidcmdMove()private voidprivate booleancmdPause()private voidcmdPrint()private voidprivate voidcmdReset()private voidprivate voidprivate voidvoidcmdRotate(boolean isSpin, boolean isSelected) private voidcmdSave()private voidcmdScale(int pt) voidprivate voidcmdSelect(int i) private voidcmdSelectionHalos(int pt) private voidcmdSet()private voidcmdSetEcho(int i) private booleancmdSetLabel(String str) private voidprivate voidprivate voidcmdSlab(boolean isDepth) private voidprivate voidprivate voidprivate voidcmdSync()private voidcmdThrow()private voidcmdTimeout(int index) private voidcmdTranslate(boolean isSelected) private voidvoidcmdUndoRedo(int tok) private voidcmdUnitcell(int i) private voidprivate voidprivate voidprivate voidcmdZap(boolean isZapCommand) private voidcmdZoom(boolean isZoomTo) private voidcolorShape(int shapeType, int index, boolean isBackground) private voidcommandLoop(boolean allowJSInterrupt) booleancompileScript(String filename, String strScript, boolean debugCompiler) booleancompileScriptFile(String filename, boolean tQuiet) booleancompileScriptString(String script, boolean tQuiet) private voiddefineAtomSet(String script) private voidsupport for @xxx or define xxx commandsvoiddelayScript(int millis) voiddeleteAtomsInVariables(javajs.util.BS bsDeleted) booleandispatchCommands(boolean isSpt, boolean fromFunc, boolean isTry) private voiddoDelay(int millis) booleandoReport()encodeRadiusParameter(int index, boolean isOnly, boolean allowAbsolute) floatevalFunctionFloat(Object func, Object params, float[] values) booleanevalParallel(ScriptContext context, ShapeManager shapeManager) private ObjectvoidevaluateCompiledScript(boolean isCmdLine_c_or_C_Option, boolean isCmdLine_C_Option, boolean historyDisabled, boolean listCommands, javajs.util.SB outputBuffer, boolean allowThreads) evaluateExpression(Object expr, boolean asVariable, boolean compileOnly) a general-use method to evaluate a "SET" type expression.private intexecuteCommands(boolean isTry, boolean reportCompletion) expandFloatArray(float[] a, int min, boolean asBS) Accepts a float array and expands [1 -3] to [1 2 3], for example.private voidfinalizeLoad(boolean isAppend, boolean appendNew, boolean isConcat, boolean doOrient, int nFiles, int ac0, int modelCount0, boolean isData) private StringfixScriptPath(String strScript, String filename) private voidframeControl(int i) booleanjavajs.util.BSgetAtomBitSet(Object atomExpression) A general method to evaluate a string representing an atom set.getColorRange(int i) private StringgetCommand(int pc, boolean allThisLine, boolean addSemi) used for recall of commands in the application console(package private) static javajs.util.SBgetContextTrace(Viewer vwr, ScriptContext sc, javajs.util.SB sb, boolean isTop) getFullPathName(boolean withType) intprivate StringgetLoadFilesList(int i, javajs.util.SB loadScript, javajs.util.SB sOptions, Map<String, Object> htParams, javajs.util.Lst<String> fNames) private intgetLoadModelIndex(int i, javajs.util.SB sOptions, Map<String, Object> htParams) when paused, indicates what statement will be nextprivate javajs.util.P3[]protected javajs.util.P3getObjectCenter(String axisID, int index, int modelIndex) voidgetPartialCharges(javajs.util.BS bs) protected javajs.util.P4getPlaneForObject(String id, javajs.util.V3 vAB) javajs.util.Quat[]getQuaternionArray(Object quaternionOrSVData, int itype) getScriptContext(String why) private StringgetScriptFileInternal(String filename, String localPath, String remotePath, String scriptPath) Retrieve the uncompiled script or null if failedintgetSetAxesTypeMad10(int index) private floatgetSettingFloat(int pt) private intgetSettingInt(int pt) private StringgetSettingStr(int pt, boolean isJmolSet) Accept an unquoted string if there is just one parameter regardless of its type.getShapeProperty(int shapeType, String propertyName) booleangetShapePropertyData(int shapeType, String propertyName, Object[] data) private intgetShapeType(int tok) floatgetTranslucentLevel(int i) getUserFunctionResult(String name, javajs.util.Lst<SV> params, SV tokenAtom) private floatgetZoom(int ptCenter, int i, javajs.util.BS bs, float currentZoom) voidbooleanisAtomExpression(int i) private booleanisCommandDisplayable(int i) provides support for the script editorbooleanprivate booleanisLoadOption(int tok) private booleanbooleanisPaused()booleanbooleanbooleanprivate voidloadFileAsync(String prefix, String filename, int i, boolean doClear) Allows asynchronous file loading from the LOAD or SCRIPT command.voidloadFileResourceAsync(String fileName) load a static file asynchronouslyprivate voidprivate voidlogDebugScript(T[] st, int ifLevel) private voidlogLoadInfo(String msg, boolean isData) javajs.util.BSlookupIdentifierValue(String identifier) private javajs.util.BSlookupValue(String setName, boolean plurals) voidprivate voidnotifyScriptEditor(int pc) voidpauseExecution(boolean withDelay) (package private) voidpopContext(boolean isFlowCommand, boolean statementOnly) private voidpostProcessTry(Map<String, SV> cv) private voidprocessCommand(int tok) private voidprocessShapeCommand(int tok) private voidpushContext(ContextToken token, String why) private voidpushContext2(ContextToken token, String why) voidpushContextDown(String why) voidrefresh(boolean doDelay) Refresh the display NOWvoidprivate voidprivate voidrestoreFunction(JmolScriptFunction f, javajs.util.Lst<SV> params, SV tokenAtom) note that functions requiring motion cannot be run in JavaScriptvoidrestoreScriptContext(ScriptContext context, boolean isPopContext, boolean isFlowCommand, boolean statementOnly) voidrestrictSelected(boolean isBond, boolean doInvert) voidresumeEval(Object sco) From dispatchCommands and JmolThread resumeEval.voidprivate voidresumeViewer(String why) voidrunBufferedSafely(String script, javajs.util.SB outputBuffer) private SVrunFunctionAndRet(JmolScriptFunction function, String name, javajs.util.Lst<SV> params, SV tokenAtom, boolean getReturn, boolean setContextPath, boolean allowThreads) voidvoidrunScriptBuffer(String script, javajs.util.SB outputBuffer, boolean isFuncReturn) runs a script immediately and sends selected output to a provided SBstatic SVrunUserAction(String functionName, Object[] params, Viewer vwr) private ScriptContextsaveContext(String saveName) voidsetAllowJSThreads(boolean b) protected voidsetAtomProp(String prop, Object value, javajs.util.BS bs) voidvoidprivate booleansetElementColor(String str, int argb) voidsetException(ScriptException sx, String msg, String untranslated) private voidsetFrameSet(int i) booleansetMeshDisplayProperty(int shape, int i, int tok) voidsetModelCagePts(int iModel, javajs.util.T3[] originABC, String name) private voidsetObjectArgb(String str, int argb) voidsetObjectMad10(int iShape, String name, int mad10) private StringsetObjectProp(String id, int tokCommand, int ptColor) setObjectPropSafe(String id, int tokCommand) called by Viewer in setting up a PyMOL scene.private intsetShapeNameParameter(int i) voidsetShapeProperty(int shapeType, String propertyName, Object propertyValue) voidsetShapePropertyBs(int iShape, String propertyName, Object propertyValue, javajs.util.BS bs) private voidsetShapeSize(int shapeType, RadiusData rd) voidsetShapeSizeBs(int shapeType, int size, javajs.util.BS bs) voidsetShapeTranslucency(int shapeType, String prefix, String translucency, float translucentLevel, javajs.util.BS bs) private voidsetSize(int shape, float scale) private voidsetSizeBio(int iShape) intsetStatic(int tok, int ival) set a static variable, with checking for rangeprivate booleanvoidshowString(String str) voidshowStringPrint(String s, boolean mustDo) static StringstatementAsString(Viewer vwr, T[] statement, int iTok, boolean doLogMessages) voidvoidtoString()booleanMethods inherited from class org.jmol.script.ScriptExpr
addFunction, atomExpression, atomExpressionAt, compareFloat, compareFloatData, getAssocArray, getAtomBits, getBitsetProperty, getCmdExt, getFunction, getIsoExt, getMathExt, getSeqCode, getSmilesExt, isFunction, listBS, noCopy, parameterExpressionBoolean, parameterExpressionList, parameterExpressionSelect, parameterExpressionString, parameterExpressionToken, setStatement, setVariableMethods inherited from class org.jmol.script.ScriptParam
atomCenterOrCoordinateParameter, centerParameter, centerParameterForModel, checkHKL, checkLast, checkLength, checkLength23, checkLength34, checkLengthErrorPt, checkToken, floatParameter, floatParameterRange, floatParameterSet, getArgbParam, getArgbParamLast, getArgbParamOrNone, getAtomsStartingAt, getContextVariableAsVariable, getFractionalPoint, getHklPlane, getMadParameter, getParameter, getPoint3f, getPoint4f, getPointArray, getPointOrCenterVector, getPointOrPlane, getPointVector, getQuaternionParameter, getToken, getVarParameter, hklParameter, intParameter, intParameterRange, isArrayParameter, isCenterParameter, isColorParam, isFloatParameter, isPoint3f, listParameter, listParameter4, modelNumberParameter, objectNameParameter, optParameterAsString, paramAsStr, planeParameter, planeValue, setBooleanProperty, setFloatProperty, setIntProperty, setStringProperty, stringParameter, stringParameterSet, tickParamAsStr, tokAt, xypParameter, xyzpParameterMethods inherited from class org.jmol.script.ScriptError
bad, error, errorMore, errorStr, errorStr2, errorString, evalError, getErrorLineMessage, getErrorMessage, getErrorMessageUntranslated, integerOutOfRange, invArg, numberOutOfRange, setCursorWait, setErrorMessage, warning
-
Field Details
-
saveList
- See Also:
-
iProcess
private static int iProcess -
sm
-
isJS
public boolean isJS -
scriptDelayThread
-
fileLoadThread
-
allowJSThreads
private boolean allowJSThreads -
isFuncReturn
private boolean isFuncReturn -
historyDisabled
public boolean historyDisabled -
debugScript
private boolean debugScript -
isCmdLine_C_Option
private boolean isCmdLine_C_Option -
isCmdLine_c_or_C_Option
private boolean isCmdLine_c_or_C_Option -
listCommands
private boolean listCommands -
tQuiet
public boolean tQuiet -
executionStopped
private boolean executionStopped -
executionPaused
private boolean executionPaused -
executionStepping
private boolean executionStepping -
executing
private boolean executing -
isEditor
private boolean isEditor -
timeBeginExecution
private long timeBeginExecution -
timeEndExecution
private long timeEndExecution -
mustResumeEval
private boolean mustResumeEval -
currentThread
-
compiler
-
outputBuffer
public javajs.util.SB outputBuffer -
contextPath
-
scriptFileName
-
functionName
-
isStateScript
public boolean isStateScript -
scriptLevel
public int scriptLevel -
CONTEXT_HOLD_QUEUE
- See Also:
-
CONTEXT_DELAY
- See Also:
-
DELAY_INTERRUPT_MS
private static final long DELAY_INTERRUPT_MS- See Also:
-
EXEC_ASYNC
private static final int EXEC_ASYNC- See Also:
-
EXEC_ERR
private static final int EXEC_ERR- See Also:
-
EXEC_OK
private static final int EXEC_OK- See Also:
-
commandHistoryLevelMax
public static int commandHistoryLevelMax -
contextDepthMax
private static int contextDepthMax -
scriptReportingLevel
private static int scriptReportingLevel -
aatoken
-
lineNumbers
private short[] lineNumbers -
lineIndices
private int[][] lineIndices -
script
-
scriptExtensions
-
pc
public int pc -
thisCommand
-
fullCommand
-
lineEnd
private int lineEnd -
pcEnd
private int pcEnd -
forceNoAddHydrogens
private boolean forceNoAddHydrogens -
isEmbedded
private boolean isEmbedded -
isGUI
private boolean isGUI -
parallelProcessor
-
pcResume
public int pcResume
-
-
Constructor Details
-
ScriptEval
public ScriptEval()
-
-
Method Details
-
getAllowJSThreads
public boolean getAllowJSThreads() -
setAllowJSThreads
public void setAllowJSThreads(boolean b) -
doReport
public boolean doReport() -
isStateScript
public boolean isStateScript() -
setStatic
public int setStatic(int tok, int ival) set a static variable, with checking for range -
getScript
-
setViewer
-
setCompiler
public void setCompiler() -
compileScriptString
-
compileScriptFile
-
evaluateCompiledScript
public void evaluateCompiledScript(boolean isCmdLine_c_or_C_Option, boolean isCmdLine_C_Option, boolean historyDisabled, boolean listCommands, javajs.util.SB outputBuffer, boolean allowThreads) -
useThreads
public boolean useThreads() -
executeCommands
private int executeCommands(boolean isTry, boolean reportCompletion) -
resumeEval
From dispatchCommands and JmolThread resumeEval. After throwing a ScriptInterruption, all statements following the current one are lost. When a JavaScript timeout returns from a DELAY, MOVE, MOVETO, or other sleep-requiring command, it is the ScriptContext that contains all have to worry about this, because the current thread is just put to sleep, not stopped, but in JavaScript, where we only have one thread, we need to manage this more carefully. We re-enter the halted script here, using a saved script context. The program counter is incremented to skip the initiating statement, and all parent contexts up the line are set with mustResumeEval = true.- Parameters:
sco-
-
resumeViewer
-
runScript
- Throws:
ScriptException
-
runScriptBuffer
public void runScriptBuffer(String script, javajs.util.SB outputBuffer, boolean isFuncReturn) throws ScriptException runs a script immediately and sends selected output to a provided SB- Parameters:
outputBuffer-script-- Throws:
ScriptException
-
checkScriptSilent
a method for just checking a script- Parameters:
script-- Returns:
- a ScriptContext that indicates errors and provides a tokenized version of the script that has passed all syntax checking, both in the compiler and the evaluator
-
getContextTrace
static javajs.util.SB getContextTrace(Viewer vwr, ScriptContext sc, javajs.util.SB sb, boolean isTop) -
setDebugging
public void setDebugging() -
haltExecution
public void haltExecution() -
pauseExecution
public void pauseExecution(boolean withDelay) -
stepPausedExecution
public void stepPausedExecution() -
resumePausedExecution
public void resumePausedExecution() -
isExecuting
public boolean isExecuting() -
isPaused
public boolean isPaused() -
isStepping
public boolean isStepping() -
isStopped
public boolean isStopped() -
getNextStatement
when paused, indicates what statement will be next- Returns:
- a string indicating the statement
-
getCommand
used for recall of commands in the application console- Parameters:
pc-allThisLine-addSemi-- Returns:
- a string representation of the command
-
logDebugScript
-
evaluateExpression
a general-use method to evaluate a "SET" type expression.- Parameters:
asVariable-expr-- Returns:
- an object of one of the following types: Boolean, Integer, Float, String, Point3f, BitSet
-
runBufferedSafely
-
runUserAction
-
evaluate
-
checkSelect
Check a map for a WHERE phrase -
getAtomBitSet
A general method to evaluate a string representing an atom set. Excepts one atom expression or one per line as "OR". Excepts "()" as "none".- Parameters:
atomExpression-- Returns:
- is a bitset indicating the selected atoms
-
compileScript
-
fixScriptPath
-
setScriptExtensions
private int setScriptExtensions() -
getScriptFileInternal
private String getScriptFileInternal(String filename, String localPath, String remotePath, String scriptPath) Retrieve the uncompiled script or null if failed- Parameters:
filename-localPath-remotePath-scriptPath-- Returns:
- Jmol script or null
-
evalFunctionFloat
-
getUserFunctionResult
public SV getUserFunctionResult(String name, javajs.util.Lst<SV> params, SV tokenAtom) throws ScriptException - Throws:
ScriptException
-
runFunctionAndRet
private SV runFunctionAndRet(JmolScriptFunction function, String name, javajs.util.Lst<SV> params, SV tokenAtom, boolean getReturn, boolean setContextPath, boolean allowThreads) throws ScriptException - Throws:
ScriptException
-
postProcessTry
-
breakAt
private void breakAt(int pt) -
restoreFunction
private void restoreFunction(JmolScriptFunction f, javajs.util.Lst<SV> params, SV tokenAtom) throws ScriptException note that functions requiring motion cannot be run in JavaScript- Parameters:
f-params-tokenAtom-- Throws:
ScriptException
-
clearDefinedVariableAtomSets
public void clearDefinedVariableAtomSets() -
defineSets
private void defineSets()support for @xxx or define xxx commands -
defineAtomSet
-
lookupIdentifierValue
- Throws:
ScriptException
-
lookupValue
- Throws:
ScriptException
-
deleteAtomsInVariables
public void deleteAtomsInVariables(javajs.util.BS bsDeleted) -
getThisContext
-
clearState
private void clearState(boolean tQuiet) -
pushContextDown
-
pushContext
- Throws:
ScriptException
-
pushContext2
-
getScriptContext
-
popContext
void popContext(boolean isFlowCommand, boolean statementOnly) -
restoreScriptContext
public void restoreScriptContext(ScriptContext context, boolean isPopContext, boolean isFlowCommand, boolean statementOnly) -
setException
-
statementAsString
-
setObjectPropSafe
called by Viewer in setting up a PyMOL scene. -
setAtomProp
-
restrictSelected
public void restrictSelected(boolean isBond, boolean doInvert) -
showString
-
showStringPrint
- Specified by:
showStringPrintin classScriptError
-
report
-
appendBuffer
-
addProcess
-
checkContinue
checks to see if there is a pause condition, during which commands can still be issued, but with the ! first.- Returns:
- false if there was a problem
- Throws:
ScriptException
-
delayScript
public void delayScript(int millis) -
doDelay
- Parameters:
millis- negative here bypasses max check- Throws:
ScriptException
-
evalParallel
-
isCommandDisplayable
private boolean isCommandDisplayable(int i) provides support for the script editor- Parameters:
i-- Returns:
- true if displayable (not a } )
-
loadFileResourceAsync
load a static file asynchronously- Throws:
ScriptException
-
loadFileAsync
public String loadFileAsync(String prefix, String filename, int i, boolean doClear) throws ScriptException Allows asynchronous file loading from the LOAD or SCRIPT command. Saves the context, initiates a FileLoadThread instance. When the file loading completes, the file data (sans filename) is saved in the FileManager cache under cache://localLoad_xxxxx. Context is resumed at this command in the script, and the file is then retrieved from the cache. Only run from JSmol/HTML5 when vwr.isJS; Incompatibilities: LOAD and SCRIPT commands, load() function only; only one "?" per LOAD command- Parameters:
prefix-filename- or null if end of LOAD command and now just clearing out cachei-doClear- ensures only one file is in the cache for a given type- Returns:
- cached file name if it exists
- Throws:
ScriptException
-
cancelFileThread
private void cancelFileThread() -
logLoadInfo
-
notifyResumeStatus
public void notifyResumeStatus() -
refresh
Refresh the display NOW- Parameters:
doDelay-- Throws:
ScriptException
-
stopScriptThreads
public void stopScriptThreads() -
getErrorLineMessage2
-
getLinenumber
-
dispatchCommands
public boolean dispatchCommands(boolean isSpt, boolean fromFunc, boolean isTry) throws ScriptException - Parameters:
isSpt-fromFunc-isTry-- Returns:
- false only when still working through resumeEval
- Throws:
ScriptException
-
commandLoop
- Throws:
ScriptException
-
notifyScriptEditor
private void notifyScriptEditor(int pc) -
processCommand
- Throws:
ScriptException
-
checkExtension
- Throws:
ScriptException
-
processShapeCommand
- Throws:
ScriptException
-
cmdAnimation
- Throws:
ScriptException
-
setFrameSet
- Throws:
ScriptException
-
cmdAxes
- Throws:
ScriptException
-
cmdBackground
- Throws:
ScriptException
-
cmdBind
- Throws:
ScriptException
-
cmdBondorder
- Throws:
ScriptException
-
cmdBoundbox
- Throws:
ScriptException
-
cmdCD
- Throws:
ScriptException
-
cmdCenter
- Throws:
ScriptException
-
cmdColor
- Throws:
ScriptException
-
cmdDefine
- Throws:
ScriptException
-
cmdDelay
- Throws:
ScriptException
-
cmdDelete
- Throws:
ScriptException
-
cmdDisplay
- Throws:
ScriptException
-
cmdDots
- Throws:
ScriptException
-
cmdEcho
- Throws:
ScriptException
-
cmdFile
- Throws:
ScriptException
-
cmdFixed
- Throws:
ScriptException
-
cmdFor
- Throws:
ScriptException
-
cmdFlow
private boolean cmdFlow(int tok, boolean isForCheck, javajs.util.Lst<T[]> vProcess) throws ScriptException - Throws:
ScriptException
-
cmdFlowSwitch
- Throws:
ScriptException
-
cmdFont
- Throws:
ScriptException
-
cmdFrank
- Throws:
ScriptException
-
cmdFunc
- Throws:
ScriptException
-
cmdGetProperty
- Throws:
ScriptException
-
cmdGoto
- Throws:
ScriptException
-
cmdHbond
- Throws:
ScriptException
-
cmdHelp
- Throws:
ScriptException
-
cmdHistory
- Throws:
ScriptException
-
cmdHover
- Throws:
ScriptException
-
cmdLabel
- Throws:
ScriptException
-
cmdLoad
- Throws:
ScriptException
-
checkFileExists
public String checkFileExists(String prefix, boolean isAsync, String filename, int i, boolean doClear) throws ScriptException - Throws:
ScriptException
-
addFilterAttribute
-
addLoadData
private int addLoadData(javajs.util.SB loadScript, String key, Map<String, Object> htParams, int i) throws ScriptException- Throws:
ScriptException
-
loadPNGJVar
private void loadPNGJVar(String varName, Object o, Map<String, Object> htParams) throws ScriptException- Throws:
ScriptException
-
getLoadFilesList
private String getLoadFilesList(int i, javajs.util.SB loadScript, javajs.util.SB sOptions, Map<String, Object> htParams, javajs.util.Lst<String> fNames) throws ScriptException- Throws:
ScriptException
-
isLoadOption
private boolean isLoadOption(int tok) -
getLoadModelIndex
private int getLoadModelIndex(int i, javajs.util.SB sOptions, Map<String, Object> htParams) throws ScriptException- Throws:
ScriptException
-
finalizeLoad
private void finalizeLoad(boolean isAppend, boolean appendNew, boolean isConcat, boolean doOrient, int nFiles, int ac0, int modelCount0, boolean isData) throws ScriptException - Throws:
ScriptException
-
cmdLog
- Throws:
ScriptException
-
cmdLoop
- Throws:
ScriptException
-
cmdMessage
- Throws:
ScriptException
-
cmdModel
ONE difference between FRAME and MODEL: model 1 sets model NAMED one in the case of PDB frame 1 always sets the first model- Parameters:
offset- will be 2 for "anim frame ..."- Throws:
ScriptException
-
loadDssr
- Throws:
ScriptException
-
cmdMove
- Throws:
ScriptException
-
cmdMoveto
- Throws:
ScriptException
-
isAtomExpression
public boolean isAtomExpression(int i) -
cmdPause
- Throws:
ScriptException
-
cmdPrint
- Throws:
ScriptException
-
cmdPrompt
- Throws:
ScriptException
-
cmdReset
- Throws:
ScriptException
-
resetError
private void resetError() -
cmdRestrict
- Throws:
ScriptException
-
cmdReturn
- Throws:
ScriptException
-
cmdRotate
- Throws:
ScriptException
-
cmdRestore
- Throws:
ScriptException
-
cmdSave
- Throws:
ScriptException
-
cmdScript
- Throws:
ScriptException
-
isMenu
-
cmdSelect
- Parameters:
i- 2 from RESTRICT BONDS, otherwise 1- Throws:
ScriptException
-
cmdSelectionHalos
- Throws:
ScriptException
-
cmdSet
- Throws:
ScriptException
-
cmdScale
- Throws:
ScriptException
-
cmdSetEcho
- Throws:
ScriptException
-
cmdSetLabel
- Throws:
ScriptException
-
cmdSetPicking
- Throws:
ScriptException
-
cmdSetPickingStyle
- Throws:
ScriptException
-
cmdSlab
- Throws:
ScriptException
-
cmdSsbond
- Throws:
ScriptException
-
cmdStructure
- Throws:
ScriptException
-
cmdSubset
- Throws:
ScriptException
-
cmdSync
- Throws:
ScriptException
-
cmdThrow
- Throws:
ScriptException
-
saveContext
-
cmdTimeout
- Throws:
ScriptException
-
cmdTranslate
- Throws:
ScriptException
-
cmdUnbind
- Throws:
ScriptException
-
cmdUndoRedo
- Throws:
ScriptException
-
setModelCagePts
-
cmdUnitcell
- Throws:
ScriptException
-
cmdVector
- Throws:
ScriptException
-
cmdVibration
- Throws:
ScriptException
-
cmdWireframe
- Throws:
ScriptException
-
cmdZap
- Throws:
ScriptException
-
cmdZoom
- Throws:
ScriptException
-
colorShape
- Throws:
ScriptException
-
getPartialCharges
- Throws:
ScriptException
-
encodeRadiusParameter
public RadiusData encodeRadiusParameter(int index, boolean isOnly, boolean allowAbsolute) throws ScriptException - Throws:
ScriptException
-
expandFloatArray
Accepts a float array and expands [1 -3] to [1 2 3], for example.- Parameters:
a-min-asBS-- Returns:
- float[] or BS
- Throws:
ScriptException
-
frameControl
- Throws:
ScriptException
-
getColorRange
- Throws:
ScriptException
-
getFullPathName
- Throws:
ScriptException
-
getObjectBoundingBox
-
getObjectCenter
-
getPlaneForObject
-
getQuaternionArray
-
getSetAxesTypeMad10
- Throws:
ScriptException
-
getSettingFloat
- Throws:
ScriptException
-
getSettingInt
- Throws:
ScriptException
-
getSettingStr
Accept an unquoted string if there is just one parameter regardless of its type. In other words, these commands cannot accept a variable name by itself.- Parameters:
pt-isJmolSet-- Returns:
- string parameter
- Throws:
ScriptException
-
getShapeProperty
-
getShapePropertyData
-
getShapeType
- Throws:
ScriptException
-
getTranslucentLevel
- Throws:
ScriptException
-
getZoom
private float getZoom(int ptCenter, int i, javajs.util.BS bs, float currentZoom) throws ScriptException - Throws:
ScriptException
-
setElementColor
-
setMeshDisplayProperty
- Parameters:
shape-i-tok-- Returns:
- true if successful
- Throws:
ScriptException
-
setObjectArgb
-
setObjectMad10
-
setObjectProp
- Throws:
ScriptException
-
setObjectProperty
- Throws:
ScriptException
-
setShapeNameParameter
- Throws:
ScriptException
-
setShapeProperty
-
setShapePropertyBs
-
setShapeSize
-
setShapeSizeBs
public void setShapeSizeBs(int shapeType, int size, javajs.util.BS bs) -
setShapeTranslucency
-
setSize
- Throws:
ScriptException
-
setSizeBio
- Throws:
ScriptException
-
setUnits
- Throws:
ScriptException
-
toString
-