Logo Search packages:      
Sourcecode: jmol version File versions  Download package

Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Package Functions | Package Attributes | Private Member Functions | Private Attributes | Static Private Attributes

org::jmol::script::ScriptEvaluator Class Reference

Collaboration diagram for org::jmol::script::ScriptEvaluator:
Collaboration graph
[legend]

List of all members.

Classes

class  ScriptException

Public Member Functions

ScriptContext checkScriptSilent (String script)
boolean compileScriptFile (String filename, boolean tQuiet)
boolean compileScriptString (String script, boolean tQuiet)
void deleteAtomsInVariables (BitSet bsDeleted)
void evaluateCompiledScript (boolean isCmdLine_c_or_C_Option, boolean isCmdLine_C_Option, boolean historyDisabled, boolean listCommands, StringBuffer outputBuffer)
Hashtable getContextVariables ()
int getExecutionWalltime ()
String getNextStatement ()
String getScript ()
void haltExecution ()
boolean isExecutionPaused ()
boolean isExecutionStepping ()
boolean isScriptExecuting ()
void pauseExecution (boolean withDelay)
void resumePausedExecution ()
void runScript (String script, StringBuffer outputBuffer) throws ScriptException
 ScriptEvaluator (Viewer viewer)
void setDebugging ()
void stepPausedExecution ()

Static Public Member Functions

static boolean evaluateContext (Viewer viewer, ScriptContext context, ShapeManager shapeManager)
static Object evaluateExpression (Viewer viewer, Object expr)
static BitSet getAtomBitSet (ScriptEvaluator e, Object atomExpression)
static List getAtomBitSetVector (ScriptEvaluator e, int atomCount, Object atomExpression)

Static Public Attributes

static final String SCRIPT_COMPLETED = "Script completed"

Protected Member Functions

Object getBitsetProperty (BitSet bs, int tok, Point3f ptRef, Point4f planeRef, Object tokenValue, Object opValue, boolean useAtomMap, int index, boolean asVector) throws ScriptException

Protected Attributes

ScriptCompiler compiler
boolean isCmdLine_c_or_C_Option
boolean isSyntaxCheck
boolean logMessages
int pc
Viewer viewer

Package Functions

Object bitsetVariableVector (Object v)
Object getBitsetIdent (BitSet bs, String label, Object tokenValue, boolean useAtomMap, int index, boolean isExplicitlyAll)
ScriptVariable runFunction (ScriptFunction function, String name, List params, Token tokenAtom, boolean getReturn) throws ScriptException

Package Attributes

int scriptLevel
ShapeManager shapeManager

Private Member Functions

void clearDefinedVariableAtomSets ()
boolean compileScript (String filename, String strScript, boolean debugCompiler)
boolean compileScriptFileInternal (String filename, String localPath, String remotePath, String scriptPath)
void defineAtomSet (String script)
void defineSets ()
String fixScriptPath (String strScript, String filename)
float[] getBitsetPropertyFloat (BitSet bs, int tok, float min, float max) throws ScriptException
ScriptVariable getBitsetPropertySelector (int i, boolean mustBeSettable) throws ScriptException
String getCommand (int pc, boolean allThisLine, boolean addSemi)
ScriptVariable getContextVariableAsVariable (String var)
Hashtable getHash (int i) throws ScriptException
Object getNumericParameter (String var)
Object getParameter (String key, int tokType)
String getParameterEscaped (String var)
Object getStringObjectAsVariable (String s, String key)
String getStringParameter (String var, boolean orReturnName)
void logDebugScript (int ifLevel)
BitSet lookupIdentifierValue (String identifier) throws ScriptException
BitSet lookupValue (String setName, boolean plurals) throws ScriptException
Object parameterExpression (int pt, int ptMax, String key, boolean ignoreComma, boolean asVector, int ptAtom, boolean isArrayItem, Hashtable localVars, String localVar) throws ScriptException
boolean parameterExpressionBoolean (int pt, int ptMax) throws ScriptException
List parameterExpressionList (int pt, boolean isArrayItem) throws ScriptException
String parameterExpressionString (int pt, int ptMax) throws ScriptException
ScriptVariable parameterExpressionToken (int pt) throws ScriptException
void runFunction (ScriptFunction function, List params, Token tokenAtom) throws ScriptException
void runScript (String script) throws ScriptException
void setBitsetProperty (BitSet bs, int tok, int iValue, float fValue, Token tokenValue) throws ScriptException
int setScriptExtensions ()

