ShelxReader
Date: 2019-10-22

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 and Description
    --- | ---
    `private boolean` | `isCmdf`
    `private java.lang.String[]` | `sfacElementSymbols`
    `private static java.lang.String[]` | `supportedRecordTypes`
    `(package private) java.lang.String[]` | `tokens`
    `private static java.lang.String` | `unsupportedRecordTypes`

    - ### 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, 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, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShelxReader()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `assumeAtomRecord()`
    `private void` | `cell()`
    `protected boolean` | `checkLine()`
    `private java.lang.String` | `getSymbol(java.lang.String sym)`
    `void` | `initializeReader()`
    `static boolean` | `isValidElementSymbolNoCaseSecondChar(java.lang.String str)`
    `private void` | `parseLattRecord()`
    `private void` | `parseSfacCoefficients(java.lang.String[] sfacTokens)`
    `private void` | `parseSfacElementSymbols(java.lang.String[] sfacTokens)`
    `private void` | `parseSfacRecord()`
    `private void` | `parseSymmRecord()`
    `private void` | `processCmdfAtoms()`
    `private void` | `processSupportedRecord(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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

  - ### Constructor Detail

    - #### ShelxReader

          public ShelxReader()

  - ### Method Detail

    - #### initializeReader

          public void initializeReader()

      Overrides:
        `initializeReader` in class `AtomSetCollectionReader`

    - #### checkLine

          protected boolean checkLine()
                               throws java.lang.Exception

      Overrides:
        `checkLine` in class `AtomSetCollectionReader`
      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)