public abstract class AtomSetCollectionReader extends Object implements javajs.api.GenericLineReader
Constructor and Description |
---|
AtomSetCollectionReader() |
Modifier and Type | Method and Description |
---|---|
Atom |
addAtomXYZSymName(String[] tokens,
int i,
String sym,
String name) |
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) |
void |
appendLoadNote(String info) |
void |
appendUunitCellInfo(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 ac,
javajs.util.P3[] pts) |
String |
discardLinesUntilBlank() |
String |
discardLinesUntilContains(String containsMatch) |
String |
discardLinesUntilContains2(String s1,
String s2) |
String |
discardLinesUntilNonBlank() |
String |
discardLinesUntilStartsWith(String startsWith) |
protected void |
discardPreviousAtoms() |
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 ac,
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 |
finalizeReaderASCR() |
protected void |
finalizeSubclassReader()
optional reader-specific method run first.
|
protected void |
finalizeSubclassSymmetry(boolean haveSymmetry) |
private Object |
finish() |
private void |
fixBaseIndices() |
void |
forceSymmetry(boolean andPack) |
protected void |
fractionalizeCoordinates(boolean toFrac) |
static String |
getElementSymbol(int elementNumber) |
String |
getFilter(String key) |
protected static javajs.util.Lst<Integer> |
getFortranFormatLengths(String s)
get all integers after letters
negative entries are spaces (1Xn)
|
Object |
getInterface(String className) |
protected SymmetryInterface |
getNewSymmetry() |
protected static String[] |
getStrings(String sinfo,
int nFields,
int width) |
protected SymmetryInterface |
getSymmetry() |
String[] |
getTokens() |
static float[] |
getTokensFloat(String s,
float[] f,
int n) |
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() |
int |
parseIntAt(String s,
int iStart) |
protected int |
parseIntRange(String s,
int iStart,
int iEnd) |
int |
parseIntStr(String s) |
protected String |
parseToken() |
protected String |
parseTokenNext(String s) |
protected String |
parseTokenRange(String s,
int iStart,
int iEnd) |
protected String |
parseTokenStr(String s) |
protected void |
processBinaryDocument() |
protected void |
processDOM(Object DOMNode) |
String |
rd() |
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) |
protected String |
readLines(int nLines) |
String |
readNextLine() |
boolean |
rejectAtomName(String name) |
String |
RL() |
protected void |
set2D() |
void |
setAtomCoord(Atom atom) |
Atom |
setAtomCoordScaled(Atom atom,
String[] tokens,
int i,
float f) |
protected void |
setAtomCoordTokens(Atom atom,
String[] tokens,
int i) |
void |
setAtomCoordXYZ(Atom atom,
float x,
float y,
float z) |
void |
setChainID(Atom atom,
String label) |
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() |
protected String |
setLoadNote() |
protected void |
setModelPDB(boolean isPDB) |
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 |
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 readerOrDocument) |
protected void |
setupASCR(String fullPath,
Map<String,Object> htParams,
Object readerOrDocument) |
public static final float ANGSTROMS_PER_BOHR
public boolean isBinary
public boolean debugging
public AtomSetCollection asc
protected BufferedReader reader
protected javajs.api.GenericBinaryDocument binaryDoc
protected String readerName
public javajs.util.Lst<javajs.util.P3[]> trajectorySteps
private Object domains
public Object validation
public Object dssr
protected boolean isConcatenated
public String addedData
public String addedDataKey
public boolean fixJavaFloat
public javajs.util.Lst<javajs.util.M4> lstNCS
public String line
public String prevline
protected int[] next
protected int ptLine
public int[] latticeCells
public javajs.util.T3[] fillRange
public boolean doProcessLines
public boolean iHaveUnitCell
public boolean iHaveSymmetryOperators
public boolean continuing
public Viewer vwr
public boolean doApplySymmetry
protected boolean ignoreFileSymmetryOperators
protected boolean isTrajectory
public boolean applySymmetryToBonds
protected boolean doCheckUnitCell
protected boolean getHeader
protected boolean isSequential
public boolean isMolecular
protected int templateAtomCount
public int modelNumber
protected int vibrationNumber
public int desiredVibrationNumber
protected BS bsModels
protected boolean useFileModelNumbers
protected boolean havePartialChargeFilter
public String calculationType
protected String sgName
protected boolean ignoreFileUnitCell
protected boolean ignoreFileSpaceGroupName
public float[] unitCellParams
protected int desiredModelNumber
public SymmetryInterface symmetry
protected javajs.util.OC out
protected boolean iHaveFractionalCoordinates
public boolean doPackUnitCell
protected javajs.util.P3 ptSupercell
protected boolean mustFinalizeModelSet
protected boolean forcePacked
public float packingError
private javajs.util.SB loadNote
public boolean doConvertToFractional
boolean fileCoordinatesAreFractional
boolean merging
float symmetryRange
private int[] firstLastStep
private int lastModelNumber
public int desiredSpaceGroupIndex
protected javajs.util.P3 fileScaling
protected float latticeScaling
protected javajs.util.P3 fileOffset
private javajs.util.P3 fileOffsetFractional
protected javajs.util.P3 unitCellOffset
private boolean unitCellOffsetFractional
private javajs.util.Lst<String> moreUnitCellInfo
protected String filePath
protected String fileName
protected int stateScriptVersionInt
public int baseAtomIndex
protected boolean isFinalized
protected boolean haveModel
private String previousSpaceGroup
private float[] previousUnitCell
private int nMatrixElements
protected javajs.util.M3 matUnitCellOrientation
protected BS bsFilter
public String filter
public 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
String filterSymop
private int filterN
private int nFiltered
private boolean doSetOrientation
protected boolean doCentralize
protected boolean addVibrations
protected boolean useAltNames
protected boolean ignoreStructure
protected boolean isDSSP1
protected boolean allowPDBFilter
public boolean doReadMolecularOrbitals
protected boolean reverseModels
private String nameRequired
boolean doCentroidUnitCell
boolean centroidPacked
public String strSupercell
private String filter1
private String filter2
private javajs.util.M3 matRot
public MSInterface ms
public boolean vibsFractional
private String previousScript
private String siteScript
protected void setupASCR(String fullPath, Map<String,Object> htParams, Object readerOrDocument)
private void fixBaseIndices()
protected void processDOM(Object DOMNode)
DOMNode
- protected boolean checkLine() throws Exception
Exception
public boolean checkLastModel()
public boolean isLastModel(int modelNumber)
modelNumber
- public void appendLoadNote(String info)
protected void initializeTrajectoryFile()
protected void finalizeSubclassReader() throws Exception
Exception
protected String setLoadNote()
public void setIsPDB()
protected void setModelPDB(boolean isPDB)
private Object finish()
private void setError(Throwable e)
e
- private void initialize()
protected void initializeSymmetryOptions()
public boolean doGetModel(int modelNumber, String title)
protected void discardPreviousAtoms()
protected void initializeSymmetry()
protected void newAtomSet(String name)
protected int cloneLastAtomSet(int ac, 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)
protected SymmetryInterface getSymmetry()
private void checkUnitCellOffset()
protected void fractionalizeCoordinates(boolean toFrac)
protected SymmetryInterface getNewSymmetry()
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 finalizeSubclassSymmetry(boolean haveSymmetry) throws Exception
haveSymmetry
- Exception
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 ac, int modelAtomCount, boolean[] ignore, boolean isWide, int col0, int colWidth, int[] atomIndexes, int minLineLen) throws Exception
iAtom0
- the first atom to be assigned a frequencyac
- 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
public String discardLinesUntilStartsWith(String startsWith) throws Exception
Exception
public String discardLinesUntilContains(String containsMatch) throws Exception
Exception
public String discardLinesUntilContains2(String s1, String s2) throws Exception
Exception
public String discardLinesUntilNonBlank() throws Exception
Exception
protected void checkLineForScript(String line)
public void checkCurrentLineForScript()
public void addJmolScript(String script)
protected void addSiteScript(String script)
public String[] getTokens()
public 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)
public int parseIntAt(String s, int iStart)
protected int parseIntRange(String s, int iStart, int iEnd)
protected String parseToken()
protected static javajs.util.Lst<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 String readNextLine() throws Exception
readNextLine
in interface javajs.api.GenericLineReader
Exception
public void appendUunitCellInfo(String info)
public void forceSymmetry(boolean andPack)