public abstract class AtomSetCollectionReader extends Object
Constructor and Description |
---|
AtomSetCollectionReader() |
Modifier and Type | Method and Description |
---|---|
void |
addJmolScript(String script) |
void |
addPrimitiveLatticeVector(int i,
float[] xyz,
int i0) |
void |
addSites(Map<String,Map<String,Object>> htSites) |
protected void |
addSiteScript(String script) |
private boolean |
allowAtomName(String atomName,
String f) |
String |
appendLoadNote(String info) |
void |
applySymmetryAndSetTrajectory() |
SymmetryInterface |
applySymTrajASCR() |
void |
checkCurrentLineForScript() |
private boolean |
checkFilter(Atom atom,
String f) |
boolean |
checkFilterKey(String key) |
boolean |
checkLastModel()
sets continuing and doProcessLines
|
protected boolean |
checkLine() |
protected void |
checkLineForScript(String line) |
private boolean |
checkUnitCell(int n) |
private void |
checkUnitCellOffset() |
void |
clearUnitCell() |
protected int |
cloneLastAtomSet(int atomCount,
javajs.util.P3[] pts) |
protected void |
discardLinesUntilBlank() |
protected String |
discardLinesUntilContains(String containsMatch) |
protected String |
discardLinesUntilContains2(String s1,
String s2) |
protected String |
discardLinesUntilNonBlank() |
protected String |
discardLinesUntilStartsWith(String startsWith) |
boolean |
doGetModel(int modelNumber,
String title) |
boolean |
doGetVibration(int vibrationNumber) |
protected void |
doPreSymmetry() |
protected void |
fillDataBlock(String[][] data,
int minLineLen)
fills an array with a pre-defined number of lines of token data,
skipping blank lines in the process
|
protected void |
fillDataBlockFixed(String[][] data,
int col0,
int colWidth,
int minLineLen)
fills an array with a predefined number of lines of data that is
arranged in fixed FORTRAN-like column format
|
protected float[] |
fillFloatArray(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,
int minLineLen)
Extracts a block of frequency data from a file.
|
protected boolean |
filterAtom(Atom atom,
int iAtom) |
protected boolean |
filterReject(String f,
String code,
String atomCode) |
void |
finalizeMOData(Map<String,Object> moData) |
void |
finalizeModelSet() |
protected void |
finalizeReader()
optional reader-specific method run first.
|
protected void |
finalizeReaderASCR() |
private Object |
finish() |
private void |
fixBaseIndices() |
static String |
getElementSymbol(int elementNumber) |
String |
getFilter(String key) |
protected static javajs.util.List<Integer> |
getFortranFormatLengths(String s)
get all integers after letters
negative entries are spaces (1Xn)
|
protected static String[] |
getStrings(String sinfo,
int nFields,
int width) |
protected SymmetryInterface |
getSymmetry() |
protected String[] |
getTokens() |
protected static String[] |
getTokensAt(String s,
int iStart) |
protected static float[] |
getTokensFloat(String s,
float[] f,
int n) |
static String[] |
getTokensStr(String s) |
private void |
initialize() |
private void |
initializeCartesianToFractional() |
protected void |
initializeReader() |
protected void |
initializeSymmetry() |
protected void |
initializeSymmetryOptions() |
protected void |
initializeTrajectoryFile() |
boolean |
isLastModel(int modelNumber)
after reading a model, Q: Is this the last model?
|
protected void |
newAtomSet(String name) |
protected float |
parseFloat() |
protected float |
parseFloatRange(String s,
int iStart,
int iEnd) |
float |
parseFloatStr(String s) |
protected int |
parseInt() |
protected int |
parseIntAt(String s,
int iStart) |
protected int |
parseIntRange(String s,
int iStart,
int iEnd) |
int |
parseIntStr(String s) |
protected void |
parseStringInfestedFloatArray(String s,
float[] data) |
protected String |
parseToken() |
protected String |
parseTokenNext(String s) |
protected String |
parseTokenRange(String s,
int iStart,
int iEnd) |
protected String |
parseTokenStr(String s) |
protected static String |
parseTrimmedAt(String s,
int iStart) |
protected static String |
parseTrimmedRange(String s,
int iStart,
int iEnd) |
protected void |
processBinaryDocument(JmolDocument doc) |
protected void |
processDOM(Object DOMNode) |
protected javajs.util.V3[] |
read3Vectors(boolean isBohr)
read three vectors, as for unit cube definitions
allows for non-numeric data preceding the number block
|
(package private) Object |
readData() |
protected Object |
readDataObject(Object node) |
String |
readLine() |
protected String |
readLines(int nLines) |
boolean |
rejectAtomName(String name) |
String |
RL() |
protected void |
set2D() |
void |
setAtomCoord(Atom atom) |
void |
setAtomCoordXYZ(Atom atom,
float x,
float y,
float z) |
void |
setChainID(Atom atom,
char ch) |
protected void |
setElementAndIsotope(Atom atom,
String str)
allow 13C, 15N, 2H, etc.
|
private void |
setError(Throwable e) |
protected void |
setFilter(String filter0) |
protected void |
setFilterAtomTypeStr(String s) |
void |
setFractionalCoordinates(boolean TF) |
void |
setIsPDB() |
private void |
setLatticeCells(boolean isReset) |
protected void |
setLoadNote() |
void |
setSpaceGroupName(String name) |
int |
setSymmetryOperator(String xyz) |
void |
setTransform(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3) |
void |
setU(Atom atom,
int i,
float val) |
void |
setUnitCell(float a,
float b,
float c,
float alpha,
float beta,
float gamma) |
void |
setUnitCellItem(int i,
float x) |
protected void |
setup(String fullPath,
Map<String,Object> htParams,
Object reader) |
protected void |
setupASCR(String fullPath,
Map<String,Object> htParams,
Object reader) |
public static final float ANGSTROMS_PER_BOHR
public boolean isBinary
public AtomSetCollection atomSetCollection
protected BufferedReader reader
protected JmolDocument doc
protected String readerName
public javajs.util.List<javajs.util.P3[]> trajectorySteps
public String line
public String prevline
protected int[] next
protected int ptLine
public int[] latticeCells
public boolean doProcessLines
public boolean iHaveUnitCell
public boolean iHaveSymmetryOperators
public boolean continuing
public Viewer viewer
public 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 BS bsModels
protected boolean havePartialChargeFilter
public String calculationType
protected String spaceGroup
protected boolean ignoreFileUnitCell
protected boolean ignoreFileSpaceGroupName
public float[] notionalUnitCell
protected int desiredModelNumber
public SymmetryInterface symmetry
protected javajs.util.OC out
protected boolean iHaveFractionalCoordinates
public boolean doPackUnitCell
protected String strSupercell
protected javajs.util.P3 ptSupercell
protected boolean mustFinalizeModelSet
protected boolean forcePacked
private javajs.util.SB loadNote
private boolean doConvertToFractional
private boolean fileCoordinatesAreFractional
private boolean merging
private float symmetryRange
private int[] firstLastStep
private int lastModelNumber
private int desiredSpaceGroupIndex
protected javajs.util.P3 fileScaling
protected javajs.util.P3 fileOffset
private javajs.util.P3 fileOffsetFractional
private javajs.util.P3 unitCellOffset
private boolean unitCellOffsetFractional
protected String filePath
protected String fileName
protected int stateScriptVersionInt
public boolean haveModel
private String previousSpaceGroup
private float[] previousUnitCell
private int nMatrixElements
protected javajs.util.M3 matUnitCellOrientation
protected BS bsFilter
public String filter
private boolean haveAtomFilter
private boolean filterAltLoc
private boolean filterGroup3
private boolean filterChain
private boolean filterAtomName
private boolean filterAtomType
private String filterAtomTypeStr
private String filterAtomNameTerminator
private boolean filterElement
protected boolean filterHetero
private boolean filterEveryNth
private int filterN
private int nFiltered
private boolean doSetOrientation
protected boolean doCentralize
protected boolean addVibrations
protected boolean useAltNames
public boolean doReadMolecularOrbitals
protected boolean reverseModels
private String nameRequired
private boolean doCentroidUnitCell
private boolean centroidPacked
private String filter1
private String filter2
private javajs.util.M3 matrixRotate
public MSInterface ms
private String previousScript
private String siteScript
private void fixBaseIndices()
protected void processDOM(Object DOMNode)
DOMNode
- protected void processBinaryDocument(JmolDocument doc) throws Exception
doc
- Exception
protected boolean checkLine() throws Exception
Exception
public boolean checkLastModel()
public boolean isLastModel(int modelNumber)
modelNumber
- protected void initializeTrajectoryFile()
protected void finalizeReader() throws Exception
Exception
protected void setLoadNote()
public void setIsPDB()
private Object finish()
private void setError(Throwable e)
e
- private void initialize()
protected void initializeSymmetryOptions()
public boolean doGetModel(int modelNumber, String title)
protected void initializeSymmetry()
protected void newAtomSet(String name)
protected int cloneLastAtomSet(int atomCount, javajs.util.P3[] pts) throws Exception
Exception
public void setSpaceGroupName(String name)
public int setSymmetryOperator(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 setFilterAtomTypeStr(String s)
protected void setFilter(String filter0)
public boolean checkFilterKey(String key)
protected boolean filterAtom(Atom atom, int iAtom)
atom
- iAtom
- private boolean checkFilter(Atom atom, String f)
atom
- f
- public boolean rejectAtomName(String name)
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 setAtomCoordXYZ(Atom atom, float x, float y, float z)
public void setAtomCoord(Atom atom)
public void applySymmetryAndSetTrajectory() throws Exception
Exception
public SymmetryInterface applySymTrajASCR() throws Exception
Exception
protected void doPreSymmetry()
public static String getElementSymbol(int elementNumber)
protected void fillDataBlockFixed(String[][] data, int col0, int colWidth, int minLineLen) throws Exception
data
- col0
- colWidth
- minLineLen
- TODOException
protected void fillDataBlock(String[][] data, int minLineLen) throws Exception
data
- minLineLen
- TODOException
protected float[] fillFloatArray(String s, int width, float[] data) throws Exception
s
- string data containing floatswidth
- column width or 0 to read tokensdata
- result data to be filledException
protected void fillFrequencyData(int iAtom0, int atomCount, int modelAtomCount, boolean[] ignore, boolean isWide, int col0, int colWidth, int[] atomIndexes, int minLineLen) throws 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)minLineLen
- TODOException
protected String discardLinesUntilStartsWith(String startsWith) throws Exception
Exception
protected String discardLinesUntilContains(String containsMatch) throws Exception
Exception
protected String discardLinesUntilContains2(String s1, String s2) throws Exception
Exception
protected String discardLinesUntilNonBlank() throws Exception
Exception
protected void checkLineForScript(String line)
public void checkCurrentLineForScript()
private void setLatticeCells(boolean isReset)
public void addJmolScript(String script)
protected void addSiteScript(String script)
protected String[] getTokens()
protected void parseStringInfestedFloatArray(String s, float[] data)
protected static float[] getTokensFloat(String s, float[] f, int n)
protected float parseFloat()
public float parseFloatStr(String s)
protected float parseFloatRange(String s, int iStart, int iEnd)
protected int parseInt()
public int parseIntStr(String s)
protected int parseIntAt(String s, int iStart)
protected int parseIntRange(String s, int iStart, int iEnd)
protected String parseToken()
protected static javajs.util.List<Integer> getFortranFormatLengths(String s)
s
- protected javajs.util.V3[] read3Vectors(boolean isBohr) throws Exception
isBohr
- Exception
protected void setElementAndIsotope(Atom atom, String str)
atom
- str
- public void finalizeModelSet()
public void setChainID(Atom atom, char ch)
public void setU(Atom atom, int i, float val)