org.jmol.adapter.readers.xtal
Class CrystalReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xtal.CrystalReader
public class CrystalReader
- extends AtomSetCollectionReader
http://www.crystal.unito.it/
- Version:
- 1.4
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
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
addVibrations, ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, continuing, desiredModelNumber, desiredVibrationNumber, doApplySymmetry, doCheckUnitCell, doProcessLines, filter, getHeader, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveSymmetryOperators, iHaveUnitCell, isSequential, isTrajectory, latticeCells, line, matUnitCellOrientation, modelNumber, next, notionalUnitCell, os, prevline, ptLine, reader, readerName, readMolecularOrbitals, spaceGroup, symmetry, templateAtomCount, vibrationNumber, viewer |
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, applySymmetryAndSetTrajectory, checkFilter, checkLastModel, checkLineForScript, checkLineForScript, clearLatticeParameters, cloneLastAtomSet, discardLines, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, fillDataBlock, fillDataBlock, fillFloatArray, fillFrequencyData, filterAtom, getElementSymbol, getFortranFormatLengths, getStrings, getSymmetry, getTokens, getTokens, getTokens, getTokensFloat, initializeSymmetry, isLastModel, newAtomSet, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseStringInfestedFloatArray, parseToken, parseToken, parseToken, parseTokenNext, parseTrimmed, parseTrimmed, readAtomSetCollectionFromDOM, readData, readLine, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setMOData, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isVersion3
private boolean isVersion3
isPrimitive
private boolean isPrimitive
isPolymer
private boolean isPolymer
isSlab
private boolean isSlab
isMolecular
private boolean isMolecular
haveCharges
private boolean haveCharges
isFreqCalc
private boolean isFreqCalc
inputOnly
private boolean inputOnly
isLongMode
private boolean isLongMode
getLastConventional
private boolean getLastConventional
havePrimitiveMapping
private boolean havePrimitiveMapping
atomCount
private int atomCount
atomIndexLast
private int atomIndexLast
atomFrag
private int[] atomFrag
primitiveToIndex
private int[] primitiveToIndex
nuclearCharges
private float[] nuclearCharges
vInputCoords
private List vInputCoords
energy
private Double energy
ptOriginShift
private Point3f ptOriginShift
primitiveToCryst
private Matrix3f primitiveToCryst
directLatticeVectors
private Vector3f[] directLatticeVectors
CrystalReader
public CrystalReader()
initializeReader
protected void initializeReader()
throws Exception
- Overrides:
initializeReader
in class AtomSetCollectionReader
- Throws:
Exception
checkLine
protected boolean checkLine()
throws Exception
- Overrides:
checkLine
in class AtomSetCollectionReader
- Returns:
- true if need to read new line
- Throws:
Exception
finalizeReader
protected void finalizeReader()
throws Exception
- Overrides:
finalizeReader
in class AtomSetCollectionReader
- Throws:
Exception
setDirect
private boolean setDirect()
throws Exception
- Throws:
Exception
getPoint3f
private Vector3f getPoint3f(float[] f,
int pt)
throws Exception
- Throws:
Exception
readTransformationMatrix
private void readTransformationMatrix()
throws Exception
- Throws:
Exception
readShift
private boolean readShift()
fraction
private float fraction(String f)
readGradient
private boolean readGradient()
throws Exception
- Throws:
Exception
readVolumePrimCell
private boolean readVolumePrimCell()
readSpins
private boolean readSpins()
throws Exception
- Throws:
Exception
readMagneticMoments
private boolean readMagneticMoments()
throws Exception
- Throws:
Exception
setData
private void setData(String name,
String data,
int pt,
int dp)
throws Exception
- Throws:
Exception
readHeader
private boolean readHeader()
throws Exception
- Throws:
Exception
readCellParams
private void readCellParams(boolean isNewSet)
throws Exception
- Throws:
Exception
readPrimitiveMapping
private boolean readPrimitiveMapping()
throws Exception
- create arrays that maps primitive atoms to conventional atoms
in a 1:1 fashion. Creates:
int[] primitiveToIndex -- points to model-based atomIndex
- Returns:
- TRUE
- Throws:
Exception
readFractionalCoords
private boolean readFractionalCoords()
throws Exception
- Throws:
Exception
getAtomName
private String getAtomName(String s)
getAtomicNumber
private int getAtomicNumber(String token)
readCrystallographicCoords
private void readCrystallographicCoords()
throws Exception
- Throws:
Exception
processInputCoords
private void processInputCoords()
throws Exception
- Throws:
Exception
newAtomSet
private void newAtomSet()
throws Exception
- Throws:
Exception
readEnergy
private void readEnergy()
setEnergy
private void setEnergy()
readPartialCharges
private boolean readPartialCharges()
throws Exception
- Throws:
Exception
readTotalAtomicCharges
private boolean readTotalAtomicCharges()
throws Exception
- Throws:
Exception
getAtomIndexFromPrimitiveIndex
private int getAtomIndexFromPrimitiveIndex(int iPrim)
readFragments
private boolean readFragments()
throws Exception
- Throws:
Exception
readFrequencies
private boolean readFrequencies()
throws Exception
- Throws:
Exception
setFreqValue
private void setFreqValue(float freq,
String[] data)