|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmol.adapter.smarter.AtomSetCollectionReader
public abstract class AtomSetCollectionReader
Field Summary | |
---|---|
protected boolean |
addVibrations
|
static float |
ANGSTROMS_PER_BOHR
|
boolean |
applySymmetryToBonds
|
AtomSetCollection |
atomSetCollection
|
protected java.util.BitSet |
bsFilter
|
protected java.util.BitSet |
bsModels
|
java.lang.String |
calculationType
|
boolean |
continuing
|
protected int |
desiredModelNumber
|
private int |
desiredSpaceGroupIndex
|
int |
desiredVibrationNumber
|
protected boolean |
doApplySymmetry
|
protected BinaryDocument |
doc
|
protected boolean |
doCheckUnitCell
|
private boolean |
doConvertToFractional
|
protected boolean |
doPackUnitCell
|
boolean |
doProcessLines
|
private boolean |
doSetOrientation
|
private boolean |
fileCoordinatesAreFractional
|
(package private) java.lang.String |
fileName
|
private javax.vecmath.Point3f |
fileOffset
|
private javax.vecmath.Point3f |
fileOffsetFractional
|
private javax.vecmath.Point3f |
fileScaling
|
protected java.lang.String |
filter
|
private java.lang.String |
filter1
|
private java.lang.String |
filter2
|
private boolean |
filterAltLoc
|
private boolean |
filterAtomType
|
private boolean |
filterChain
|
private boolean |
filterElement
|
private boolean |
filterEveryNth
|
private boolean |
filterGroup3
|
protected boolean |
filterHetero
|
private int |
filterN
|
private int[] |
firstLastStep
|
protected boolean |
getHeader
|
private boolean |
haveAtomFilter
|
boolean |
haveModel
|
protected boolean |
havePartialChargeFilter
|
java.util.Map<java.lang.String,java.lang.Object> |
htParams
|
protected boolean |
ignoreFileSpaceGroupName
|
protected boolean |
ignoreFileSymmetryOperators
|
protected boolean |
ignoreFileUnitCell
|
protected boolean |
iHaveFractionalCoordinates
|
boolean |
iHaveSymmetryOperators
|
boolean |
iHaveUnitCell
|
boolean |
isBinary
|
protected boolean |
isSequential
|
protected boolean |
isTrajectory
|
private int |
lastModelNumber
|
int[] |
latticeCells
|
java.lang.String |
line
|
private java.lang.StringBuffer |
loadNote
|
private javax.vecmath.Matrix3f |
matrixRotate
|
protected javax.vecmath.Matrix3f |
matUnitCellOrientation
|
private boolean |
merging
|
int |
modelNumber
|
protected int[] |
next
|
private int |
nFiltered
|
private int |
nMatrixElements
|
protected float[] |
notionalUnitCell
|
protected java.io.OutputStream |
os
|
private java.lang.String |
previousScript
|
private java.lang.String |
previousSpaceGroup
|
private float[] |
previousUnitCell
|
java.lang.String |
prevline
|
protected long |
ptLine
|
protected java.io.BufferedReader |
reader
|
protected java.lang.String |
readerName
|
boolean |
readMolecularOrbitals
|
private java.lang.String |
siteScript
|
protected java.lang.String |
spaceGroup
|
protected int |
stateScriptVersionInt
|
protected java.lang.String |
supercell
|
protected SymmetryInterface |
symmetry
|
private float |
symmetryRange
|
protected int |
templateAtomCount
|
private javax.vecmath.Point3f |
unitCellOffset
|
private boolean |
unitCellOffsetFractional
|
protected boolean |
useAltNames
|
protected int |
vibrationNumber
|
protected JmolViewer |
viewer
|
Constructor Summary | |
---|---|
AtomSetCollectionReader()
|
Method Summary | |
---|---|
protected void |
addJmolScript(java.lang.String script)
|
void |
addPrimitiveLatticeVector(int i,
float[] xyz,
int i0)
|
protected void |
addSites(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> htSites)
|
protected void |
addSiteScript(java.lang.String script)
|
protected void |
appendLoadNote(java.lang.String info)
|
void |
applySymmetryAndSetTrajectory()
|
private boolean |
checkFilter(Atom atom,
java.lang.String f)
|
boolean |
checkFilter(java.lang.String key)
|
boolean |
checkLastModel()
sets continuing and doProcessLines |
protected boolean |
checkLine()
|
void |
checkLineForScript()
|
protected void |
checkLineForScript(java.lang.String line)
|
private boolean |
checkUnitCell(int n)
|
private void |
checkUnitCellOffset()
|
void |
clearUnitCell()
|
protected int |
cloneLastAtomSet(int atomCount,
javax.vecmath.Point3f[] pts)
|
protected void |
discardLinesUntilBlank()
|
protected java.lang.String |
discardLinesUntilContains(java.lang.String containsMatch)
|
protected java.lang.String |
discardLinesUntilContains(java.lang.String s1,
java.lang.String s2)
|
protected java.lang.String |
discardLinesUntilNonBlank()
|
protected java.lang.String |
discardLinesUntilStartsWith(java.lang.String startsWith)
|
boolean |
doGetModel(int modelNumber)
|
boolean |
doGetVibration(int vibrationNumber)
|
protected void |
fillDataBlock(java.lang.String[][] data)
fills an array with a pre-defined number of lines of token data, skipping blank lines in the process |
protected void |
fillDataBlock(java.lang.String[][] data,
int col0,
int colWidth)
fills an array with a predefined number of lines of data that is arranged in fixed FORTRAN-like column format |
protected float[] |
fillFloatArray(java.lang.String s,
int width,
float[] data)
fills a float array with string data from a file |
protected void |
fillFrequencyData(int iAtom0,
int atomCount,
int modelAtomCount,
boolean[] ignore,
boolean isWide,
int col0,
int colWidth,
int[] atomIndexes)
Extracts a block of frequency data from a file. |
protected boolean |
filterAtom(Atom atom,
int iAtom)
|
private boolean |
filterReject(java.lang.String f,
java.lang.String code,
java.lang.String atomCode)
|
protected void |
finalizeReader()
|
private java.lang.Object |
finish()
|
static java.lang.String |
getElementSymbol(int elementNumber)
|
protected static java.util.ArrayList<java.lang.Integer> |
getFortranFormatLengths(java.lang.String s)
get all integers after letters negative entries are spaces (1Xn) |
protected static java.lang.String[] |
getStrings(java.lang.String sinfo,
int nFields,
int width)
|
protected SymmetryInterface |
getSymmetry()
|
protected java.lang.String[] |
getTokens()
|
static java.lang.String[] |
getTokens(java.lang.String s)
|
protected static java.lang.String[] |
getTokens(java.lang.String s,
int iStart)
|
protected static float[] |
getTokensFloat(java.lang.String s,
float[] f,
int n)
|
private void |
initialize()
|
private void |
initializeCartesianToFractional()
|
protected void |
initializeReader()
|
protected void |
initializeSymmetry()
|
boolean |
isLastModel(int modelNumber)
after reading a model, Q: Is this the last model? |
protected void |
newAtomSet(java.lang.String name)
|
protected float |
parseFloat()
|
float |
parseFloat(java.lang.String s)
|
protected float |
parseFloat(java.lang.String s,
int iStart,
int iEnd)
|
protected int |
parseInt()
|
int |
parseInt(java.lang.String s)
|
protected int |
parseInt(java.lang.String s,
int iStart)
|
protected int |
parseInt(java.lang.String s,
int iStart,
int iEnd)
|
protected void |
parseStringInfestedFloatArray(java.lang.String s,
float[] data)
|
protected java.lang.String |
parseToken()
|
protected java.lang.String |
parseToken(java.lang.String s)
|
protected java.lang.String |
parseToken(java.lang.String s,
int iStart,
int iEnd)
|
protected java.lang.String |
parseTokenNext(java.lang.String s)
|
protected static java.lang.String |
parseTrimmed(java.lang.String s,
int iStart)
|
protected static java.lang.String |
parseTrimmed(java.lang.String s,
int iStart,
int iEnd)
|
protected void |
processBinaryDocument(BinaryDocument doc)
|
protected void |
processXml(java.lang.Object DOMNode)
|
protected javax.vecmath.Vector3f[] |
read3Vectors(boolean isBohr)
read three vectors, as for unit cube definitions allows for non-numeric data preceding the number block |
(package private) java.lang.Object |
readData()
|
protected java.lang.Object |
readData(java.lang.Object node)
|
java.lang.String |
readLine()
|
protected java.lang.String |
readLines(int nLines)
|
protected void |
set2D()
|
void |
setAtomCoord(Atom atom)
|
void |
setAtomCoord(Atom atom,
float x,
float y,
float z)
|
private void |
setError(java.lang.Throwable e)
|
protected void |
setFilter(java.lang.String filter0)
|
void |
setFractionalCoordinates(boolean TF)
|
void |
setIsPDB()
|
void |
setMOData(java.util.Map<java.lang.String,java.lang.Object> moData)
|
protected void |
setPdb()
|
void |
setSpaceGroupName(java.lang.String name)
|
void |
setSymmetryOperator(java.lang.String xyz)
|
void |
setTransform(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3)
|
void |
setUnitCell(float a,
float b,
float c,
float alpha,
float beta,
float gamma)
|
void |
setUnitCellItem(int i,
float x)
|
(package private) void |
setup(java.lang.String fileName,
java.util.Map<java.lang.String,java.lang.Object> htParams,
java.lang.Object reader)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float ANGSTROMS_PER_BOHR
public boolean isBinary
public AtomSetCollection atomSetCollection
protected java.io.BufferedReader reader
protected BinaryDocument doc
protected java.lang.String readerName
public java.util.Map<java.lang.String,java.lang.Object> htParams
public java.lang.String line
public java.lang.String prevline
protected int[] next
protected long ptLine
public int[] latticeCells
public boolean doProcessLines
public boolean iHaveUnitCell
public boolean iHaveSymmetryOperators
public boolean continuing
protected JmolViewer viewer
protected boolean doApplySymmetry
protected boolean ignoreFileSymmetryOperators
protected boolean isTrajectory
public boolean applySymmetryToBonds
protected boolean doCheckUnitCell
protected boolean getHeader
protected boolean isSequential
protected int templateAtomCount
public int modelNumber
protected int vibrationNumber
public int desiredVibrationNumber
protected java.util.BitSet bsModels
protected boolean havePartialChargeFilter
public java.lang.String calculationType
protected java.lang.String spaceGroup
protected boolean ignoreFileUnitCell
protected boolean ignoreFileSpaceGroupName
protected float[] notionalUnitCell
protected int desiredModelNumber
protected SymmetryInterface symmetry
protected java.io.OutputStream os
protected boolean iHaveFractionalCoordinates
protected boolean doPackUnitCell
protected java.lang.String supercell
private java.lang.StringBuffer loadNote
private boolean doConvertToFractional
private boolean merging
private boolean fileCoordinatesAreFractional
private float symmetryRange
private int[] firstLastStep
private int lastModelNumber
private int desiredSpaceGroupIndex
private javax.vecmath.Point3f fileScaling
private javax.vecmath.Point3f fileOffset
private javax.vecmath.Point3f fileOffsetFractional
private javax.vecmath.Point3f unitCellOffset
private boolean unitCellOffsetFractional
java.lang.String fileName
protected int stateScriptVersionInt
public boolean haveModel
private java.lang.String previousSpaceGroup
private float[] previousUnitCell
private int nMatrixElements
protected javax.vecmath.Matrix3f matUnitCellOrientation
protected java.util.BitSet bsFilter
protected java.lang.String filter
private boolean haveAtomFilter
private boolean filterAltLoc
private boolean filterGroup3
private boolean filterChain
private boolean filterAtomType
private boolean filterElement
protected boolean filterHetero
private boolean filterEveryNth
private int filterN
private int nFiltered
private boolean doSetOrientation
protected boolean addVibrations
protected boolean useAltNames
public boolean readMolecularOrbitals
private java.lang.String filter1
private java.lang.String filter2
private javax.vecmath.Matrix3f matrixRotate
private java.lang.String previousScript
private java.lang.String siteScript
Constructor Detail |
---|
public AtomSetCollectionReader()
Method Detail |
---|
void setup(java.lang.String fileName, java.util.Map<java.lang.String,java.lang.Object> htParams, java.lang.Object reader)
java.lang.Object readData() throws java.lang.Exception
java.lang.Exception
protected java.lang.Object readData(java.lang.Object node) throws java.lang.Exception
java.lang.Exception
protected void processXml(java.lang.Object DOMNode)
DOMNode
- protected void processBinaryDocument(BinaryDocument doc) throws java.lang.Exception
doc
-
java.lang.Exception
protected void initializeReader() throws java.lang.Exception
java.lang.Exception
protected boolean checkLine() throws java.lang.Exception
java.lang.Exception
public boolean checkLastModel()
public boolean isLastModel(int modelNumber)
modelNumber
-
protected void appendLoadNote(java.lang.String info)
protected void finalizeReader() throws java.lang.Exception
java.lang.Exception
public void setIsPDB()
protected void setPdb()
private java.lang.Object finish()
private void setError(java.lang.Throwable e)
private void initialize()
public boolean doGetModel(int modelNumber)
protected void initializeSymmetry()
protected void newAtomSet(java.lang.String name)
protected int cloneLastAtomSet(int atomCount, javax.vecmath.Point3f[] pts) throws java.lang.Exception
java.lang.Exception
public void setSpaceGroupName(java.lang.String name)
public void setSymmetryOperator(java.lang.String xyz)
private void initializeCartesianToFractional()
public void clearUnitCell()
public void setUnitCellItem(int i, float x)
public void setUnitCell(float a, float b, float c, float alpha, float beta, float gamma)
public void addPrimitiveLatticeVector(int i, float[] xyz, int i0)
private boolean checkUnitCell(int n)
private void checkUnitCellOffset()
protected SymmetryInterface getSymmetry()
public void setFractionalCoordinates(boolean TF)
protected void setFilter(java.lang.String filter0)
public boolean checkFilter(java.lang.String key)
protected boolean filterAtom(Atom atom, int iAtom)
atom
- iAtom
-
private boolean checkFilter(Atom atom, java.lang.String f)
private boolean filterReject(java.lang.String f, java.lang.String code, java.lang.String atomCode)
protected void set2D()
public boolean doGetVibration(int vibrationNumber)
public void setTransform(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3)
public void setAtomCoord(Atom atom, float x, float y, float z)
public void setAtomCoord(Atom atom)
protected void addSites(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> htSites)
public void applySymmetryAndSetTrajectory() throws java.lang.Exception
java.lang.Exception
public void setMOData(java.util.Map<java.lang.String,java.lang.Object> moData)
public static java.lang.String getElementSymbol(int elementNumber)
protected void fillDataBlock(java.lang.String[][] data, int col0, int colWidth) throws java.lang.Exception
data
- col0
- colWidth
-
java.lang.Exception
protected void fillDataBlock(java.lang.String[][] data) throws java.lang.Exception
data
-
java.lang.Exception
protected float[] fillFloatArray(java.lang.String s, int width, float[] data) throws java.lang.Exception
s
- string data containing floatswidth
- column width or 0 to read tokensdata
- result data to be filled
java.lang.Exception
protected void fillFrequencyData(int iAtom0, int atomCount, int modelAtomCount, boolean[] ignore, boolean isWide, int col0, int colWidth, int[] atomIndexes) throws java.lang.Exception
iAtom0
- the first atom to be assigned a frequencyatomCount
- the number of atoms to be assignedmodelAtomCount
- the number of atoms in each modelignore
- the frequencies to ignore because the user has selected only
certain vibrations to be read or for whatever reason; length
serves to set the number of frequencies to be readisWide
- when TRUE, this is a table that has X Y Z for each mode within the
same row; when FALSE, this is a table that has X Y Z for each mode
on a separate line.col0
- the column in which data startscolWidth
- the width of the data columnsatomIndexes
- an array either null or indicating exactly which atoms get the
frequencies (used by CrystalReader)
java.lang.Exception
protected java.lang.String readLines(int nLines) throws java.lang.Exception
java.lang.Exception
protected java.lang.String discardLinesUntilStartsWith(java.lang.String startsWith) throws java.lang.Exception
java.lang.Exception
protected java.lang.String discardLinesUntilContains(java.lang.String containsMatch) throws java.lang.Exception
java.lang.Exception
protected java.lang.String discardLinesUntilContains(java.lang.String s1, java.lang.String s2) throws java.lang.Exception
java.lang.Exception
protected void discardLinesUntilBlank() throws java.lang.Exception
java.lang.Exception
protected java.lang.String discardLinesUntilNonBlank() throws java.lang.Exception
java.lang.Exception
protected void checkLineForScript(java.lang.String line)
public void checkLineForScript()
protected void addJmolScript(java.lang.String script)
protected void addSiteScript(java.lang.String script)
public java.lang.String readLine() throws java.lang.Exception
java.lang.Exception
protected static final java.lang.String[] getStrings(java.lang.String sinfo, int nFields, int width)
protected void parseStringInfestedFloatArray(java.lang.String s, float[] data)
protected java.lang.String[] getTokens()
protected static float[] getTokensFloat(java.lang.String s, float[] f, int n)
public static java.lang.String[] getTokens(java.lang.String s)
protected static java.lang.String[] getTokens(java.lang.String s, int iStart)
protected float parseFloat()
public float parseFloat(java.lang.String s)
protected float parseFloat(java.lang.String s, int iStart, int iEnd)
protected int parseInt()
public int parseInt(java.lang.String s)
protected int parseInt(java.lang.String s, int iStart)
protected int parseInt(java.lang.String s, int iStart, int iEnd)
protected java.lang.String parseToken()
protected java.lang.String parseToken(java.lang.String s)
protected java.lang.String parseTokenNext(java.lang.String s)
protected java.lang.String parseToken(java.lang.String s, int iStart, int iEnd)
protected static java.lang.String parseTrimmed(java.lang.String s, int iStart)
protected static java.lang.String parseTrimmed(java.lang.String s, int iStart, int iEnd)
protected static java.util.ArrayList<java.lang.Integer> getFortranFormatLengths(java.lang.String s)
s
-
protected javax.vecmath.Vector3f[] read3Vectors(boolean isBohr) throws java.lang.Exception
isBohr
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |