Package org.jmol.adapter.readers.xtal
Class PWmatReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xtal.PWmatReader
- All Implemented Interfaces:
javajs.api.GenericLineReader
crude PWmat atom.config reader
http://pwmatus.com/manual
- Author:
- hansonr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private boolean
private boolean
private boolean
private int
The format of pwmat config file specification is now clear, would like to adjust PWmatReader accordingly.Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allow_a_len_1, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, baseBondIndex, binaryDoc, bsFilter, bsModels, calculationType, CELL_TYPE_CONVENTIONAL, CELL_TYPE_PRIMITIVE, centroidPacked, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noPack, out, packingError, paramsCentroid, paramsLattice, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, slabXY, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected boolean
protected void
optional reader-specific method run first.private String
getLine()
protected void
private void
private void
private boolean
readDataBlock
(String name) private void
private void
private void
readVectors
(String name, int offset, boolean haveLine) private String
private void
setProperties
(String name, float[] values, int n) private void
setVectors
(String name, float[] valuesX, float[] valuesY, float[] valuesZ, int n) private String
trimPWPropertyNameTo
(String name, String chars) Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymTrajASCR, checkAndRemoveFilterKey, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, doPreSymmetry, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, finalizeSubclassSymmetry, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, processDOM, rd, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR
-
Field Details
-
nAtoms
private int nAtomsThe format of pwmat config file specification is now clear, would like to adjust PWmatReader accordingly. The pwmat config file format accommodates conversion from other vendors and their formats. The first line always has number of atoms, before the number, could be spaces. after the number, there could be comments such as "generated from pwmat". Please ignore those comments, only gets the number from the first line. After the first line, there could be comments please ignore till reading of letter lattice or lattice vector. The letters are case non-sensitive. The lattice section consists of 3 lines representing lattice vector. For each line, there could be extra 3 numbers followed, please ignore. Following lattice section, there comes position section. As long as there is "position" case-insensitive leading the line, that is our position section. The position section consists of total lines of total atom number which is the from the first line. The lattice section, following by position section, then there are optional sections. The cue is always the words case-insensitive. After the keywords, following by the total lines of total atom number. -
haveLattice
private boolean haveLattice -
havePositions
private boolean havePositions -
haveMagnetic
private boolean haveMagnetic -
global3
-
-
Constructor Details
-
PWmatReader
public PWmatReader()
-
-
Method Details
-
initializeReader
- Overrides:
initializeReader
in classAtomSetCollectionReader
- Throws:
Exception
-
checkLine
- Overrides:
checkLine
in classAtomSetCollectionReader
- Returns:
- true if need to read new line
- Throws:
Exception
-
readComments
private void readComments() -
readUnitCell
- Throws:
Exception
-
readCoordinates
- Throws:
Exception
-
readDataBlock
- Throws:
Exception
-
trimPWPropertyNameTo
-
readItems
- Throws:
Exception
-
setProperties
-
readVectors
- Throws:
Exception
-
getLine
- Throws:
Exception
-
removeComments
-
setVectors
-
applySymmetryAndSetTrajectory
- Overrides:
applySymmetryAndSetTrajectory
in classAtomSetCollectionReader
- Throws:
Exception
-
finalizeSubclassReader
Description copied from class:AtomSetCollectionReader
optional reader-specific method run first.- Overrides:
finalizeSubclassReader
in classAtomSetCollectionReader
- Throws:
Exception
-