Private Attributes

Token[][] aatoken
int commandHistoryLevelMax = 0
String contextPath = ""
Hashtable contextVariables
Thread currentThread
boolean debugScript
Hashtable definedAtomSets
boolean executionPaused
boolean executionStepping
String filename
String fullCommand
String functionName
boolean historyDisabled
boolean interruptExecution
boolean isCmdLine_C_Option
boolean isExecuting
boolean isStateScript
int iToken
int lineEnd
int[][] lineIndices
short[] lineNumbers
StringBuffer outputBuffer
ParallelProcessor parallelProcessor
int pcEnd
String script
String scriptExtensions
int scriptReportingLevel = 0
Token[] statement
int statementLength
String thisCommand
long timeBeginExecution
long timeEndExecution
boolean tQuiet

Static Private Attributes

static final String EXPRESSION_KEY = "e_x_p_r_e_s_s_i_o_n"
static final int scriptLevelMax = 100

boolean error
String errorMessage
boolean ignoreError
Token[] tempStatement
boolean isBondSet
Object expressionResult
int theTok
Token theToken
boolean coordinatesAreFractional
List vProcess
Object[] data
ScriptContext thisContext = null
String errorMessageUntranslated
String errorType
int iCommandError
static Object testData
static Object testData2
static final int ERROR_axisExpected = 0
static final int ERROR_backgroundModelError = 1
static final int ERROR_badArgumentCount = 2
static final int ERROR_badMillerIndices = 3
static final int ERROR_badRGBColor = 4
static final int ERROR_booleanExpected = 5
static final int ERROR_booleanOrNumberExpected = 6
static final int ERROR_booleanOrWhateverExpected = 7
static final int ERROR_colorExpected = 8
static final int ERROR_colorOrPaletteRequired = 9
static final int ERROR_commandExpected = 10
static final int ERROR_coordinateOrNameOrExpressionRequired = 11
static final int ERROR_drawObjectNotDefined = 12
static final int ERROR_endOfStatementUnexpected = 13
static final int ERROR_expressionExpected = 14
static final int ERROR_expressionOrIntegerExpected = 15
static final int ERROR_filenameExpected = 16
static final int ERROR_fileNotFoundException = 17
static final int ERROR_incompatibleArguments = 18
static final int ERROR_insufficientArguments = 19
static final int ERROR_integerExpected = 20
static final int ERROR_integerOutOfRange = 21
static final int ERROR_invalidArgument = 22
static final int ERROR_invalidParameterOrder = 23
static final int ERROR_keywordExpected = 24
static final int ERROR_moCoefficients = 25
static final int ERROR_moIndex = 26
static final int ERROR_moModelError = 27
static final int ERROR_moOccupancy = 28
static final int ERROR_moOnlyOne = 29
static final int ERROR_multipleModelsDisplayedNotOK = 30
static final int ERROR_noData = 31
static final int ERROR_noPartialCharges = 32
static final int ERROR_noUnitCell = 33
static final int ERROR_numberExpected = 34
static final int ERROR_numberMustBe = 35
static final int ERROR_numberOutOfRange = 36
static final int ERROR_objectNameExpected = 37
static final int ERROR_planeExpected = 38
static final int ERROR_propertyNameExpected = 39
static final int ERROR_spaceGroupNotFound = 40
static final int ERROR_stringExpected = 41
static final int ERROR_stringOrIdentifierExpected = 42
static final int ERROR_tooManyPoints = 43
static final int ERROR_tooManyScriptLevels = 44
static final int ERROR_unrecognizedAtomProperty = 45
static final int ERROR_unrecognizedBondProperty = 46
static final int ERROR_unrecognizedCommand = 47
static final int ERROR_unrecognizedExpression = 48
static final int ERROR_unrecognizedObject = 49
static final int ERROR_unrecognizedParameter = 50
static final int ERROR_unrecognizedParameterWarning = 51
static final int ERROR_unrecognizedShowParameter = 52
static final int ERROR_what = 53
static final int ERROR_writeWhat = 54
static final int ERROR_multipleModelsNotOK = 55
static int iProcess
ScriptContext getScriptContext ()
String getErrorMessage ()
String getErrorMessageUntranslated ()
String toString ()
boolean setStatement (int pc) throws ScriptException
void clearState (boolean tQuiet)
void pushContext (ContextToken token) throws ScriptException
void restoreScriptContext (ScriptContext context, boolean isPopContext, boolean isFlowCommand, boolean statementOnly)
String getContext (boolean withVariables)
int getLinenumber (ScriptContext c)
String getScriptID (ScriptContext context)
void setErrorMessage (String err)
void planeExpected () throws ScriptException
void integerOutOfRange (int min, int max) throws ScriptException
void numberOutOfRange (float min, float max) throws ScriptException
void warning (int iError, String value, String more) throws ScriptException
Object getShapeProperty (int shapeType, String propertyName)
boolean getShapeProperty (int shapeType, String propertyName, Object[] data)
Object getShapeProperty (int shapeType, String propertyName, int index)
void addShapeProperty (List propertyList, String key, Object value)
void loadShape (int iShape)
void setObjectMad (int iShape, String name, int mad)
void setObjectArgb (String str, int argb)
void setShapeProperty (int shapeType, String propertyName, Object propertyValue)
void setShapeProperty (int iShape, String propertyName, Object propertyValue, BitSet bs)
void setShapeSize (int shapeType, int size, BitSet bs)
void setShapeSize (int shapeType, RadiusData rd)
void setBooleanProperty (String key, boolean value)
boolean setIntProperty (String key, int value)
boolean setFloatProperty (String key, float value)
void setStringProperty (String key, String value)
void showString (String str)
void showString (String str, boolean isPrint)
void scriptStatusOrBuffer (String s)
BitSet atomExpression (int index) throws ScriptException
BitSet atomExpression (Token[] code, int pcStart, int pcStop, boolean allowRefresh, boolean allowUnderflow, boolean mustBeBitSet, boolean andNotDeleted) throws ScriptException
BitSet compareFloat (int tokWhat, float[] data, int tokOperator, float comparisonFloat)
BitSet compareString (int tokWhat, int tokOperator, String comparisonString) throws ScriptException
boolean compareString (int tokOperator, String propertyValue, String comparisonValue) throws ScriptException
BitSet getAtomBits (int tokType, Object specInfo)
int checkLast (int i) throws ScriptException
int checkLength (int length) throws ScriptException
int checkLength (int length, int errorPt) throws ScriptException
int checkLength23 () throws ScriptException
int checkLength34 () throws ScriptException
Token getToken (int i) throws ScriptException
int tokAt (int i)
int tokAt (int i, Token[] args)
Token tokenAt (int i, Token[] args)
boolean checkToken (int i)
int modelNumberParameter (int index) throws ScriptException
String optParameterAsString (int i) throws ScriptException
String parameterAsString (int i) throws ScriptException
int intParameter (int index) throws ScriptException
int intParameter (int i, int min, int max) throws ScriptException
boolean isFloatParameter (int index)
float floatParameter (int i, float min, float max) throws ScriptException
float floatParameter (int index) throws ScriptException
float[] floatParameterSet (int i, int nMin, int nMax) throws ScriptException
Point3f[] getPointArray (int i, int nPoints) throws ScriptException
float[][] floatArraySet (int i, int nX, int nY) throws ScriptException
float[][][] floatArraySet (int i, int nX, int nY, int nZ) throws ScriptException
String stringParameter (int index) throws ScriptException
String[] stringParameterSet (int i) throws ScriptException
String objectNameParameter (int index) throws ScriptException
boolean booleanParameter (int i) throws ScriptException
Point3f atomCenterOrCoordinateParameter (int i) throws ScriptException
boolean isCenterParameter (int i)
Point3f centerParameter (int i) throws ScriptException
Point3f centerParameter (int i, int modelIndex) throws ScriptException
Point4f planeParameter (int i) throws ScriptException
Point4f hklParameter (int i) throws ScriptException
int getMadParameter () throws ScriptException
int getSetAxesTypeMad (int index) throws ScriptException
boolean isColorParam (int i)
int getArgbParam (int index) throws ScriptException
int getArgbParamLast (int index, boolean allowNone) throws ScriptException
int getArgbParam (int index, boolean allowNone) throws ScriptException
int getColorTriad (int i) throws ScriptException
boolean isPoint3f (int i)
Point3f getPoint3f (int i, boolean allowFractional) throws ScriptException
Point4f getPoint4f (int i) throws ScriptException
Object getPointOrPlane (int index, boolean integerOnly, boolean allowFractional, boolean doConvert, boolean implicitFractional, int minDim, int maxDim) throws ScriptException
Point3f xypParameter (int index) throws ScriptException
boolean isCommandDisplayable (int i)
boolean checkContinue ()
void instructionDispatchLoop (boolean doList) throws ScriptException
void setCursorWait (boolean TF)
void processShapeCommand (int tok) throws ScriptException
boolean flowControl (int tok, boolean isForCheck) throws ScriptException
void gotoCmd (String strTo) throws ScriptException
void breakCmd (int pt)
void addProcess (int pc, int pt, boolean isStart)
int switchCmd (ContextToken c, int tok) throws ScriptException
boolean ifCmd () throws ScriptException
void returnCmd (ScriptVariable tv) throws ScriptException
void help () throws ScriptException
void move () throws ScriptException
void moveto () throws ScriptException
void navigate () throws ScriptException
void bondorder () throws ScriptException
void console () throws ScriptException
void centerAt () throws ScriptException
void stereo () throws ScriptException
void compare () throws ScriptException
void connect (int index) throws ScriptException
float getTranslucentLevel (int i) throws ScriptException
void getProperty () throws ScriptException
void background (int i) throws ScriptException
void center (int i) throws ScriptException
String setObjectProperty () throws ScriptException
void color () throws ScriptException
boolean changeElementColor (String str, int argb)
void colorShape (int shapeType, int index, boolean isBackground) throws ScriptException
void colorShape (int shapeType, int typeMask, int argb, String translucency, float translucentLevel, BitSet bs)
void setShapeTranslucency (int shapeType, String prefix, String translucency, float translucentLevel, BitSet bs)
void cd () throws ScriptException
void mapProperty () throws ScriptException
void data () throws ScriptException
void define () throws ScriptException
void echo (int index, boolean isImage) throws ScriptException
void message () throws ScriptException
void log () throws ScriptException
void label (int index) throws ScriptException
void hover () throws ScriptException
void load () throws ScriptException
void logLoadInfo (String msg)
String getFullPathName () throws ScriptException
void measure () throws ScriptException
String plot (Token[] args) throws ScriptException
boolean pause () throws ScriptException
void print () throws ScriptException
void prompt () throws ScriptException
void refresh ()
void reset () throws ScriptException
void restrict () throws ScriptException
void restrictSelected (boolean isBond, boolean doInvert)
void rotate (boolean isSpin, boolean isSelected) throws ScriptException
Quaternion getQuaternionParameter (int i) throws ScriptException
Point3f getObjectCenter (String axisID, int index, int modelIndex)
Point3f[] getObjectBoundingBox (String id)
Vector3f getDrawObjectAxis (String axisID, int index)
void script (int tok, String filename) throws ScriptException
void function () throws ScriptException
void sync () throws ScriptException
void history (int pt) throws ScriptException
void display (boolean isDisplay) throws ScriptException
void delete () throws ScriptException
void minimize () throws ScriptException
void select (int i) throws ScriptException
void subset () throws ScriptException
void invertSelected () throws ScriptException
void translate (boolean isSelected) throws ScriptException
void zap (boolean isZapCommand) throws ScriptException
void zoom (boolean isZoomTo) throws ScriptException
float getZoom (int i, BitSet bs, float currentZoom) throws ScriptException
void delay () throws ScriptException
void delay (long millis)
void slab (boolean isDepth) throws ScriptException
void ellipsoid () throws ScriptException
String getShapeNameParameter (int i) throws ScriptException
String setShapeId (int iShape, int i, boolean idSeen) throws ScriptException
void setAtomShapeSize (int shape, float scale) throws ScriptException
RadiusData encodeRadiusParameter (int index, boolean isOnly) throws ScriptException
void structure () throws ScriptException
void wireframe () throws ScriptException
void ssbond () throws ScriptException
void struts () throws ScriptException
void hbond (boolean isCommand) throws ScriptException
void configuration () throws ScriptException
void vector () throws ScriptException
void dipole () throws ScriptException
void animationMode () throws ScriptException
void vibration () throws ScriptException
void animationDirection () throws ScriptException
void calculate () throws ScriptException
void pointGroup () throws ScriptException
void dots (int iShape) throws ScriptException
void proteinShape (int shapeType) throws ScriptException
void animation () throws ScriptException
void assign () throws ScriptException
void file () throws ScriptException
void fixed () throws ScriptException
void frame (int offset) throws ScriptException
void frameControl (int i, boolean isSubCmd) throws ScriptException
int getShapeType (int tok) throws ScriptException
void font (int shapeType, float fontsize) throws ScriptException
void set () throws ScriptException
int intSetting (int pt, int val, int min, int max) throws ScriptException
int intSetting (int pt) throws ScriptException
float floatSetting (int pt, float min, float max) throws ScriptException
String stringSetting (int pt, boolean isJmolSet) throws ScriptException
void setBondmode () throws ScriptException
void setEcho () throws ScriptException
boolean setLabel (String str) throws ScriptException
void setMonitor () throws ScriptException
boolean setMeasurementUnits (String units) throws ScriptException
void setSsbond () throws ScriptException
void setHbond () throws ScriptException
void setPicking () throws ScriptException
void setPickingStyle () throws ScriptException
void timeout (int index) throws ScriptException
void setUserColors () throws ScriptException
void setVariable (int pt, int ptMax, String key, int setType) throws ScriptException
void axes (int index) throws ScriptException
void boundbox (int index) throws ScriptException
TickInfo checkTicks (int index, boolean allowUnitCell, boolean allowScale, boolean allowFirst) throws ScriptException
void unitcell (int index) throws ScriptException
void frank (int index) throws ScriptException
void selectionHalo (int pt) throws ScriptException
void save () throws ScriptException
void restore () throws ScriptException
void show () throws ScriptException
String getIsosurfaceJvxl (boolean asMesh, int iShape)
String getMoJvxl (int ptMO) throws ScriptException
String extractCommandOption (String name)
void draw () throws ScriptException
void polyhedra () throws ScriptException
void lcaoCartoon () throws ScriptException
Object getCapSlabObject (StringBuffer sb, int i) throws ScriptException
boolean mo (boolean isInitOnly) throws ScriptException
String setColorOptions (StringBuffer sb, int index, int iShape, int nAllowed) throws ScriptException
int moOffset (int index) throws ScriptException
void setMoData (List propertyList, int moNumber, int offset, int modelIndex, String title) throws ScriptException
String initIsosurface (int iShape) throws ScriptException
String getNextComment ()
boolean listIsosurface (int iShape) throws ScriptException
void isosurface (int iShape) throws ScriptException
String getIsosurfaceDataRange (int iShape, String sep)
void getWithinDistanceVector (List propertyList, float distance, Point3f ptc, BitSet bs)
boolean setMeshDisplayProperty (int shape, int i, int tok) throws ScriptException
void bind () throws ScriptException
void unbind () throws ScriptException
void popContext (boolean isFlowCommand, boolean statementOnly)
void error (int iError, int i) throws ScriptException
void error (int iError) throws ScriptException
void error (int iError, String value) throws ScriptException
void error (int iError, String value, String more) throws ScriptException
void error (int iError, String value, String more, String more2) throws ScriptException
void error (int iError, String value, String more, String more2, boolean warningOnly) throws ScriptException
void evalError (String message, String strUntranslated) throws ScriptException
float getSmilesCorrelation (BitSet bsA, BitSet bsB, String smiles, List ptsA, List ptsB, Matrix4f m, List vReturn, boolean isSmarts) throws ScriptException
Object getSmilesMatches (String pattern, String smiles, BitSet bsSelected, BitSet bsMatch3D, boolean isSmarts, boolean asOneBitset) throws ScriptException
List getPointVector (Token t, int i) throws ScriptException
BitSet bitSetForModelFileNumber (int m)
String write (Token[] args) throws ScriptException
BitSet compareInt (int tokWhat, int tokOperator, int comparisonValue)
Point4f getHklPlane (Point3f pt)
static String errorString (int iError, String value, String more, String more2, boolean translated)
static String setErrorLineMessage (String functionName, String filename, int lineCurrent, int pcCurrent, String lineInfo)
static String statementAsString (Token[] statement, int iTok, boolean doLogMessages)
static boolean compareFloat (int tokOperator, float propertyFloat, float comparisonFloat)
static int getSeqCode (Token instruction)
static float getMinMax (float[] data, boolean isMax, int tok)

Detailed Description

Definition at line 86 of file ScriptEvaluator.java.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index