|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmol.api.JmolAdapter org.jmol.adapter.smarter.SmarterJmolAdapter
public class SmarterJmolAdapter
Nested Class Summary | |
---|---|
class |
SmarterJmolAdapter.StructureIterator
|
Nested classes/interfaces inherited from class org.jmol.api.JmolAdapter |
---|
JmolAdapter.Logger |
Field Summary | |
---|---|
static java.lang.String |
PATH_KEY
|
static java.lang.String |
PATH_SEPARATOR
|
Fields inherited from class org.jmol.api.JmolAdapter |
---|
logger, ORDER_AROMATIC, ORDER_COVALENT_DOUBLE, ORDER_COVALENT_SINGLE, ORDER_COVALENT_TRIPLE, ORDER_HBOND, ORDER_PARTIAL01, ORDER_PARTIAL12, ORDER_STEREO_FAR, ORDER_STEREO_NEAR |
Constructor Summary | |
---|---|
SmarterJmolAdapter(JmolAdapter.Logger logger)
|
Method Summary | |
---|---|
boolean |
coordinatesAreFractional(java.lang.Object clientFile)
Get the boolean whether coordinates are fractional. |
void |
finish(java.lang.Object clientFile)
|
JmolAdapter.AtomIterator |
getAtomIterator(java.lang.Object clientFile)
Get an AtomIterator for retrieval of all atoms in the file. |
java.lang.String |
getAtomSetCollectionName(java.lang.Object clientFile)
Get the name of the atom set collection, if known. |
java.util.Properties |
getAtomSetCollectionProperties(java.lang.Object clientFile)
Get the properties for this atomSetCollection. |
int |
getAtomSetCount(java.lang.Object clientFile)
Get number of atomSets in the file. |
java.lang.String |
getAtomSetName(java.lang.Object clientFile,
int atomSetIndex)
Get the name of an atomSet. |
int |
getAtomSetNumber(java.lang.Object clientFile,
int atomSetIndex)
Get the number identifying each atomSet. |
java.util.Properties |
getAtomSetProperties(java.lang.Object clientFile,
int atomSetIndex)
Get the properties for an atomSet. |
JmolAdapter.BondIterator |
getBondIterator(java.lang.Object clientFile)
Get a BondIterator for retrieval of all bonds in the file. |
int |
getEstimatedAtomCount(java.lang.Object clientFile)
Get the estimated number of atoms contained in the file. |
java.lang.String |
getFileTypeName(java.lang.Object clientFile)
Get the type of this file or molecular model, if known. |
float[] |
getNotionalUnitcell(java.lang.Object clientFile)
Get the notional unit cell. |
float[] |
getPdbScaleMatrix(java.lang.Object clientFile)
Get the PDB scale matrix. |
float[] |
getPdbScaleTranslate(java.lang.Object clientFile)
Get the PDB scale translation vector. |
JmolAdapter.StructureIterator |
getStructureIterator(java.lang.Object clientFile)
Get a StructureIterator. |
java.lang.Object |
openBufferedReader(java.lang.String name,
java.io.BufferedReader bufferedReader)
Associate a clientFile object with a bufferedReader. |
java.lang.Object |
openBufferedReaders(java.lang.String[] name,
java.io.BufferedReader[] bufferedReader)
Associate a clientFile object with an array of BufferedReader. |
java.lang.Object |
openDOMReader(java.lang.Object DOMNode)
|
Methods inherited from class org.jmol.api.JmolAdapter |
---|
canonizeAlphaDigit, canonizeAlternateLocationID, canonizeChainID, canonizeInsertionCode, getClientAtomStringProperty, openBufferedReader, openBufferedReaders, openDOMReader |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PATH_KEY
public static final java.lang.String PATH_SEPARATOR
Constructor Detail |
---|
public SmarterJmolAdapter(JmolAdapter.Logger logger)
Method Detail |
---|
public void finish(java.lang.Object clientFile)
finish
in class JmolAdapter
public java.lang.Object openBufferedReader(java.lang.String name, java.io.BufferedReader bufferedReader)
JmolAdapter
Given 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 clientFile
.
This clientFile
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.
openBufferedReader
in class JmolAdapter
name
- File name, String or URL acting as the source of the readerbufferedReader
- The BufferedReader
public java.lang.Object openBufferedReaders(java.lang.String[] name, java.io.BufferedReader[] bufferedReader)
JmolAdapter
Given the array of BufferedReader, return an object which represents
the concatenation of every file contents. The parameter name
is 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 the name
parameter.
The return value is an object which represents a clientFile
.
This clientFile
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.
openBufferedReaders
in class JmolAdapter
name
- File names, String or URL acting as the source of each readerbufferedReader
- The array of BufferedReader
public java.lang.Object openDOMReader(java.lang.Object DOMNode)
openDOMReader
in class JmolAdapter
public java.lang.String getFileTypeName(java.lang.Object clientFile)
JmolAdapter
getFileTypeName
in class JmolAdapter
clientFile
- The client file
"unknown"
public java.lang.String getAtomSetCollectionName(java.lang.Object clientFile)
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.Properties getAtomSetCollectionProperties(java.lang.Object clientFile)
JmolAdapter
Not yet implemented everywhere, it is in the smarterJmolAdapter
getAtomSetCollectionProperties
in class JmolAdapter
clientFile
- The client file
null
public int getAtomSetCount(java.lang.Object clientFile)
JmolAdapter
NOTE WARNING:
Not yet implemented everywhere, it is in the smarterJmolAdapter
getAtomSetCount
in class JmolAdapter
clientFile
- The client file
public int getAtomSetNumber(java.lang.Object clientFile, 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
clientFile
- The client fileatomSetIndex
- The atom set's index for which to get
the atom set number
public java.lang.String getAtomSetName(java.lang.Object clientFile, int atomSetIndex)
JmolAdapter
getAtomSetName
in class JmolAdapter
clientFile
- The client fileatomSetIndex
- The atom set index
public java.util.Properties getAtomSetProperties(java.lang.Object clientFile, int atomSetIndex)
JmolAdapter
getAtomSetProperties
in class JmolAdapter
clientFile
- The client fileatomSetIndex
- The atom set index
null
public int getEstimatedAtomCount(java.lang.Object clientFile)
JmolAdapter
Just return -1 if you don't know (or don't want to figure it out)
getEstimatedAtomCount
in class JmolAdapter
clientFile
- The client file
public boolean coordinatesAreFractional(java.lang.Object clientFile)
JmolAdapter
coordinatesAreFractional
in class JmolAdapter
clientFile
- The client file
false
public float[] getNotionalUnitcell(java.lang.Object clientFile)
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
clientFile
- The client file
null
public float[] getPdbScaleMatrix(java.lang.Object clientFile)
JmolAdapter
Does not seem to be overriden by any descendent
getPdbScaleMatrix
in class JmolAdapter
clientFile
- The client file
null
public float[] getPdbScaleTranslate(java.lang.Object clientFile)
JmolAdapter
Does not seem to be overriden by any descendent
getPdbScaleTranslate
in class JmolAdapter
clientFile
- The client file
null
public JmolAdapter.AtomIterator getAtomIterator(java.lang.Object clientFile)
JmolAdapter
This method may not return null
.
getAtomIterator
in class JmolAdapter
clientFile
- The client file
JmolAdapter.AtomIterator
public JmolAdapter.BondIterator getBondIterator(java.lang.Object clientFile)
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
clientFile
- The client file
null
JmolAdapter.BondIterator
public JmolAdapter.StructureIterator getStructureIterator(java.lang.Object clientFile)
JmolAdapter
getStructureIterator
in class JmolAdapter
clientFile
- The client file
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |