Package org.jmol.adapter.readers.xtal
Class ShelxReader
- java.lang.Object
-
- org.jmol.adapter.smarter.AtomSetCollectionReader
-
- org.jmol.adapter.readers.xtal.ShelxReader
-
- All Implemented Interfaces:
javajs.api.GenericLineReader
public class ShelxReader extends AtomSetCollectionReader
A reader for SHELX output (RES) files. It does not read all information. The list of fields that is read: TITL, REM, END, CELL, SPGR, SFAC Atom positions and thermal ellipsoids are read.A reader for SHELX files. It currently supports SHELXL.
The SHELX format is described on the net: http://www.msg.ucsf.edu/local/programs/shelxl/ch_07.html. modified by Bob Hanson 2006/04 to allow variant CrystalMaker .cmdf file reading -- but by 2/2010 looks like these ASCII CrystalMaker files aren't used anymore by CrystalMaker, and instead it uses a binary format. CrystalMaker2.2.3 seems to attempt to read the files, but actually cannot. At least not for the file given at http://www.ch.ic.ac.uk/chemime/
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisCmdfprivate java.lang.String[]sfacElementSymbolsprivate static java.lang.String[]supportedRecordTypes(package private) java.lang.String[]tokensprivate static java.lang.StringunsupportedRecordTypes-
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, binaryDoc, bsFilter, bsModels, calculationType, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isSequential, isTrajectory, latticeCells, latticeScaling, line, lstNCS, matUnitCellOrientation, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, ptLine, ptSupercell, reader, readerName, reverseModels, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr
-
-
Constructor Summary
Constructors Constructor Description ShelxReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidassumeAtomRecord()private voidcell()protected booleancheckLine()private java.lang.StringgetSymbol(java.lang.String sym)voidinitializeReader()static booleanisValidElementSymbolNoCaseSecondChar(java.lang.String str)private voidparseLattRecord()private voidparseSfacCoefficients(java.lang.String[] sfacTokens)private voidparseSfacElementSymbols(java.lang.String[] sfacTokens)private voidparseSfacRecord()private voidparseSymmRecord()private voidprocessCmdfAtoms()private voidprocessSupportedRecord(int recordIndex)-
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, doPreSymmetry, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, finalizeSubclassReader, finalizeSubclassSymmetry, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, 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 Detail
-
sfacElementSymbols
private java.lang.String[] sfacElementSymbols
-
isCmdf
private boolean isCmdf
-
tokens
java.lang.String[] tokens
-
unsupportedRecordTypes
private static final java.lang.String unsupportedRecordTypes
- See Also:
- Constant Field Values
-
supportedRecordTypes
private static final java.lang.String[] supportedRecordTypes
-
-
Method Detail
-
initializeReader
public void initializeReader()
- Overrides:
initializeReaderin classAtomSetCollectionReader
-
checkLine
protected boolean checkLine() throws java.lang.Exception- Overrides:
checkLinein classAtomSetCollectionReader- Returns:
- true if need to read new line
- Throws:
java.lang.Exception
-
processSupportedRecord
private void processSupportedRecord(int recordIndex) throws java.lang.Exception- Throws:
java.lang.Exception
-
parseLattRecord
private void parseLattRecord() throws java.lang.Exception- Throws:
java.lang.Exception
-
parseSymmRecord
private void parseSymmRecord() throws java.lang.Exception- Throws:
java.lang.Exception
-
cell
private void cell() throws java.lang.Exception- Throws:
java.lang.Exception
-
parseSfacRecord
private void parseSfacRecord()
-
parseSfacElementSymbols
private void parseSfacElementSymbols(java.lang.String[] sfacTokens)
-
parseSfacCoefficients
private void parseSfacCoefficients(java.lang.String[] sfacTokens)
-
assumeAtomRecord
private void assumeAtomRecord() throws java.lang.Exception- Throws:
java.lang.Exception
-
processCmdfAtoms
private void processCmdfAtoms() throws java.lang.Exception- Throws:
java.lang.Exception
-
getSymbol
private java.lang.String getSymbol(java.lang.String sym)
-
isValidElementSymbolNoCaseSecondChar
public static boolean isValidElementSymbolNoCaseSecondChar(java.lang.String str)
-
-