Package org.jmol.adapter.readers.xtal
Class MagresReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xtal.MagresReader
- All Implemented Interfaces:
javajs.api.GenericLineReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private float[]
private int
private javajs.util.SB
private javajs.util.Lst<Tensor>
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, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noPack, optimize2D, 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 TypeMethodDescriptionprivate int
looking for tags here.protected boolean
Valid blocks include [calculation] [atoms] [magres]; all magres entries must be prefaced with a corresponding unit; Use of < > instead of [ ] is allowed.protected void
Set final auxiliary info and symmetry, including "fileHeader", "magresUnits", and "interactionTensors"; note that print getProperty("auxiliaryInfo.models[1].magresUnits") should return a catalog of tensor types.private static String
getAtomName
(String name, String index) combine name and indexprotected void
not sure how to work with symmetry here...private boolean
readAtom()
Allowing for BOHR units here; probably unnecessary.private boolean
private boolean
not doing anything with this -- P1 assumedprivate boolean
Read a tensor line.private boolean
setUnits
(boolean isMagresBlock) catalog unitsprivate boolean
trimLine()
All characters after hash ignored; lines are trimmed.Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, 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
-
BLOCK_NEW
private static final int BLOCK_NEW- See Also:
-
BLOCK_NONE
private static final int BLOCK_NONE- See Also:
-
BLOCK_CALC
private static final int BLOCK_CALC- See Also:
-
BLOCK_ATOMS
private static final int BLOCK_ATOMS- See Also:
-
BLOCK_MAGRES
private static final int BLOCK_MAGRES- See Also:
-
currentBlock
private int currentBlock -
cellParams
private float[] cellParams -
magresUnits
-
interactionTensors
-
header
private javajs.util.SB header
-
-
Constructor Details
-
MagresReader
public MagresReader()
-
-
Method Details
-
initializeReader
protected void initializeReader()not sure how to work with symmetry here...- Overrides:
initializeReader
in classAtomSetCollectionReader
-
finalizeSubclassReader
Set final auxiliary info and symmetry, including "fileHeader", "magresUnits", and "interactionTensors"; note that print getProperty("auxiliaryInfo.models[1].magresUnits") should return a catalog of tensor types.- Overrides:
finalizeSubclassReader
in classAtomSetCollectionReader
- Throws:
Exception
-
checkLine
Valid blocks include [calculation] [atoms] [magres]; all magres entries must be prefaced with a corresponding unit; Use of < > instead of [ ] is allowed.- Overrides:
checkLine
in classAtomSetCollectionReader
- Returns:
- true to read another line (some readers return false because they have over-read a line)
- Throws:
Exception
-
trimLine
private boolean trimLine()All characters after hash ignored; lines are trimmed.- Returns:
- true if line has content
-
checkBlock
private int checkBlock()looking for tags here.- Returns:
- currentBlock if not a tag or BLOCK_NEW otherwise
-
setUnits
private boolean setUnits(boolean isMagresBlock) catalog units- Parameters:
isMagresBlock
-- Returns:
- true
-
readSymmetry
private boolean readSymmetry()not doing anything with this -- P1 assumed- Returns:
- true
-
readCellParams
- Returns:
- true;
- Throws:
Exception
-
readAtom
private boolean readAtom()Allowing for BOHR units here; probably unnecessary.- Returns:
- true
-
getAtomName
combine name and index- Parameters:
name
-index
-- Returns:
- name_index
-
readTensor
Read a tensor line. Note that a corresponding unit line must have appeared first.- Returns:
- true;
- Throws:
Exception
-