Package org.jmol.adapter.readers.xtal
Class CrystalReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xtal.CrystalReader
- All Implemented Interfaces:
javajs.api.GenericLineReader
A reader of OUT and OUTP files for CRYSTAL
http://www.crystal.unito.it/
- Version:
- 1.4
special model auxiliaryInfo include:
primitiveToCrystal M3 transforming primitive lattice to conventional
lattice
mat4PrimitiveToCrystal M4 for use in transforming symmetry
operations
mat4CrystalToPrimitive M4 convenience inverse of
mat4PrimitiveToCrystal
fileSymmetryOperations List
symmetry operators (primitive) Drawing primitive unitcell operations: ops = _M.fileSystemOperations DRAW SYMOP @{ops[2]} If using the conventional cell, you can use its operators, or you can limit yourself this primitive subset using: mp2c = _M.mat4PrimitiveToCrystal mc2p = _M.mat4CrystalToPrimitive DRAW SYMOP @{mc2p * ops[2] * mp2c} for a specific model in the set, use load "xxx.out" n as for all readers, where n is an integer > 0 for final optimized geometry use load "xxx.out" 0 (that is, "read the last model") as for all readers for conventional unit cell -- input coordinates only, use load "xxx.out" filter "conventional" to NOT load vibrations, use load "xxx.out" FILTER "novibrations" to load just the input deck exactly as indicated, use load "xxx.out" FILTER "input" now allows reading of frequencies and atomic values with conventional as long as this is not an optimization. - Author:
- Pieremanuele Canepa, Room 104, FM Group School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom, pc229@kent.ac.uk, Bob Hanson hansonr@stolaf.edu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate int[]private intprivate booleanprivate intprivate static final String[]private javajs.util.V3[]private booleanCRYSTAL 17 moves directLatticeVectors before LATTICE PARAMETERSprivate Doubleprivate final float[]private final float[]private Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate javajs.util.Lst<String>private float[]private floatprivate int[]private floatprivate javajs.util.P3private static final int[]private Stringprivate intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate javajs.util.Lst<String>private StringFields 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 booleanaddModel()voidprotected booleanprotected voidoptional reader-specific method run first.private static StringMN33 becomes Mn33private intgetAtomicNumber(String token) private intgetAtomIndexFromPrimitiveIndex(int iPrim) Get the atom index from a primitive index.private voidprivate intgetModelForMode(int i0, int mode) private booleanprotected voidprivate voidprivate voidnewLattice(boolean isConv) private voidNow create atoms from the coordinate lines.private voidrd()filter out unnecessary linesprivate booleanprivate booleanprivate voidRead coordinates, either input or crystallographic, just saving their lines in a vector for now.private booleanFor spin and magnetic moment data, read the data block and save it as property_spin or propert_magneticMoment.private voidSelect only specific atoms for frequency generation.private voidprivate booleanRead minimization measuresprivate booleanprivate voidreadLatticeParams(boolean isPrimitive) Read the lattice parameters.private booleanprivate voidRead transform matrix primitive to conventional.private javajs.util.Lst<String>private voidprivate booleanprivate voidprivate voidsetFreqValue(float freq, String[] data) private voidMethods 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, 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
-
isVersion3
private boolean isVersion3 -
isPolymer
private boolean isPolymer -
isSlab
private boolean isSlab -
haveCharges
private boolean haveCharges -
inputOnly
private boolean inputOnly -
isLongMode
private boolean isLongMode -
getLastConventional
private boolean getLastConventional -
havePrimitiveMapping
private boolean havePrimitiveMapping -
isProperties
private boolean isProperties -
STATE_NONE
private static final int STATE_NONE- See Also:
-
STATE_INPUT
private static final int STATE_INPUT- See Also:
-
STATE_INPUT_FROM
private static final int STATE_INPUT_FROM- See Also:
-
STATE_WAVEFUNCTION
private static final int STATE_WAVEFUNCTION- See Also:
-
STATE_OPT_POINT
private static final int STATE_OPT_POINT- See Also:
-
STATE_OPT_FINAL
private static final int STATE_OPT_FINAL- See Also:
-
STATE_FREQ
private static final int STATE_FREQ- See Also:
-
state
private int state -
ac
private int ac -
atomIndexLast
private int atomIndexLast -
atomFrag
private int[] atomFrag -
primitiveToIndex
private int[] primitiveToIndex -
nuclearCharges
private float[] nuclearCharges -
lstCoords
-
energy
-
ptOriginShift
private javajs.util.P3 ptOriginShift -
directLatticeVectors
private javajs.util.V3[] directLatticeVectors -
spaceGroupName
-
checkModelTrigger
private boolean checkModelTrigger -
fullSymmetry
private boolean fullSymmetry -
htCriticalPoints
-
directLatticeVectorsFirst
private boolean directLatticeVectorsFirstCRYSTAL 17 moves directLatticeVectors before LATTICE PARAMETERS -
cpno
private int cpno -
crtypes
-
symops
-
f14
private final float[] f14 -
f16
private final float[] f16 -
smap
private static final int[] smap -
primitiveVolume
private float primitiveVolume -
primitiveDensity
private float primitiveDensity -
firstLine
-
type
-
-
Constructor Details
-
CrystalReader
public CrystalReader()
-
-
Method Details
-
rd
filter out unnecessary lines- Overrides:
rdin classAtomSetCollectionReader- Throws:
Exception
-
initializeReader
- Overrides:
initializeReaderin classAtomSetCollectionReader- Throws:
Exception
-
checkLine
- Overrides:
checkLinein classAtomSetCollectionReader- Returns:
- true if need to read new line
- Throws:
Exception
-
processNextCriticalPoint
- Throws:
Exception
-
newLattice
- Throws:
Exception
-
addModel
- Throws:
Exception
-
readSymmetryOperators
- Throws:
Exception
-
finalizeSubclassReader
Description copied from class:AtomSetCollectionReaderoptional reader-specific method run first.- Overrides:
finalizeSubclassReaderin classAtomSetCollectionReader- Throws:
Exception
-
getDirect
- Throws:
Exception
-
setUnitCellOrientation
private void setUnitCellOrientation() -
readPrimitiveLatticeVectors
Read transform matrix primitive to conventional.- Throws:
Exception
-
readHeader
- Throws:
Exception
-
readLatticeParams
Read the lattice parameters.- Parameters:
isPrimitive-- Throws:
Exception
-
getAtomIndexFromPrimitiveIndex
private int getAtomIndexFromPrimitiveIndex(int iPrim) Get the atom index from a primitive index. Used for atomic properties and frequency fragments. Note that primitive to conventional is not a 1:1 mapping. We don't consider that.- Parameters:
iPrim-- Returns:
- the original number or the number from the primitive.
-
readAtoms
- Throws:
Exception
-
fixAtomName
MN33 becomes Mn33- Parameters:
s-- Returns:
- fixed atom name
-
getAtomicNumber
-
readCoordLines
Read coordinates, either input or crystallographic, just saving their lines in a vector for now.- Throws:
Exception
-
processCoordLines
Now create atoms from the coordinate lines.- Throws:
Exception
-
applySymmetryAndSetTrajectory
- Overrides:
applySymmetryAndSetTrajectoryin classAtomSetCollectionReader- Throws:
Exception
-
newAtomSet
- Throws:
Exception
-
setEnergy
private void setEnergy() -
readPartialCharges
- Throws:
Exception
-
readTotalAtomicCharges
- Throws:
Exception
-
readFreqFragments
Select only specific atoms for frequency generation. (See freq_6for_001.out)- Throws:
Exception
-
readFrequencies
- Throws:
Exception
-
setFreqValue
-
readRaman
- Throws:
Exception
-
getModelForMode
private int getModelForMode(int i0, int mode) -
readGradient
Read minimization measures- Returns:
- true
- Throws:
Exception
-
readData
For spin and magnetic moment data, read the data block and save it as property_spin or propert_magneticMoment.- Parameters:
name-nfields-- Returns:
- true
- Throws:
Exception
-
getQuadrupoleTensors
- Throws:
Exception
-
readBornChargeTensors
- Throws:
Exception
-