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

      • 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)