Class JmolAdapter
- Direct Known Subclasses:
SmarterJmolAdapter
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]///////////////////////////////////////////////////////////////static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final charcanonizeAlternateLocationID(char altLoc) static final charcanonizeInsertionCode(char insertionCode) abstract booleancoordinatesAreFractional(Object atomSetCollection) Get the boolean whether coordinates are fractional.abstract voidabstract intgetAtomCount(Object atomSetCollection, int atomSetIndex) Get the number of atoms contained in the file.abstract JmolAdapterAtomIteratorgetAtomIterator(Object atomSetCollection) Get an AtomIterator for retrieval of all atoms in the file.getAtomSetAuxiliaryInfo(Object atomSetCollection, int atomSetIndex) Get the auxiliary information for a particular atomSet.abstract ObjectgetAtomSetCollection(Object atomSetCollectionReader) getAtomSetCollectionAuxiliaryInfo(Object atomSetCollection) Get the auxiliary information for this atomSetCollection.abstract ObjectgetAtomSetCollectionFromDOM(Object DOMNode, Map<String, Object> htParams) abstract ObjectgetAtomSetCollectionFromReaderType(String name, String type, Object bufferedReader, Map<String, Object> htParams) all in one -- for TestSmarterJmolAdapterabstract Objectabstract ObjectgetAtomSetCollectionInline(Object molData, Map<String, Object> htParams) abstract StringgetAtomSetCollectionName(Object atomSetCollection) Get the name of the atom set collection, if known.abstract ObjectgetAtomSetCollectionReader(String name, String type, Object bufferedReader, Map<String, Object> htParams) Read an atomSetCollection object from a bufferedReader and close the reader.abstract ObjectgetAtomSetCollectionReaders(JmolFilesReaderInterface fileReader, String[] names, String[] types, Map<String, Object> htParams, boolean getReadersOnly) Associate an atomSetCollection object with an array of BufferedReader.abstract intgetAtomSetCount(Object atomSetCollection) Get number of atomSets in the file or specific model index in fileabstract StringgetAtomSetName(Object atomSetCollection, int atomSetIndex) Get the name of an atomSet.abstract intgetAtomSetNumber(Object atomSetCollection, int atomSetIndex) Get the number identifying each atomSet.static floatgetBondingRadius(int atomicNumberWithIsotope, int charge) abstract JmolAdapterBondIteratorgetBondIterator(Object atomSetCollection) Get a BondIterator for retrieval of all bonds in the file.abstract String[][]getBondList(Object atomSetCollection) static intgetElementNumber(String elementSymbol) static StringgetElementSymbol(int elementNumber) abstract StringgetFileTypeName(Object atomSetCollection) Get the type of this file or molecular model, if known.abstract intgetHydrogenAtomCount(Object atomSetCollection) Get the hydrogen atom count -- for ligand filesstatic intgetNaturalIsotope(int elementNumber) abstract JmolAdapterStructureIteratorgetStructureIterator(Object atomSetCollection) Get a StructureIterator.openBufferedReader(String name, BufferedReader bufferedReader) openBufferedReader(String name, BufferedReader bufferedReader, Map<String, Object> htParams) openBufferedReader(String name, String type, BufferedReader bufferedReader)
-
Field Details
-
ORDER_COVALENT_SINGLE
public static final int ORDER_COVALENT_SINGLE- See Also:
-
ORDER_COVALENT_DOUBLE
public static final int ORDER_COVALENT_DOUBLE- See Also:
-
ORDER_COVALENT_TRIPLE
public static final int ORDER_COVALENT_TRIPLE- See Also:
-
ORDER_COVALENT_QUAD
public static final int ORDER_COVALENT_QUAD- See Also:
-
ORDER_COVALENT_QUINT
public static final int ORDER_COVALENT_QUINT- See Also:
-
ORDER_COVALENT_HEX
public static final int ORDER_COVALENT_HEX- See Also:
-
ORDER_AROMATIC
public static final int ORDER_AROMATIC- See Also:
-
ORDER_AROMATIC_SINGLE
public static final int ORDER_AROMATIC_SINGLE- See Also:
-
ORDER_AROMATIC_DOUBLE
public static final int ORDER_AROMATIC_DOUBLE- See Also:
-
ORDER_HBOND
public static final int ORDER_HBOND- See Also:
-
ORDER_STEREO_NEAR
public static final int ORDER_STEREO_NEAR- See Also:
-
ORDER_STEREO_FAR
public static final int ORDER_STEREO_FAR- See Also:
-
ORDER_STEREO_EITHER
public static final int ORDER_STEREO_EITHER- See Also:
-
ORDER_PARTIAL01
public static final int ORDER_PARTIAL01- See Also:
-
ORDER_PARTIAL12
public static final int ORDER_PARTIAL12- See Also:
-
ORDER_PARTIAL23
public static final int ORDER_PARTIAL23- See Also:
-
ORDER_PARTIAL32
public static final int ORDER_PARTIAL32- See Also:
-
ORDER_UNSPECIFIED
public static final int ORDER_UNSPECIFIED- See Also:
-
ORDER_PYMOL_SINGLE
public static final int ORDER_PYMOL_SINGLE- See Also:
-
ORDER_PYMOL_MULT
public static final int ORDER_PYMOL_MULT- See Also:
-
cellParamNames
///////////////////////////////////////////////////////////////
-
-
Constructor Details
-
JmolAdapter
public JmolAdapter()
-
-
Method Details
-
getElementSymbol
-
getElementNumber
-
getNaturalIsotope
public static int getNaturalIsotope(int elementNumber) -
getBondingRadius
public static float getBondingRadius(int atomicNumberWithIsotope, int charge) -
getAtomSetCollectionReader
public abstract Object getAtomSetCollectionReader(String name, String type, Object bufferedReader, Map<String, Object> htParams) Read an atomSetCollection object from a bufferedReader and close the reader.Given the BufferedReader, return an object which represents the file contents. The parameter
nameis assumed to be the file name or URL which is the source of reader. Note that this 'file' may have been automatically decompressed. Also note that the name may be 'String', representing a string constant. Therefore, few assumptions should be made about thenameparameter. The return value is an object which represents aatomSetCollection. ThisatomSetCollectionwill be passed back in to other methods. If the return value isinstanceof Stringthen it is considered an error condition and the returned String is the error message.- Parameters:
name- File name, String or URL acting as the source of the readertype- File type, if known, or nullbufferedReader- The BufferedReaderhtParams- a hash table containing parameter information- Returns:
- The atomSetCollection or String with an error message
-
getAtomSetCollection
-
getAtomSetCollectionReaders
public abstract Object getAtomSetCollectionReaders(JmolFilesReaderInterface fileReader, String[] names, String[] types, Map<String, Object> htParams, boolean getReadersOnly) Associate an atomSetCollection object with an array of BufferedReader.Given the array of BufferedReader, return an object which represents the concatenation of every file contents. The parameter
nameis assumed to be the file names or URL which are the source of each reader. Note that each of this 'file' may have been automatically decompressed. Also note that the name may be 'String', representing a string constant. Therefore, few assumptions should be made about thenameparameter. The return value is an object which represents aatomSetCollection. ThisatomSetCollectionwill be passed back in to other methods. If the return value isinstanceof Stringthen it is considered an error condition and the returned String is the error message.- Parameters:
fileReader- the thread requesting a set of files if bufferedReaders is nullnames- File names, String or URL acting as the source of each readertypes- File types, if known, or nullhtParams- The input parameters for each file to loadgetReadersOnly-- Returns:
- The atomSetCollection or String with an error message
-
getAtomSetCollectionFromSet
-
getAtomSetCollectionFromReader
-
getAtomSetCollectionInline
-
getAtomSetCollectionFromReaderType
-
openBufferedReader
-
openBufferedReader
-
openBufferedReader
-
getAtomSetCollectionFromDOM
-
finish
- Parameters:
atomSetCollection-
-
getFileTypeName
-
getAtomSetCollectionName
Get the name of the atom set collection, if known.Some file formats contain a formal name of the molecule in the file. If this method returns
nullthen the JmolViewer will automatically supply the file/URL name as a default.- Parameters:
atomSetCollection-- Returns:
- The atom set collection name or
null
-
getAtomSetCollectionAuxiliaryInfo
Get the auxiliary information for this atomSetCollection.Via the smarterJmolAdapter
- Parameters:
atomSetCollection- The client file- Returns:
- The auxiliaryInfo Hashtable that may be available for particular
filetypes for this atomSetCollection or
null
-
getAtomSetCount
Get number of atomSets in the file or specific model index in fileNOTE WARNING:
Not yet implemented everywhere, it is in the smarterJmolAdapter- Parameters:
atomSetCollection- The client file- Returns:
- The number of atomSets in the file
-
getAtomSetNumber
Get the number identifying each atomSet.For a PDB file, this is is the model number. For others it is a 1-based atomSet number.
Note that this is not currently implemented in PdbReader
- Parameters:
atomSetCollection- The client fileatomSetIndex- The atom set's index for which to get the atom set number- Returns:
- The number identifying each atom set.
-
getAtomSetName
-
getAtomSetAuxiliaryInfo
public abstract Map<String,Object> getAtomSetAuxiliaryInfo(Object atomSetCollection, int atomSetIndex) Get the auxiliary information for a particular atomSet.Via the smarterJmolAdapter
- Parameters:
atomSetCollection- The client fileatomSetIndex- The atom set index- Returns:
- The auxiliaryInfo Hashtable that may be available for particular
filetypes for this atomSet or
null
-
getAtomCount
Get the number of atoms contained in the file.- Parameters:
atomSetCollection- The client fileatomSetIndex- if -1, then count for the whole collection, else for this set- Returns:
- The estimated number of atoms in the file
-
getHydrogenAtomCount
Get the hydrogen atom count -- for ligand files- Parameters:
atomSetCollection-- Returns:
- number of hydrogen atoms in this model
-
getBondList
-
coordinatesAreFractional
Get the boolean whether coordinates are fractional.- Parameters:
atomSetCollection- The client file- Returns:
- true if the coordinates are fractional, default
false
-
getAtomIterator
Get an AtomIterator for retrieval of all atoms in the file.This method may not return
null.- Parameters:
atomSetCollection- The client file- Returns:
- An AtomIterator
- See Also:
-
getBondIterator
Get a BondIterator for retrieval of all bonds in the file.If this method returns
nulland no bonds are defined then the JmolViewer will automatically apply its rebonding code to build bonds between atoms.- Parameters:
atomSetCollection- The client file- Returns:
- A BondIterator or
null - See Also:
-
getStructureIterator
Get a StructureIterator.- Parameters:
atomSetCollection- The client file- Returns:
- A StructureIterator or
null
-
canonizeInsertionCode
public static final char canonizeInsertionCode(char insertionCode) -
canonizeAlternateLocationID
public static final char canonizeAlternateLocationID(char altLoc)
-