Package org.jmol.viewer
Class PropertyManager
- java.lang.Object
-
- org.jmol.viewer.PropertyManager
-
- All Implemented Interfaces:
JmolPropertyManager
public class PropertyManager extends Object implements JmolPropertyManager
The PropertyManager handles all operations relating to delivery of properties with the getProperty() method, or its specifically cast forms getPropertyString() or getPropertyJSON(). It is instantiated by reflection
-
-
Field Summary
Fields Modifier and Type Field Description private static StringatomExpressionprivate Map<String,Integer>mapprivate static intPROP_ANIMATION_INFOprivate static intPROP_APPLET_INFOprivate static intPROP_ATOM_INFOprivate static intPROP_AUXILIARY_INFOprivate static intPROP_BOND_INFOprivate static intPROP_BOUNDBOX_INFOprivate static intPROP_CENTER_INFOprivate static intPROP_CHAIN_INFOprivate static intPROP_CIF_INFOprivate static intPROP_CONSOLE_TEXTprivate static intPROP_COUNTprivate static intPROP_DATA_INFOprivate static intPROP_DOM_INFOprivate static intPROP_ERROR_MESSAGEprivate static intPROP_EVALUATEprivate static intPROP_EXTRACT_MODELprivate static intPROP_FILE_INFOprivate static intPROP_FILECONTENTSprivate static intPROP_FILECONTENTS_PATHprivate static intPROP_FILEHEADERprivate static intPROP_FILENAMEprivate static intPROP_IMAGEprivate static intPROP_ISOSURFACE_DATAprivate static intPROP_ISOSURFACE_INFOprivate static intPROP_JMOL_STATUSprivate static intPROP_JMOL_VIEWERprivate static intPROP_JSPECVIEWprivate static intPROP_LIGAND_INFOprivate static intPROP_MEASUREMENT_INFOprivate static intPROP_MENUprivate static intPROP_MESSAGE_QUEUEprivate static intPROP_MINIMIZATION_INFOprivate static intPROP_MODEL_INFOprivate static intPROP_MODELKIT_INFOprivate static intPROP_MOLECULE_INFOprivate static intPROP_MOUSE_INFOprivate static intPROP_NMR_INFOprivate static intPROP_ORIENTATION_INFOprivate static intPROP_POINTGROUP_INFOprivate static intPROP_POLYMER_INFOprivate static intPROP_SCRIPT_QUEUE_INFOprivate static intPROP_SERVICEprivate static intPROP_SHAPE_INFOprivate static intPROP_STATE_INFOprivate static intPROP_TRANSFORM_INFOprivate static intPROP_VAL_INFOprivate static intPROP_VAR_INFOprivate static String[]propertyTypesprivate static String[]readableTypes(package private) Viewervwr
-
Constructor Summary
Constructors Constructor Description PropertyManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancheckKey(String k, String key, String lckey)private StringcheckMap(Map<String,?> h, String key, boolean isWild, javajs.util.Lst<Object> v2, Object args, int ptr, boolean isCaseSensitive)booleancheckPropertyParameter(String name)private ObjectcompileSelect(SV[] args)ObjectextractProperty(Object prop, Object args, int ptr, javajs.util.Lst<Object> v2, boolean isCompiled)StringfixJMEFormalCharges(javajs.util.BS bsAtoms, String jme)Fix a JME string returned from NCI CIR to have the proper formal charges.private intfixPDBFormat(javajs.util.Lst<String> lines, Map<String,Integer> map, javajs.util.OC out, int[] firstAtomIndexNew, int modelPt)must re-order by resno and then renumber atoms and add TER records based on BioPolymers note: 3hbt has a break between residues 39 and 51 with no TER record, but Jmol will put that in.private StringfixSelectQuotes(String propertyName)javajs.util.Lst<Map<String,Object>>getAllAtomInfo(javajs.util.BS bs)javajs.util.Lst<Map<String,Object>>getAllBondInfo(Object bsOrArray)Map<String,javajs.util.Lst<Map<String,Object>>>getAllChainInfo(javajs.util.BS bs)private Map<String,javajs.util.Lst<Map<String,Object>>>getAllPolymerInfo(javajs.util.BS bs)private Map<String,Object>getAnimationInfo()private SVgetAnnotationInfo(Object atomExpression, int type)private Map<String,Object>getAppletInfo()private SV[]getArguments(String propertyName)StringgetAtomData(String atomExpression, String type, boolean allTrajectories)use lower case to indicate coord data only (xyz, xyzrn, xyzvib, pdb.private Map<String,Object>getAtomInfoLong(int i, javajs.util.P3 ptTemp)private static voidgetAtomResidueInfo(javajs.util.SB info, Atom atom)private StringgetBasePairInfo(javajs.util.BS bs)private Map<String,Object>getBondInfo(int i, javajs.util.P3 ptTemp)private Map<String,Object>getBoundBoxInfo()private javajs.util.Lst<Map<String,javajs.util.Lst<Map<String,Object>>>>getChainInfo(int modelIndex, javajs.util.BS bs)StringgetChimeInfo(int tok, javajs.util.BS bs)private StringgetChimeInfoA(Atom[] atoms, int tok, javajs.util.BS bs)private static javajs.util.BSgetCovalentBondsForAtoms(Bond[] bonds, int bondCount, javajs.util.BS bsAtoms)StringgetDefaultPropertyParam(int propID)(package private) static ObjectgetFileInfo(Object objHeader, String type)private ObjectgetImage(String params, boolean asBytes)private javajs.util.Lst<String>getKeys(String select)Map<String,Object>getLigandInfo(Object atomExpression)private static voidgetMapSubset(Map<String,?> h, String key, Map<String,Object> h2, javajs.util.Lst<Object> v2)private javajs.util.Lst<Map<String,Object>>getMeasurementInfo()private StringgetModelCif(javajs.util.BS bs)just a very primitive CIF file readerStringgetModelCml(javajs.util.BS bs, int atomsMax, boolean addBonds, boolean doTransform, boolean allTrajectories)StringgetModelExtract(javajs.util.BS bs, boolean doTransform, boolean isModelKit, String type, boolean allTrajectories)V3000, SDF, MOL, JSON, CD, XYZ, XYZVIB, XYZRN, CML, PDB, PQR, QCJSON MOL67 is MOL with bonds of type 6 or 7 (aromatic single/double)StringgetModelFileInfo(javajs.util.BS frames)Map<String,Object>getModelInfo(Object atomExpression)javajs.util.Lst<Map<String,Object>>getMoleculeInfo(Object atomExpression)private ObjectgetMouseInfo()private static StringgetParamType(int propID)StringgetPdbAtomData(javajs.util.BS bs, javajs.util.OC out, boolean isPQR, boolean doTransform, boolean allTrajectories)PDB or PQR onlyStringgetPdbData(int modelIndex, String type, javajs.util.BS bsSelected, Object[] parameters, javajs.util.OC out, boolean addStructure)static voidgetPointTransf(int i, ModelSet ms, Atom a, javajs.util.Quat q, javajs.util.P3 pTemp)pick up the appropriate value for this atomObjectgetProperty(String returnType, String infoType, Object paramInfo)private ObjectgetPropertyAsObject(String infoType, Object paramInfo, String returnType)private static StringgetPropertyName(int propID)intgetPropertyNumber(String infoType)private StringgetQCJSON(javajs.util.BS bs)EXPERIMENTAL create a QCJSON file -- very preliminaryprivate Map<String,Object>getShapeInfo()private ObjectgetVariables(String name)private static booleanisReadableAsString(String infoType)private StringpdbKey(int np)voidsetViewer(Viewer vwr)
-
-
-
Field Detail
-
vwr
Viewer vwr
-
atomExpression
private static final String atomExpression
- See Also:
- Constant Field Values
-
propertyTypes
private static final String[] propertyTypes
-
PROP_APPLET_INFO
private static final int PROP_APPLET_INFO
- See Also:
- Constant Field Values
-
PROP_FILENAME
private static final int PROP_FILENAME
- See Also:
- Constant Field Values
-
PROP_FILEHEADER
private static final int PROP_FILEHEADER
- See Also:
- Constant Field Values
-
PROP_FILECONTENTS_PATH
private static final int PROP_FILECONTENTS_PATH
- See Also:
- Constant Field Values
-
PROP_FILECONTENTS
private static final int PROP_FILECONTENTS
- See Also:
- Constant Field Values
-
PROP_ANIMATION_INFO
private static final int PROP_ANIMATION_INFO
- See Also:
- Constant Field Values
-
PROP_MODEL_INFO
private static final int PROP_MODEL_INFO
- See Also:
- Constant Field Values
-
PROP_LIGAND_INFO
private static final int PROP_LIGAND_INFO
- See Also:
- Constant Field Values
-
PROP_SHAPE_INFO
private static final int PROP_SHAPE_INFO
- See Also:
- Constant Field Values
-
PROP_MEASUREMENT_INFO
private static final int PROP_MEASUREMENT_INFO
- See Also:
- Constant Field Values
-
PROP_CENTER_INFO
private static final int PROP_CENTER_INFO
- See Also:
- Constant Field Values
-
PROP_ORIENTATION_INFO
private static final int PROP_ORIENTATION_INFO
- See Also:
- Constant Field Values
-
PROP_TRANSFORM_INFO
private static final int PROP_TRANSFORM_INFO
- See Also:
- Constant Field Values
-
PROP_ATOM_INFO
private static final int PROP_ATOM_INFO
- See Also:
- Constant Field Values
-
PROP_BOND_INFO
private static final int PROP_BOND_INFO
- See Also:
- Constant Field Values
-
PROP_CHAIN_INFO
private static final int PROP_CHAIN_INFO
- See Also:
- Constant Field Values
-
PROP_POLYMER_INFO
private static final int PROP_POLYMER_INFO
- See Also:
- Constant Field Values
-
PROP_MOLECULE_INFO
private static final int PROP_MOLECULE_INFO
- See Also:
- Constant Field Values
-
PROP_STATE_INFO
private static final int PROP_STATE_INFO
- See Also:
- Constant Field Values
-
PROP_EXTRACT_MODEL
private static final int PROP_EXTRACT_MODEL
- See Also:
- Constant Field Values
-
PROP_JMOL_STATUS
private static final int PROP_JMOL_STATUS
- See Also:
- Constant Field Values
-
PROP_JMOL_VIEWER
private static final int PROP_JMOL_VIEWER
- See Also:
- Constant Field Values
-
PROP_MESSAGE_QUEUE
private static final int PROP_MESSAGE_QUEUE
- See Also:
- Constant Field Values
-
PROP_AUXILIARY_INFO
private static final int PROP_AUXILIARY_INFO
- See Also:
- Constant Field Values
-
PROP_BOUNDBOX_INFO
private static final int PROP_BOUNDBOX_INFO
- See Also:
- Constant Field Values
-
PROP_DATA_INFO
private static final int PROP_DATA_INFO
- See Also:
- Constant Field Values
-
PROP_IMAGE
private static final int PROP_IMAGE
- See Also:
- Constant Field Values
-
PROP_EVALUATE
private static final int PROP_EVALUATE
- See Also:
- Constant Field Values
-
PROP_MENU
private static final int PROP_MENU
- See Also:
- Constant Field Values
-
PROP_MINIMIZATION_INFO
private static final int PROP_MINIMIZATION_INFO
- See Also:
- Constant Field Values
-
PROP_POINTGROUP_INFO
private static final int PROP_POINTGROUP_INFO
- See Also:
- Constant Field Values
-
PROP_FILE_INFO
private static final int PROP_FILE_INFO
- See Also:
- Constant Field Values
-
PROP_ERROR_MESSAGE
private static final int PROP_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
PROP_MOUSE_INFO
private static final int PROP_MOUSE_INFO
- See Also:
- Constant Field Values
-
PROP_ISOSURFACE_INFO
private static final int PROP_ISOSURFACE_INFO
- See Also:
- Constant Field Values
-
PROP_ISOSURFACE_DATA
private static final int PROP_ISOSURFACE_DATA
- See Also:
- Constant Field Values
-
PROP_CONSOLE_TEXT
private static final int PROP_CONSOLE_TEXT
- See Also:
- Constant Field Values
-
PROP_JSPECVIEW
private static final int PROP_JSPECVIEW
- See Also:
- Constant Field Values
-
PROP_SCRIPT_QUEUE_INFO
private static final int PROP_SCRIPT_QUEUE_INFO
- See Also:
- Constant Field Values
-
PROP_NMR_INFO
private static final int PROP_NMR_INFO
- See Also:
- Constant Field Values
-
PROP_VAR_INFO
private static final int PROP_VAR_INFO
- See Also:
- Constant Field Values
-
PROP_DOM_INFO
private static final int PROP_DOM_INFO
- See Also:
- Constant Field Values
-
PROP_VAL_INFO
private static final int PROP_VAL_INFO
- See Also:
- Constant Field Values
-
PROP_SERVICE
private static final int PROP_SERVICE
- See Also:
- Constant Field Values
-
PROP_CIF_INFO
private static final int PROP_CIF_INFO
- See Also:
- Constant Field Values
-
PROP_MODELKIT_INFO
private static final int PROP_MODELKIT_INFO
- See Also:
- Constant Field Values
-
PROP_COUNT
private static final int PROP_COUNT
- See Also:
- Constant Field Values
-
readableTypes
private static final String[] readableTypes
-
-
Method Detail
-
setViewer
public void setViewer(Viewer vwr)
- Specified by:
setViewerin interfaceJmolPropertyManager
-
getPropertyNumber
public int getPropertyNumber(String infoType)
- Specified by:
getPropertyNumberin interfaceJmolPropertyManager
-
getDefaultPropertyParam
public String getDefaultPropertyParam(int propID)
- Specified by:
getDefaultPropertyParamin interfaceJmolPropertyManager
-
checkPropertyParameter
public boolean checkPropertyParameter(String name)
- Specified by:
checkPropertyParameterin interfaceJmolPropertyManager
-
getProperty
public Object getProperty(String returnType, String infoType, Object paramInfo)
- Specified by:
getPropertyin interfaceJmolPropertyManager
-
extractProperty
public Object extractProperty(Object prop, Object args, int ptr, javajs.util.Lst<Object> v2, boolean isCompiled)
- Specified by:
extractPropertyin interfaceJmolPropertyManager
-
getMapSubset
private static void getMapSubset(Map<String,?> h, String key, Map<String,Object> h2, javajs.util.Lst<Object> v2)
-
checkMap
private String checkMap(Map<String,?> h, String key, boolean isWild, javajs.util.Lst<Object> v2, Object args, int ptr, boolean isCaseSensitive)
-
getPropertyName
private static String getPropertyName(int propID)
-
getParamType
private static String getParamType(int propID)
-
isReadableAsString
private static boolean isReadableAsString(String infoType)
-
getPropertyAsObject
private Object getPropertyAsObject(String infoType, Object paramInfo, String returnType)
-
getModelInfo
public Map<String,Object> getModelInfo(Object atomExpression)
- Specified by:
getModelInfoin interfaceJmolPropertyManager
-
getLigandInfo
public Map<String,Object> getLigandInfo(Object atomExpression)
- Specified by:
getLigandInfoin interfaceJmolPropertyManager
-
getAtomData
public String getAtomData(String atomExpression, String type, boolean allTrajectories)
use lower case to indicate coord data only (xyz, xyzrn, xyzvib, pdb. use USER: or PROPERTY_xxxx for a property all other types return full data- Specified by:
getAtomDatain interfaceJmolPropertyManager
-
getModelExtract
public String getModelExtract(javajs.util.BS bs, boolean doTransform, boolean isModelKit, String type, boolean allTrajectories)
V3000, SDF, MOL, JSON, CD, XYZ, XYZVIB, XYZRN, CML, PDB, PQR, QCJSON MOL67 is MOL with bonds of type 6 or 7 (aromatic single/double)- Specified by:
getModelExtractin interfaceJmolPropertyManager
-
getQCJSON
private String getQCJSON(javajs.util.BS bs)
EXPERIMENTAL create a QCJSON file -- very preliminary- Parameters:
bs- ignored- Returns:
- JSON string
-
getModelCif
private String getModelCif(javajs.util.BS bs)
just a very primitive CIF file reader- Parameters:
bs-- Returns:
- CIf data
-
getCovalentBondsForAtoms
private static javajs.util.BS getCovalentBondsForAtoms(Bond[] bonds, int bondCount, javajs.util.BS bsAtoms)
-
getPointTransf
public static void getPointTransf(int i, ModelSet ms, Atom a, javajs.util.Quat q, javajs.util.P3 pTemp)pick up the appropriate value for this atom- Parameters:
i-ms-a-q-pTemp-
-
getChimeInfo
public String getChimeInfo(int tok, javajs.util.BS bs)
- Specified by:
getChimeInfoin interfaceJmolPropertyManager
-
getModelFileInfo
public String getModelFileInfo(javajs.util.BS frames)
- Specified by:
getModelFileInfoin interfaceJmolPropertyManager
-
getAllChainInfo
public Map<String,javajs.util.Lst<Map<String,Object>>> getAllChainInfo(javajs.util.BS bs)
-
getChainInfo
private javajs.util.Lst<Map<String,javajs.util.Lst<Map<String,Object>>>> getChainInfo(int modelIndex, javajs.util.BS bs)
-
getAllPolymerInfo
private Map<String,javajs.util.Lst<Map<String,Object>>> getAllPolymerInfo(javajs.util.BS bs)
-
getBasePairInfo
private String getBasePairInfo(javajs.util.BS bs)
-
getAtomResidueInfo
private static void getAtomResidueInfo(javajs.util.SB info, Atom atom)
-
getMouseInfo
private Object getMouseInfo()
-
getPdbAtomData
public String getPdbAtomData(javajs.util.BS bs, javajs.util.OC out, boolean isPQR, boolean doTransform, boolean allTrajectories)
PDB or PQR only- Specified by:
getPdbAtomDatain interfaceJmolPropertyManager- Parameters:
bs- selected atomsout- StringXBuilder or BufferedWriter- Returns:
- PDB file data string
-
pdbKey
private String pdbKey(int np)
-
fixPDBFormat
private int fixPDBFormat(javajs.util.Lst<String> lines, Map<String,Integer> map, javajs.util.OC out, int[] firstAtomIndexNew, int modelPt)
must re-order by resno and then renumber atoms and add TER records based on BioPolymers note: 3hbt has a break between residues 39 and 51 with no TER record, but Jmol will put that in.- Parameters:
lines-map-out-modelPt-firstAtomIndexNew-- Returns:
- new modelPt
-
getPdbData
public String getPdbData(int modelIndex, String type, javajs.util.BS bsSelected, Object[] parameters, javajs.util.OC out, boolean addStructure)
- Specified by:
getPdbDatain interfaceJmolPropertyManager
-
getModelCml
public String getModelCml(javajs.util.BS bs, int atomsMax, boolean addBonds, boolean doTransform, boolean allTrajectories)
- Specified by:
getModelCmlin interfaceJmolPropertyManager
-
fixJMEFormalCharges
public String fixJMEFormalCharges(javajs.util.BS bsAtoms, String jme)
Fix a JME string returned from NCI CIR to have the proper formal charges.- Specified by:
fixJMEFormalChargesin interfaceJmolPropertyManager
-
-