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 String[]sfacElementSymbolsprivate static String[]supportedRecordTypes(package private) String[]tokensprivate static StringunsupportedRecordTypes-
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allow_a_len_1, 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, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, modDim, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, 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 StringgetSymbol(String sym)voidinitializeReader()static booleanisValidElementSymbolNoCaseSecondChar(String str)private voidparseLattRecord()private voidparseSfacCoefficients(String[] sfacTokens)private voidparseSfacElementSymbols(String[] sfacTokens)private voidparseSfacRecord()private voidparseSymmRecord()private voidprocessCmdfAtoms()private voidprocessSupportedRecord(int recordIndex)-
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, 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, 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 String[] sfacElementSymbols
-
isCmdf
private boolean isCmdf
-
tokens
String[] tokens
-
unsupportedRecordTypes
private static final String unsupportedRecordTypes
- See Also:
- Constant Field Values
-
supportedRecordTypes
private static final String[] supportedRecordTypes
-
-
Method Detail
-
initializeReader
public void initializeReader()
- Overrides:
initializeReaderin classAtomSetCollectionReader
-
checkLine
protected boolean checkLine() throws Exception- Overrides:
checkLinein classAtomSetCollectionReader- Returns:
- true if need to read new line
- Throws:
Exception
-
processSupportedRecord
private void processSupportedRecord(int recordIndex) throws Exception- Throws:
Exception
-
parseSfacRecord
private void parseSfacRecord()
-
parseSfacElementSymbols
private void parseSfacElementSymbols(String[] sfacTokens)
-
parseSfacCoefficients
private void parseSfacCoefficients(String[] sfacTokens)
-
isValidElementSymbolNoCaseSecondChar
public static boolean isValidElementSymbolNoCaseSecondChar(String str)
-
-