Package org.jmol.scriptext
Class CmdExt
- java.lang.Object
-
- org.jmol.scriptext.ScriptExt
-
- org.jmol.scriptext.CmdExt
-
public class CmdExt extends ScriptExt
-
-
Constructor Summary
Constructors Constructor Description CmdExt()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
assign()
Though a command, not documented.private void
cache()
private void
calculate()
private void
capture()
private void
centerAt()
private int
checkPacked(int i, java.util.Map<java.lang.String,java.lang.Object> htParams, javajs.util.SB sOptions)
Process FILL and PACKED and all their variants.private void
compare()
Compares one set of atoms to another, generating the matrix that takes that maps the first set's coordinates to the second's.private void
configuration()
private void
connect(int index)
private void
console()
private void
data()
java.lang.String
dispatch(int iTok, boolean flag, T[] st)
The command dispatcher for the set of commands extended by this class.private void
ellipsoid()
boolean
evalParallel(ScriptContext context, ShapeManager shapeManager)
used for TRY commandprivate javajs.util.BS
expFor(int i, javajs.util.BS bsAtoms)
private java.lang.String
filterShow(java.lang.String msg, java.lang.String name)
java.lang.Object
getBitsetIdent(javajs.util.BS bs, java.lang.String label, java.lang.Object tokenValue, boolean useAtomMap, int index, boolean isExplicitlyAll)
java.lang.Object
getBitsetIdentFull(javajs.util.BS bs, java.lang.String label, java.lang.Object tokenValue, boolean useAtomMap, int index, boolean isExplicitlyAll, java.lang.String[] sout)
float[]
getBitsetPropertyFloat(javajs.util.BS bs, int tok, java.lang.String property, float min, float max)
private java.lang.String
getContext(boolean withVariables)
java.lang.String
getCurrentModelFileAsString()
private java.lang.Object
getIsosurfaceJvxl(int iShape, java.lang.String type)
int
getLoadSymmetryParams(int i, javajs.util.SB sOptions, java.util.Map<java.lang.String,java.lang.Object> htParams)
private java.lang.String
getMoJvxl(int ptMO, boolean isNBO)
private float
getPlotMinMax(float[] data, boolean isMax, int tok)
private java.lang.String
getScriptID(ScriptContext context)
private javajs.util.P3[]
getUVBoxFromHKL(SymmetryInterface uc, javajs.util.P4 hkl, javajs.util.P4 plane)
create a uvw-space unit cell from an HKL planeprivate void
image()
private void
invertSelected()
private void
macro()
private void
mapProperty()
private void
measure()
private void
minimize()
private void
modelkit()
Configure the ModelKitPopup for Crystallographic symmetry viewing and structure editing new 14.29.45 see modelkit.ModelKitPopup.javaprivate void
modulation()
Allows for setting one or more specific t-values as well as full unit-cell shifts (multiples of q).private void
mutate()
private void
navigate()
private java.lang.Object
parseDataArray(java.lang.String str, boolean is3D)
private java.lang.String
plot(T[] args)
private void
polyhedra()
javajs.util.Lst<java.lang.Object>
prepareBinaryOutput(SV tvar)
private void
show()
private void
stereo()
private boolean
struts()
private static int
tokAtArray(int i, T[] args)
private T
tokenAt(int i, T[] args)
private void
unitcell(int i, boolean isModelkit)
private java.lang.String
write(T[] args)
private java.lang.String
writeMsg(java.lang.String msg)
-
Methods inherited from class org.jmol.scriptext.ScriptExt
atomExpressionAt, bsToArray, centerParameter, checkLength, error, finalizeObject, floatParameter, getAllPoints, getColorTrans, getIntArray2, getPoint3f, getShapeProperty, getToken, init, intParameter, invArg, invPO, isFloatParameter, paramAsStr, setShapeId, setShapeProperty, showString, stringParameter, tokAt
-
-
-
-
Field Detail
-
ERROR_invalidArgument
static final int ERROR_invalidArgument
- See Also:
- Constant Field Values
-
-
Method Detail
-
dispatch
public java.lang.String dispatch(int iTok, boolean flag, T[] st) throws ScriptException
The command dispatcher for the set of commands extended by this class. These commands can be from the Jmol command of their method name or another command or method working as though it were a command, with a non-GUI-generated compiled script.- Specified by:
dispatch
in classScriptExt
- Parameters:
iTok
- the current statement position, usually 1flag
- a command-specific flagst
- the compiled statement for this command- Throws:
ScriptException
-
macro
private void macro() throws ScriptException
- Throws:
ScriptException
-
evalParallel
public boolean evalParallel(ScriptContext context, ShapeManager shapeManager)
used for TRY command- Parameters:
context
-shapeManager
-- Returns:
- true if successful; false if not
-
getBitsetIdent
public java.lang.Object getBitsetIdent(javajs.util.BS bs, java.lang.String label, java.lang.Object tokenValue, boolean useAtomMap, int index, boolean isExplicitlyAll)
-
getBitsetIdentFull
public java.lang.Object getBitsetIdentFull(javajs.util.BS bs, java.lang.String label, java.lang.Object tokenValue, boolean useAtomMap, int index, boolean isExplicitlyAll, java.lang.String[] sout)
-
getLoadSymmetryParams
public int getLoadSymmetryParams(int i, javajs.util.SB sOptions, java.util.Map<java.lang.String,java.lang.Object> htParams) throws ScriptException
- Throws:
ScriptException
-
checkPacked
private int checkPacked(int i, java.util.Map<java.lang.String,java.lang.Object> htParams, javajs.util.SB sOptions) throws ScriptException
Process FILL and PACKED and all their variants.- Parameters:
i
-htParams
-sOptions
-- Returns:
- new token position
- Throws:
ScriptException
-
cache
private void cache() throws ScriptException
- Throws:
ScriptException
-
calculate
private void calculate() throws ScriptException
- Throws:
ScriptException
-
capture
private void capture() throws ScriptException
- Throws:
ScriptException
-
centerAt
private void centerAt() throws ScriptException
- Throws:
ScriptException
-
compare
private void compare() throws ScriptException
Compares one set of atoms to another, generating the matrix that takes that maps the first set's coordinates to the second's. Options TRANSLATE and ROTATE will generate an animation. See interactive documentation for more details.- Throws:
ScriptException
-
configuration
private void configuration() throws ScriptException
- Throws:
ScriptException
-
measure
private void measure() throws ScriptException
- Throws:
ScriptException
-
connect
private void connect(int index) throws ScriptException
- Parameters:
index
- 0 indicates hbond command- Throws:
ScriptException
-
console
private void console() throws ScriptException
- Throws:
ScriptException
-
data
private void data() throws ScriptException
- Throws:
ScriptException
-
ellipsoid
private void ellipsoid() throws ScriptException
- Throws:
ScriptException
-
image
private void image() throws ScriptException
- Throws:
ScriptException
-
invertSelected
private void invertSelected() throws ScriptException
- Throws:
ScriptException
-
mapProperty
private void mapProperty() throws ScriptException
- Throws:
ScriptException
-
minimize
private void minimize() throws ScriptException
- Throws:
ScriptException
-
modulation
private void modulation() throws ScriptException
Allows for setting one or more specific t-values as well as full unit-cell shifts (multiples of q).- Throws:
ScriptException
-
mutate
private void mutate() throws ScriptException
- Throws:
ScriptException
-
navigate
private void navigate() throws ScriptException
- Throws:
ScriptException
-
plot
private java.lang.String plot(T[] args) throws ScriptException
- Throws:
ScriptException
-
polyhedra
private void polyhedra() throws ScriptException
- Throws:
ScriptException
-
write
private java.lang.String write(T[] args) throws ScriptException
- Parameters:
args
-- Returns:
- string for write() function
- Throws:
ScriptException
-
prepareBinaryOutput
public javajs.util.Lst<java.lang.Object> prepareBinaryOutput(SV tvar)
-
writeMsg
private java.lang.String writeMsg(java.lang.String msg) throws ScriptException
- Throws:
ScriptException
-
show
private void show() throws ScriptException
- Throws:
ScriptException
-
getCurrentModelFileAsString
public java.lang.String getCurrentModelFileAsString()
-
filterShow
private java.lang.String filterShow(java.lang.String msg, java.lang.String name)
-
stereo
private void stereo() throws ScriptException
- Throws:
ScriptException
-
struts
private boolean struts() throws ScriptException
- Throws:
ScriptException
-
unitcell
private void unitcell(int i, boolean isModelkit) throws ScriptException
- Throws:
ScriptException
-
getUVBoxFromHKL
private javajs.util.P3[] getUVBoxFromHKL(SymmetryInterface uc, javajs.util.P4 hkl, javajs.util.P4 plane) throws ScriptException
create a uvw-space unit cell from an HKL plane- Parameters:
uc
-hkl
-plane
-- Returns:
- [o a b c]
- Throws:
ScriptException
-
modelkit
private void modelkit() throws ScriptException
Configure the ModelKitPopup for Crystallographic symmetry viewing and structure editing new 14.29.45 see modelkit.ModelKitPopup.java- Throws:
ScriptException
-
assign
private void assign() throws ScriptException
Though a command, not documented. Use the MODELKIT command instead- Throws:
ScriptException
-
expFor
private javajs.util.BS expFor(int i, javajs.util.BS bsAtoms) throws ScriptException
- Throws:
ScriptException
-
getContext
private java.lang.String getContext(boolean withVariables)
-
getIsosurfaceJvxl
private java.lang.Object getIsosurfaceJvxl(int iShape, java.lang.String type)
-
getMoJvxl
private java.lang.String getMoJvxl(int ptMO, boolean isNBO) throws ScriptException
- Throws:
ScriptException
-
getScriptID
private java.lang.String getScriptID(ScriptContext context)
-
tokAtArray
private static int tokAtArray(int i, T[] args)
-
getPlotMinMax
private float getPlotMinMax(float[] data, boolean isMax, int tok)
-
parseDataArray
private java.lang.Object parseDataArray(java.lang.String str, boolean is3D)
-
getBitsetPropertyFloat
public float[] getBitsetPropertyFloat(javajs.util.BS bs, int tok, java.lang.String property, float min, float max) throws ScriptException
- Throws:
ScriptException
-
-