public class SmarterJmolAdapter extends JmolAdapter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PATH_KEY
AtomSetCollectionReader.readData() will close any BufferedReader
|
static java.lang.String |
PATH_SEPARATOR |
cellParamNames, ORDER_AROMATIC, ORDER_AROMATIC_DOUBLE, ORDER_AROMATIC_SINGLE, ORDER_COVALENT_DOUBLE, ORDER_COVALENT_HEX, ORDER_COVALENT_QUAD, ORDER_COVALENT_QUINT, ORDER_COVALENT_SINGLE, ORDER_COVALENT_TRIPLE, ORDER_HBOND, ORDER_PARTIAL01, ORDER_PARTIAL12, ORDER_PARTIAL23, ORDER_PARTIAL32, ORDER_PYMOL_MULT, ORDER_PYMOL_SINGLE, ORDER_STEREO_FAR, ORDER_STEREO_NEAR, ORDER_UNSPECIFIED| Constructor and Description |
|---|
SmarterJmolAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(java.lang.Object bufferedReader) |
boolean |
coordinatesAreFractional(java.lang.Object asc)
Get the boolean whether coordinates are fractional.
|
void |
finish(java.lang.Object asc) |
int |
getAtomCount(java.lang.Object asc)
Get the estimated number of atoms contained in the file.
|
JmolAdapterAtomIterator |
getAtomIterator(java.lang.Object asc)
Get an AtomIterator for retrieval of all atoms in the file.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAtomSetAuxiliaryInfo(java.lang.Object asc,
int atomSetIndex)
Get the auxiliary information for a particular atomSet.
|
java.lang.Object |
getAtomSetCollection(java.lang.Object ascReader)
Create the AtomSetCollection and return it
|
java.util.Map<java.lang.String,java.lang.Object> |
getAtomSetCollectionAuxiliaryInfo(java.lang.Object asc)
Get the auxiliary information for this atomSetCollection.
|
java.lang.Object |
getAtomSetCollectionFromDOM(java.lang.Object DOMNode,
java.util.Map<java.lang.String,java.lang.Object> htParams)
Direct DOM HTML4 page reading; Egon was interested in this at one point.
|
java.lang.Object |
getAtomSetCollectionFromReader(java.lang.String fname,
java.lang.Object readerOrDocument,
java.util.Map<java.lang.String,java.lang.Object> htParams) |
java.lang.Object |
getAtomSetCollectionFromSet(java.lang.Object readerSet,
java.lang.Object atomsets,
java.util.Map<java.lang.String,java.lang.Object> htParams)
needed to consolidate a set of models into one model; could start
with AtomSetCollectionReader[] or with AtomSetCollection[]
|
java.lang.String |
getAtomSetCollectionName(java.lang.Object asc)
Get the name of the atom set collection, if known.
|
java.lang.Object |
getAtomSetCollectionReader(java.lang.String name,
java.lang.String type,
java.lang.Object bufferedReader,
java.util.Map<java.lang.String,java.lang.Object> htParams)
Read an atomSetCollection object from a bufferedReader and close the reader.
|
java.lang.Object |
getAtomSetCollectionReaders(JmolFilesReaderInterface filesReader,
java.lang.String[] names,
java.lang.String[] types,
java.util.Map<java.lang.String,java.lang.Object> htParams,
boolean getReadersOnly)
primary for String[] or File[] reading -- two options are implemented ---
return a set of simultaneously open readers, or return one single
collection using a single reader
|
int |
getAtomSetCount(java.lang.Object asc)
Get number of atomSets in the file.
|
java.lang.String |
getAtomSetName(java.lang.Object asc,
int atomSetIndex)
Get the name of an atomSet.
|
int |
getAtomSetNumber(java.lang.Object asc,
int atomSetIndex)
Get the number identifying each atomSet.
|
JmolAdapterBondIterator |
getBondIterator(java.lang.Object asc)
Get a BondIterator for retrieval of all bonds in the file.
|
java.lang.String[][] |
getBondList(java.lang.Object asc) |
java.lang.String |
getFileTypeName(java.lang.Object ascOrReader)
Just get the resolved file type; if a file, does NOT close the reader
|
int |
getHydrogenAtomCount(java.lang.Object asc)
Get the hydrogen atom count -- for ligand files
|
JmolAdapterStructureIterator |
getStructureIterator(java.lang.Object asc)
Get a StructureIterator.
|
static java.lang.Object |
staticGetAtomSetCollection(AtomSetCollectionReader a) |
static java.lang.Object |
staticGetAtomSetCollectionReader(java.lang.String name,
java.lang.String type,
java.lang.Object bufferedReader,
java.util.Map<java.lang.String,java.lang.Object> htParams)
The primary file or string reader -- returns just the reader now
|
canonizeAlternateLocationID, canonizeInsertionCode, getAtomSetCollectionFromReaderType, getBondingRadius, getElementNumber, getElementSymbol, getNaturalIsotope, openBufferedReader, openBufferedReader, openBufferedReaderpublic static final java.lang.String PATH_KEY
public static final java.lang.String PATH_SEPARATOR
public java.lang.String getFileTypeName(java.lang.Object ascOrReader)
getFileTypeName in class JmolAdapterascOrReader - public java.lang.Object getAtomSetCollectionReader(java.lang.String name,
java.lang.String type,
java.lang.Object bufferedReader,
java.util.Map<java.lang.String,java.lang.Object> htParams)
JmolAdapterGiven the BufferedReader, return an object which represents the file
contents. The parameter name is 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 the name parameter.
The return value is an object which represents a atomSetCollection.
This atomSetCollection will be passed back in to other methods.
If the return value is instanceof String then it is
considered an error condition and the returned String is the error
message.
getAtomSetCollectionReader in class JmolAdaptername - 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 informationpublic static java.lang.Object staticGetAtomSetCollectionReader(java.lang.String name,
java.lang.String type,
java.lang.Object bufferedReader,
java.util.Map<java.lang.String,java.lang.Object> htParams)
name - type - bufferedReader - htParams - public java.lang.Object getAtomSetCollectionFromReader(java.lang.String fname,
java.lang.Object readerOrDocument,
java.util.Map<java.lang.String,java.lang.Object> htParams)
throws java.lang.Exception
getAtomSetCollectionFromReader in class JmolAdapterjava.lang.Exceptionpublic java.lang.Object getAtomSetCollection(java.lang.Object ascReader)
getAtomSetCollection in class JmolAdapterascReader - public static java.lang.Object staticGetAtomSetCollection(AtomSetCollectionReader a)
public java.lang.Object getAtomSetCollectionReaders(JmolFilesReaderInterface filesReader, java.lang.String[] names, java.lang.String[] types, java.util.Map<java.lang.String,java.lang.Object> htParams, boolean getReadersOnly)
getAtomSetCollectionReaders in class JmolAdapterfilesReader - names - types - htParams - getReadersOnly - TRUE for a set of readers; FALSE for one ascpublic java.lang.Object getAtomSetCollectionFromSet(java.lang.Object readerSet,
java.lang.Object atomsets,
java.util.Map<java.lang.String,java.lang.Object> htParams)
getAtomSetCollectionFromSet in class JmolAdapterreaderSet - atomsets - htParams - public java.lang.Object getAtomSetCollectionFromDOM(java.lang.Object DOMNode,
java.util.Map<java.lang.String,java.lang.Object> htParams)
getAtomSetCollectionFromDOM in class JmolAdapterDOMNode - htParams - public void finish(java.lang.Object asc)
finish in class JmolAdapterpublic java.lang.String getAtomSetCollectionName(java.lang.Object asc)
JmolAdapterSome file formats contain a formal name of the molecule in the file.
If this method returns null then the JmolViewer will
automatically supply the file/URL name as a default.
getAtomSetCollectionName in class JmolAdapternullpublic java.util.Map<java.lang.String,java.lang.Object> getAtomSetCollectionAuxiliaryInfo(java.lang.Object asc)
JmolAdapterVia the smarterJmolAdapter
getAtomSetCollectionAuxiliaryInfo in class JmolAdapterasc - The client filenullpublic int getAtomSetCount(java.lang.Object asc)
JmolAdapterNOTE WARNING:
Not yet implemented everywhere, it is in the smarterJmolAdapter
getAtomSetCount in class JmolAdapterasc - The client filepublic int getAtomSetNumber(java.lang.Object asc,
int atomSetIndex)
JmolAdapterFor 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
getAtomSetNumber in class JmolAdapterasc - The client fileatomSetIndex - The atom set's index for which to get
the atom set numberpublic java.lang.String getAtomSetName(java.lang.Object asc,
int atomSetIndex)
JmolAdaptergetAtomSetName in class JmolAdapterasc - The client fileatomSetIndex - The atom set indexpublic java.util.Map<java.lang.String,java.lang.Object> getAtomSetAuxiliaryInfo(java.lang.Object asc,
int atomSetIndex)
JmolAdapterVia the smarterJmolAdapter
getAtomSetAuxiliaryInfo in class JmolAdapterasc - The client fileatomSetIndex - The atom set indexnullpublic int getHydrogenAtomCount(java.lang.Object asc)
JmolAdaptergetHydrogenAtomCount in class JmolAdapterpublic java.lang.String[][] getBondList(java.lang.Object asc)
getBondList in class JmolAdapterpublic int getAtomCount(java.lang.Object asc)
JmolAdapterJust return -1 if you don't know (or don't want to figure it out)
getAtomCount in class JmolAdapterasc - The client filepublic boolean coordinatesAreFractional(java.lang.Object asc)
JmolAdaptercoordinatesAreFractional in class JmolAdapterasc - The client filefalsepublic JmolAdapterAtomIterator getAtomIterator(java.lang.Object asc)
JmolAdapterThis method may not return null.
getAtomIterator in class JmolAdapterasc - The client fileJmolAdapterAtomIteratorpublic JmolAdapterBondIterator getBondIterator(java.lang.Object asc)
JmolAdapterIf this method returns null and no
bonds are defined then the JmolViewer will automatically apply its
rebonding code to build bonds between atoms.
getBondIterator in class JmolAdapterasc - The client filenullJmolAdapterBondIteratorpublic JmolAdapterStructureIterator getStructureIterator(java.lang.Object asc)
JmolAdaptergetStructureIterator in class JmolAdapterasc - The client filenullpublic static void close(java.lang.Object bufferedReader)
throws java.io.IOException
java.io.IOException