public class SmarterJmolAdapter extends JmolAdapter
Modifier and Type | Class and Description |
---|---|
(package private) class |
SmarterJmolAdapter.AtomIterator |
(package private) class |
SmarterJmolAdapter.BondIterator |
class |
SmarterJmolAdapter.StructureIterator |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PATH_KEY
AtomSetCollectionReader.readData() will close any BufferedReader
|
static java.lang.String |
PATH_SEPARATOR |
ORDER_AROMATIC, ORDER_AROMATIC_DOUBLE, ORDER_AROMATIC_SINGLE, ORDER_COVALENT_DOUBLE, ORDER_COVALENT_SINGLE, ORDER_COVALENT_TRIPLE, ORDER_HBOND, ORDER_PARTIAL01, ORDER_PARTIAL12, ORDER_PARTIAL23, ORDER_PARTIAL32, ORDER_STEREO_FAR, ORDER_STEREO_NEAR, ORDER_UNSPECIFIED, SHELL_D_CARTESIAN, SHELL_D_SPHERICAL, SHELL_F_CARTESIAN, SHELL_F_SPHERICAL, SHELL_L, SHELL_P, SHELL_S, SHELL_SP, SUPPORTED_BASIS_FUNCTIONS
Constructor and Description |
---|
SmarterJmolAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
coordinatesAreFractional(java.lang.Object atomSetCollection)
Get the boolean whether coordinates are fractional.
|
void |
finish(java.lang.Object atomSetCollection) |
int |
getAtomCount(java.lang.Object atomSetCollection)
Get the estimated number of atoms contained in the file.
|
JmolAdapter.AtomIterator |
getAtomIterator(java.lang.Object atomSetCollection)
Get an AtomIterator for retrieval of all atoms in the file.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAtomSetAuxiliaryInfo(java.lang.Object atomSetCollection,
int atomSetIndex)
Get the auxiliary information for a particular atomSet.
|
java.lang.Object |
getAtomSetCollection(java.lang.Object atomSetCollectionReader)
Create the AtomSetCollection and return it
|
java.util.Map<java.lang.String,java.lang.Object> |
getAtomSetCollectionAuxiliaryInfo(java.lang.Object atomSetCollection)
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 |
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 atomSetCollection)
Get the name of the atom set collection, if known.
|
java.lang.Object |
getAtomSetCollectionOrBufferedReaderFromZip(java.io.InputStream is,
java.lang.String fileName,
java.lang.String[] zipDirectory,
java.util.Map<java.lang.String,java.lang.Object> htParams,
boolean asBufferedReader,
boolean asBufferedInputStream)
A rather complicated means of reading a ZIP file, which could be a
single file, or it could be a manifest-organized file, or it could be
a Spartan directory.
|
java.lang.Object |
getAtomSetCollectionReader(java.lang.String name,
java.lang.String type,
java.io.BufferedReader bufferedReader,
java.util.Map<java.lang.String,java.lang.Object> htParams)
The primary file or string reader -- returns just the reader now
|
java.lang.Object |
getAtomSetCollectionReaders(JmolFilesReaderInterface fileReader,
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 atomSetCollection)
Get number of atomSets in the file.
|
java.lang.String |
getAtomSetName(java.lang.Object atomSetCollection,
int atomSetIndex)
Get the name of an atomSet.
|
int |
getAtomSetNumber(java.lang.Object atomSetCollection,
int atomSetIndex)
Get the number identifying each atomSet.
|
JmolAdapter.BondIterator |
getBondIterator(java.lang.Object atomSetCollection)
Get a BondIterator for retrieval of all bonds in the file.
|
java.lang.String[][] |
getBondList(java.lang.Object atomSetCollection) |
java.lang.String |
getFileTypeName(java.lang.Object atomSetCollectionOrReader)
Just get the resolved file type; if a file, does NOT close the reader
|
int |
getHydrogenAtomCount(java.lang.Object atomSetCollection)
Get the hydrogen atom count -- for ligand files
|
float[] |
getNotionalUnitcell(java.lang.Object atomSetCollection)
Get the notional unit cell.
|
float[] |
getPdbScaleMatrix(java.lang.Object atomSetCollection)
Get the PDB scale matrix.
|
float[] |
getPdbScaleTranslate(java.lang.Object atomSetCollection)
Get the PDB scale translation vector.
|
JmolAdapter.StructureIterator |
getStructureIterator(java.lang.Object atomSetCollection)
Get a StructureIterator.
|
java.lang.String[] |
specialLoad(java.lang.String name,
java.lang.String type) |
private static java.lang.Object |
staticGetAtomSetCollectionOrBufferedReaderFromZip(java.io.InputStream is,
java.lang.String fileName,
java.lang.String[] zipDirectory,
java.util.Map<java.lang.String,java.lang.Object> htParams,
int subFilePtr,
boolean asBufferedReader,
boolean asBufferedInputStream) |
canonizeAlphaDigit, canonizeAlternateLocationID, canonizeChainID, canonizeInsertionCode, getAdapterName, getAtomSetCollectionFromReader, getBondingRadiusFloat, getElementNumber, getElementSymbol, getNaturalIsotope, getNewDfCoefMap, getQuantumShellTagID, getQuantumShellTagIDSpherical, getShellEnumeration, isHetero, lookupGroupID, openBufferedReader, openBufferedReader, openBufferedReader
public static final java.lang.String PATH_KEY
public static final java.lang.String PATH_SEPARATOR
public java.lang.String getFileTypeName(java.lang.Object atomSetCollectionOrReader)
getFileTypeName
in class JmolAdapter
atomSetCollectionOrReader
- public java.lang.Object getAtomSetCollectionReader(java.lang.String name, java.lang.String type, java.io.BufferedReader bufferedReader, java.util.Map<java.lang.String,java.lang.Object> htParams)
getAtomSetCollectionReader
in class JmolAdapter
name
- type
- bufferedReader
- htParams
- public java.lang.Object getAtomSetCollection(java.lang.Object atomSetCollectionReader)
getAtomSetCollection
in class JmolAdapter
atomSetCollectionReader
- public java.lang.Object getAtomSetCollectionReaders(JmolFilesReaderInterface fileReader, java.lang.String[] names, java.lang.String[] types, java.util.Map<java.lang.String,java.lang.Object> htParams, boolean getReadersOnly)
getAtomSetCollectionReaders
in class JmolAdapter
fileReader
- names
- types
- htParams
- getReadersOnly
- TRUE for a set of readers; FALSE for one atomSetCollectionpublic 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 JmolAdapter
readerSet
- atomsets
- htParams
- public java.lang.Object getAtomSetCollectionOrBufferedReaderFromZip(java.io.InputStream is, java.lang.String fileName, java.lang.String[] zipDirectory, java.util.Map<java.lang.String,java.lang.Object> htParams, boolean asBufferedReader, boolean asBufferedInputStream)
getAtomSetCollectionOrBufferedReaderFromZip
in class JmolAdapter
is
- fileName
- zipDirectory
- htParams
- asBufferedReader
- private static java.lang.Object staticGetAtomSetCollectionOrBufferedReaderFromZip(java.io.InputStream is, java.lang.String fileName, java.lang.String[] zipDirectory, java.util.Map<java.lang.String,java.lang.Object> htParams, int subFilePtr, boolean asBufferedReader, boolean asBufferedInputStream)
public java.lang.Object getAtomSetCollectionFromDOM(java.lang.Object DOMNode, java.util.Map<java.lang.String,java.lang.Object> htParams)
getAtomSetCollectionFromDOM
in class JmolAdapter
DOMNode
- htParams
- public java.lang.String[] specialLoad(java.lang.String name, java.lang.String type)
specialLoad
in class JmolAdapter
public void finish(java.lang.Object atomSetCollection)
finish
in class JmolAdapter
public java.lang.String getAtomSetCollectionName(java.lang.Object atomSetCollection)
JmolAdapter
Some 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 JmolAdapter
null
public java.util.Map<java.lang.String,java.lang.Object> getAtomSetCollectionAuxiliaryInfo(java.lang.Object atomSetCollection)
JmolAdapter
Via the smarterJmolAdapter
getAtomSetCollectionAuxiliaryInfo
in class JmolAdapter
atomSetCollection
- The client filenull
public int getAtomSetCount(java.lang.Object atomSetCollection)
JmolAdapter
NOTE WARNING:
Not yet implemented everywhere, it is in the smarterJmolAdapter
getAtomSetCount
in class JmolAdapter
atomSetCollection
- The client filepublic int getAtomSetNumber(java.lang.Object atomSetCollection, int atomSetIndex)
JmolAdapter
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
getAtomSetNumber
in class JmolAdapter
atomSetCollection
- The client fileatomSetIndex
- The atom set's index for which to get
the atom set numberpublic java.lang.String getAtomSetName(java.lang.Object atomSetCollection, int atomSetIndex)
JmolAdapter
getAtomSetName
in class JmolAdapter
atomSetCollection
- The client fileatomSetIndex
- The atom set indexpublic java.util.Map<java.lang.String,java.lang.Object> getAtomSetAuxiliaryInfo(java.lang.Object atomSetCollection, int atomSetIndex)
JmolAdapter
Via the smarterJmolAdapter
getAtomSetAuxiliaryInfo
in class JmolAdapter
atomSetCollection
- The client fileatomSetIndex
- The atom set indexnull
public int getHydrogenAtomCount(java.lang.Object atomSetCollection)
JmolAdapter
getHydrogenAtomCount
in class JmolAdapter
public java.lang.String[][] getBondList(java.lang.Object atomSetCollection)
getBondList
in class JmolAdapter
public int getAtomCount(java.lang.Object atomSetCollection)
JmolAdapter
Just return -1 if you don't know (or don't want to figure it out)
getAtomCount
in class JmolAdapter
atomSetCollection
- The client filepublic boolean coordinatesAreFractional(java.lang.Object atomSetCollection)
JmolAdapter
coordinatesAreFractional
in class JmolAdapter
atomSetCollection
- The client filefalse
public float[] getNotionalUnitcell(java.lang.Object atomSetCollection)
JmolAdapter
This method returns the parameters that define a crystal unitcell
the parameters are returned in a float[] in the following order
a, b, c, alpha, beta, gamma
a, b, c
: angstroms
alpha, beta, gamma
: degrees
if there is no unit cell data then return null
getNotionalUnitcell
in class JmolAdapter
atomSetCollection
- The client filenull
public float[] getPdbScaleMatrix(java.lang.Object atomSetCollection)
JmolAdapter
Does not seem to be overriden by any descendent
getPdbScaleMatrix
in class JmolAdapter
atomSetCollection
- The client filenull
public float[] getPdbScaleTranslate(java.lang.Object atomSetCollection)
JmolAdapter
Does not seem to be overriden by any descendent
getPdbScaleTranslate
in class JmolAdapter
atomSetCollection
- The client filenull
public JmolAdapter.AtomIterator getAtomIterator(java.lang.Object atomSetCollection)
JmolAdapter
This method may not return null
.
getAtomIterator
in class JmolAdapter
atomSetCollection
- The client fileJmolAdapter.AtomIterator
public JmolAdapter.BondIterator getBondIterator(java.lang.Object atomSetCollection)
JmolAdapter
If 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 JmolAdapter
atomSetCollection
- The client filenull
JmolAdapter.BondIterator
public JmolAdapter.StructureIterator getStructureIterator(java.lang.Object atomSetCollection)
JmolAdapter
getStructureIterator
in class JmolAdapter
atomSetCollection
- The client filenull