Class AtomSetCollectionReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
- All Implemented Interfaces:
GenericLineReader
- Direct Known Subclasses:
AbinitReader, AimsReader, AlchemyReader, AmpacReader, BasisFunctionReader, BilbaoReader, BinaryDcdReader, CastepReader, CgdReader, CifReader, CmdfReader, CrystalReader, CubeReader, DmolReader, EspressoReader, FAHReader, FoldingXyzReader, ForceFieldReader, FSGOutputReader, GaussianWfnReader, GhemicalMMReader, GromacsReader, GulpReader, HyperChemReader, InputReader, JanaReader, JmeReader, JSONReader, MagresReader, MdCrdReader, MolReader, MopacReader, OptimadeReader, OrcaReader, PdbReader, PWmatReader, ShelxReader, SiestaReader, TlsDataOnlyReader, VaspOutcarReader, VaspPoscarReader, Wien2kReader, XcrysdenReader, XmlReader, XyzReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanbooleanprotected booleanstatic final floatbooleanintfirst atom index for this collection, current modelset.acintprotected BS//////// FILTER /////////////////protected BSprotected static final Stringprotected static final Stringprotected static final Stringprotected floatbooleanbooleanbooleanbooleanprotected intintintbooleanprotected booleanbooleanprotected booleanbooleanbooleanbooleanbooleanprotected Stringprotected P3protected Stringprotected P3protected booleanprotected booleanprotected booleanbooleanprotected booleanprotected booleanbooleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanbooleanbooleanbooleanbooleanprotected booleanprotected booleanprotected booleanbooleanprotected booleanprotected booleanbooleanactual SUPERCELL keyword, not just "cell="protected booleanint[]protected floatprotected Stringprotected booleanprotected M3protected booleanintintprotected booleanprotected int[]booleanbooleanprotected booleanbooleanprotected OCbooleanprotected intmaximum of the decimal length of unit cell lengths and fractional coordinatesprotected intprotected P3protected Stringprotected booleanprotected booleanprotected booleanprotected Stringbooleanprotected intprotected intfloat[]protected P3float[]protected booleanprotected booleanintboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAtomXYZSymName(String[] tokens, int i, String sym, String name) voidaddExplicitLatticeVector(int i, float[] xyz, int i0) voidaddJmolScript(String script) voidaddMoreUnitCellInfo(String info) voidprotected voidaddSiteScript(String script) voidappendLoadNote(String info) voidbooleanvoidbooleancheckFilterKey(String key) booleansets continuing and doProcessLinesprotected booleanprotected voidcheckLineForScript(String line) voidprotected intcloneLastAtomSet(int ac, P3[] pts) discardLinesUntilContains(String containsMatch) discardLinesUntilContains2(String s1, String s2) discardLinesUntilStartsWith(String startsWith) protected voidbooleandoGetModel(int modelNumber, String title) booleandoGetVibration(int vibrationNumber) protected voiddoPreSymmetry(boolean doApplySymmetry) protected double[][]fills a double[3][3]protected voidfillDataBlock(String[][] data, int minLineLen) fills an array with a pre-defined number of lines of token data, skipping blank lines in the processprotected voidfillDataBlockFixed(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 fileprotected voidfillFrequencyData(int iAtom0, int ac, int modelAtomCount, boolean[] ignore, boolean isWide, int col0, int colWidth, int[] atomIndexes, int minLineLen, String[][] data) Extracts a block of frequency data from a file.protected booleanfilterAtom(Atom atom, int iAtom) protected booleanfilterReject(String f, String code, String atomCode) voidfinalizeMOData(Map<String, Object> moData) voidprotected voidprotected voidprotected voidfinalizeSubclassSymmetry(boolean haveSymmetry) voidfixDoubleA(double[] pts) voidfixFloatA(float[] pts) voidfixFloatPt(P3 pt, float prec) voidforceSymmetry(boolean andPack) protected voidfractionalizeCoordinates(boolean toFrac) static StringgetElementSymbol(int elementNumber) getFilterWithCase(String key) get all integers after letters negative entries are spaces (1Xn)getInterface(String className) floatgetPackingRangeValue(float def) protected static final String[]getStrings(String sinfo, int nFields, int width) String[]static float[]getTokensFloat(String s, float[] f, int n) protected voidprotected final voidprotected voidprotected voidbooleanisLastModel(int modelNumber) after reading a model, Q: Is this the last model?protected voidnewAtomSet(String name) protected floatprotected floatparseFloatRange(String s, int iStart, int iEnd) floatprotected intparseInt()intparseIntAt(String s, int iStart) protected intparseIntRange(String s, int iStart, int iEnd) intprotected floatTrack the precision (count of y digits in "xx.yyyy") for setting cellSlop.protected Stringprotected Stringprotected StringparseTokenRange(String s, int iStart, int iEnd) protected Stringprotected voidprotected voidprocessDOM(Object DOMNode) rd()protected V3[]read3Vectors(boolean isBohr) read three vectors, as for unit cube definitions allows for non-numeric data preceding the number blockprotected ObjectreadDataObject(Object node) protected StringreadLines(int nLines) booleanrejectAtomName(String name) RL()protected voidset2D()voidsetAtomCoord(Atom atom) setAtomCoordScaled(Atom atom, String[] tokens, int i, float f) protected voidsetAtomCoordTokens(Atom atom, String[] tokens, int i) voidsetAtomCoordXYZ(Atom atom, float x, float y, float z) //////////////////////////voidsetChainID(Atom atom, String label) protected voidsetElementAndIsotope(Atom atom, String str) allow 13C, 15N, 2H, etc.protected voidprotected voidvoidsetFractionalCoordinates(boolean TF) voidsetIsPDB()protected String//////////////////////////////////////////////////////////////////////////////////protected voidsetModelPDB(boolean isPDB) protected voidCalled by PWMAT ALWAYS and CIFReader as well if a double-precision value for alpha is found.voidsetSpaceGroupName(String name) intvoidsetTransform(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) voidsetUnitCell(float a, float b, float c, float alpha, float beta, float gamma) voidsetUnitCellItem(int i, float x) protected voidprotected voidprotected void
-
Field Details
-
ANGSTROMS_PER_BOHR
public static final float ANGSTROMS_PER_BOHR- See Also:
-
CELL_TYPE_CONVENTIONAL
- See Also:
-
CELL_TYPE_PRIMITIVE
- See Also:
-
CELL_TYPE_SUPER
- See Also:
-
isBinary
public boolean isBinary -
debugging
public boolean debugging -
requiresBSFilter
protected boolean requiresBSFilter -
primitiveToCrystal
-
asc
-
reader
-
binaryDoc
-
readerName
-
htParams
-
trajectorySteps
-
validation
-
dssr
-
isConcatenated
protected boolean isConcatenated -
addedData
-
addedDataKey
-
thisBiomolecule
-
lstNCS
-
floatifyJavaDouble
public boolean floatifyJavaDouble -
line
-
prevline
-
next
protected int[] next -
ptLine
protected int ptLine -
checkNearAtoms
public boolean checkNearAtoms -
latticeType
-
latticeCells
public int[] latticeCells -
fillRange
-
doProcessLines
public boolean doProcessLines -
iHaveUnitCell
public boolean iHaveUnitCell -
iHaveSymmetryOperators
public boolean iHaveSymmetryOperators -
continuing
public boolean continuing -
vwr
-
doApplySymmetry
public boolean doApplySymmetry -
ignoreFileSymmetryOperators
protected boolean ignoreFileSymmetryOperators -
isTrajectory
protected boolean isTrajectory -
applySymmetryToBonds
public boolean applySymmetryToBonds -
doCheckUnitCell
protected boolean doCheckUnitCell -
getHeader
protected boolean getHeader -
isSequential
protected boolean isSequential -
optimize2D
public boolean optimize2D -
noHydrogens
public boolean noHydrogens -
noMinimize
public boolean noMinimize -
is2D
public boolean is2D -
isMolecular
public boolean isMolecular -
templateAtomCount
protected int templateAtomCount -
modelNumber
public int modelNumber -
vibrationNumber
public int vibrationNumber -
desiredVibrationNumber
public int desiredVibrationNumber -
bsModels
-
useFileModelNumbers
protected boolean useFileModelNumbers -
havePartialChargeFilter
protected boolean havePartialChargeFilter -
calculationType
-
sgName
-
ignoreFileUnitCell
protected boolean ignoreFileUnitCell -
ignoreFileSpaceGroupName
protected boolean ignoreFileSpaceGroupName -
unitCellParams
public float[] unitCellParams -
desiredModelNumber
protected int desiredModelNumber -
symmetry
-
out
-
iHaveFractionalCoordinates
protected boolean iHaveFractionalCoordinates -
doPackUnitCell
public boolean doPackUnitCell -
ptSupercell
-
mustFinalizeModelSet
protected boolean mustFinalizeModelSet -
forcePacked
protected boolean forcePacked -
cellSlop
protected float cellSlop -
rotateHexCell
protected boolean rotateHexCell -
isPrimitive
protected boolean isPrimitive -
modDim
public int modDim -
lowPrecision
protected boolean lowPrecision -
doConvertToFractional
public boolean doConvertToFractional -
merging
protected boolean merging -
desiredSpaceGroupIndex
public int desiredSpaceGroupIndex -
latticeScaling
protected float latticeScaling -
unitCellOffset
-
paramsLattice
-
paramsCentroid
public boolean paramsCentroid -
fileScaling
-
fileOffset
-
filePath
-
fileName
-
baseAtomIndex
public int baseAtomIndexfirst atom index for this collection, current modelset.ac -
baseBondIndex
public int baseBondIndex -
stateScriptVersionInt
protected int stateScriptVersionInt -
isFinalized
protected boolean isFinalized -
noPack
protected boolean noPack -
isSUPERCELL
public boolean isSUPERCELLactual SUPERCELL keyword, not just "cell=" -
precision
protected int precisionmaximum of the decimal length of unit cell lengths and fractional coordinates -
haveModel
protected boolean haveModel -
ucItems
public float[] ucItems -
matUnitCellOrientation
-
bsFilter
//////// FILTER ///////////////// -
filter
-
filterCased
-
haveAtomFilter
public boolean haveAtomFilter -
filterHetero
protected boolean filterHetero -
filterAllHetero
protected boolean filterAllHetero -
doCentralize
protected boolean doCentralize -
addVibrations
protected boolean addVibrations -
useAltNames
protected boolean useAltNames -
ignoreStructure
protected boolean ignoreStructure -
isDSSP1
protected boolean isDSSP1 -
allowPDBFilter
protected boolean allowPDBFilter -
doReadMolecularOrbitals
public boolean doReadMolecularOrbitals -
reverseModels
protected boolean reverseModels -
doCentroidUnitCell
public boolean doCentroidUnitCell -
centroidPacked
public boolean centroidPacked -
strSupercell
-
allow_a_len_1
public boolean allow_a_len_1 -
slabXY
public boolean slabXY -
filteredPrecision
protected boolean filteredPrecision -
ms
-
vibsFractional
public boolean vibsFractional
-
-
Constructor Details
-
AtomSetCollectionReader
public AtomSetCollectionReader()
-
-
Method Details
-
getPackingRangeValue
public float getPackingRangeValue(float def) -
setup
-
setupASCR
-
readDataObject
-
processDOM
- Parameters:
DOMNode-
-
processBinaryDocument
-
initializeReader
-
checkLine
-
checkLastModel
public boolean checkLastModel()sets continuing and doProcessLines- Returns:
- TRUE if continuing, FALSE if not
-
isLastModel
public boolean isLastModel(int modelNumber) after reading a model, Q: Is this the last model?- Parameters:
modelNumber-- Returns:
- Yes/No
-
appendLoadNote
-
initializeTrajectoryFile
protected void initializeTrajectoryFile() -
finalizeSubclassReader
-
finalizeReaderASCR
-
setLoadNote
////////////////////////////////////////////////////////////////////////////////// -
setIsPDB
public void setIsPDB() -
setModelPDB
protected void setModelPDB(boolean isPDB) -
parsePrecision
Track the precision (count of y digits in "xx.yyyy") for setting cellSlop. We assume that with the numbers 0.25 0.33333 that the precision is really 5, not 2. Note that in the end, the precision will never be set lower than 4.- Parameters:
s-- Returns:
- parsed number
-
setPrecision
protected void setPrecision()Called by PWMAT ALWAYS and CIFReader as well if a double-precision value for alpha is found. -
initializeSymmetryOptions
protected void initializeSymmetryOptions() -
doGetModel
-
discardPreviousAtoms
protected void discardPreviousAtoms() -
initializeSymmetry
protected final void initializeSymmetry() -
newAtomSet
-
cloneLastAtomSet
-
setSpaceGroupName
-
setSymmetryOperator
-
warnSkippingOperation
-
clearUnitCell
public void clearUnitCell() -
setUnitCellItem
public void setUnitCellItem(int i, float x) -
setUnitCell
public void setUnitCell(float a, float b, float c, float alpha, float beta, float gamma) -
addExplicitLatticeVector
public void addExplicitLatticeVector(int i, float[] xyz, int i0) -
getSymmetry
-
fractionalizeCoordinates
protected void fractionalizeCoordinates(boolean toFrac) -
setFractionalCoordinates
public void setFractionalCoordinates(boolean TF) -
setFilterAtomTypeStr
-
setFilter
-
getFilterWithCase
-
getFilter
-
checkFilterKey
-
checkAndRemoveFilterKey
- Parameters:
key-- Returns:
- true if the key existed; filter is set null if this is the only key
-
filterAtom
- Parameters:
atom-iAtom-- Returns:
- true if we want this atom
-
rejectAtomName
-
filterReject
-
set2D
protected void set2D() -
doGetVibration
public boolean doGetVibration(int vibrationNumber) -
setTransform
public void setTransform(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) -
setAtomCoordXYZ
////////////////////////// -
setAtomCoordScaled
-
setAtomCoordTokens
-
addAtomXYZSymName
-
setAtomCoord
-
addSites
-
applySymmetryAndSetTrajectory
-
applySymTrajASCR
- Throws:
Exception
-
finalizeSubclassSymmetry
-
doPreSymmetry
-
finalizeMOData
-
getElementSymbol
-
fillDataBlock
-
fill3x3
fills a double[3][3]- Parameters:
tokens- or null if to read each line for three values (as last 3 on line)pt- initial index; if tokens == null, then negative index is from end of each line- Returns:
- double[3][3]
- Throws:
Exception
-
fillFloatArray
-
fillFrequencyData
protected void fillFrequencyData(int iAtom0, int ac, int modelAtomCount, boolean[] ignore, boolean isWide, int col0, int colWidth, int[] atomIndexes, int minLineLen, String[][] data) throws Exception Extracts a block of frequency data from a file. This block may be of two types -- either X Y Z across a row or each of X Y Z on a separate line. Data is presumed to be in fixed FORTRAN-like column format, not space-separated columns.- Parameters:
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-data-- Throws:
Exception
-
fillDataBlockFixed
protected void fillDataBlockFixed(String[][] data, int col0, int colWidth, int minLineLen) throws Exception Fills an array with a predefined number of lines of data that is arranged in fixed FORTRAN-like column format. Used exclusively for frequency data- Parameters:
data-col0-colWidth-minLineLen- or -ptNonblank- Throws:
Exception
-
readLines
-
discardLinesUntilStartsWith
-
discardLinesUntilContains
-
discardLinesUntilContains2
-
discardLinesUntilBlank
-
discardLinesUntilNonBlank
-
checkLineForScript
-
checkCurrentLineForScript
public void checkCurrentLineForScript() -
addJmolScript
-
addSiteScript
-
rd
-
RL
-
getStrings
-
getTokens
-
getTokensFloat
-
parseFloat
protected float parseFloat() -
parseFloatStr
-
parseFloatRange
-
parseInt
protected int parseInt() -
parseIntStr
-
parseIntAt
-
parseIntRange
-
parseToken
-
parseTokenStr
-
parseTokenNext
-
parseTokenRange
-
getFortranFormatLengths
-
read3Vectors
-
setElementAndIsotope
-
finalizeModelSet
public void finalizeModelSet() -
setChainID
-
readNextLine
- Specified by:
readNextLinein interfaceGenericLineReader- Throws:
Exception
-
addMoreUnitCellInfo
-
getInterface
-
forceSymmetry
public void forceSymmetry(boolean andPack) -
fixFloatA
public void fixFloatA(float[] pts) -
fixDoubleA
public void fixDoubleA(double[] pts) -
fixFloatPt
-