Class CifReader

All Implemented Interfaces:
GenericLineReader
Direct Known Subclasses:
Cif2Reader, MMCifReader

public class CifReader extends AtomSetCollectionReader
A true line-free CIF file reader for CIF files. Subclasses of CIF -- mmCIF/PDBx (pre-initialized) and msCIF (initialized here) Note that a file can be a PDB file without being Added nonstandard mCIF (magnetic_ tags) 5/2/2014 note that PRELIM keys can be removed at some later time

http://www.iucr.org/iucr-top/cif/ http://www.iucr.org/iucr-top/cif/standard/cifstd5.html

Author:
Miguel, Egon, and Bob (hansonr@stolaf.edu) symmetry added by Bob Hanson: setSpaceGroupName() setSymmetryOperator() setUnitCellItem() setFractionalCoordinates() setAtomCoord() applySymmetryAndSetTrajectory()
  • Field Details

    • CELL_TYPE_MAGNETIC_PARENT

      protected static final String CELL_TYPE_MAGNETIC_PARENT
      See Also:
    • CELL_TYPE_MAGNETIC_STANDARD

      protected static final String CELL_TYPE_MAGNETIC_STANDARD
      See Also:
    • useAuthorChainID

      protected boolean useAuthorChainID
    • thisDataSetName

      protected String thisDataSetName
    • lastDataSetName

      protected String lastDataSetName
    • iHaveDesiredModel

      protected boolean iHaveDesiredModel
    • isMMCIF

      protected boolean isMMCIF
    • isLigand

      protected boolean isLigand
    • isMagCIF

      protected boolean isMagCIF
    • skipping

      protected boolean skipping
    • nAtoms

      protected int nAtoms
    • ac

      protected int ac
    • isCourseGrained

      protected boolean isCourseGrained
    • htGroup1

      protected Map<String,String> htGroup1
    • nAtoms0

      protected int nAtoms0
    • modelMap

      public Map<String,Integer> modelMap
    • symops

      public Lst<String> symops
    • pdbID

      protected String pdbID
    • CAT_CELL

      protected static final String CAT_CELL
      See Also:
    • CAT_ATOM_SITES

      protected static final String CAT_ATOM_SITES
      See Also:
    • maxSerial

      protected int maxSerial
    • CAT_ATOM_TYPE

      protected static final String CAT_ATOM_TYPE
      See Also:
    • EMPTY

      protected static final byte EMPTY
      See Also:
    • NONE

      protected static final byte NONE
      See Also:
    • CAT_ATOM_SITE

      protected static final String CAT_ATOM_SITE
      See Also:
    • isLoop

      protected boolean isLoop
    • firstChar

      protected char firstChar
  • Constructor Details

    • CifReader

      public CifReader()
  • Method Details

    • initializeReader

      public void initializeReader() throws Exception
      Overrides:
      initializeReader in class AtomSetCollectionReader
      Throws:
      Exception
    • initSubclass

      protected void initSubclass()
    • getCifDataParser

      protected GenericCifDataParser getCifDataParser()
    • processSubclassEntry

      protected void processSubclassEntry() throws Exception
      Throws:
      Exception
    • newModel

      protected void newModel(int modelNo) throws Exception
      Throws:
      Exception
    • finalizeSubclassReader

      protected void finalizeSubclassReader() throws Exception
      Overrides:
      finalizeSubclassReader in class AtomSetCollectionReader
      Throws:
      Exception
    • addHeader

      protected void addHeader()
    • finalizeSubclass

      protected boolean finalizeSubclass() throws Exception
      Throws:
      Exception
    • doPreSymmetry

      public void doPreSymmetry() throws Exception
      Overrides:
      doPreSymmetry in class AtomSetCollectionReader
      Throws:
      Exception
    • applySymmetryAndSetTrajectory

      public void applySymmetryAndSetTrajectory() throws Exception
      Overrides:
      applySymmetryAndSetTrajectory in class AtomSetCollectionReader
      Throws:
      Exception
    • finalizeSubclassSymmetry

      protected void finalizeSubclassSymmetry(boolean haveSymmetry) throws Exception
      Overrides:
      finalizeSubclassSymmetry in class AtomSetCollectionReader
      Parameters:
      haveSymmetry -
      Throws:
      Exception
    • nextAtomSet

      protected void nextAtomSet()
    • processCellParameter

      protected void processCellParameter() throws Exception
      unit cell parameters -- two options, so we use MOD 6
      Throws:
      Exception
    • processUnitCellTransformMatrix

      protected void processUnitCellTransformMatrix() throws Exception
      the PDB transformation matrix cartesian --> fractional key and field have been set already
      Throws:
      Exception
    • processLoopBlock

      protected void processLoopBlock() throws Exception
      processes loop_ blocks of interest or skips the data
      Throws:
      Exception
    • processSubclassLoopBlock

      protected boolean processSubclassLoopBlock() throws Exception
      Throws:
      Exception
    • processAtomTypeLoopBlock

      protected boolean processAtomTypeLoopBlock() throws Exception
      reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.
      Returns:
      true; for convenience only in switch statements
      Throws:
      Exception
    • fieldProperty

      protected int fieldProperty(int col)
    • parseCartesianField

      protected float parseCartesianField()
    • addCifAtom

      protected boolean addCifAtom(Atom atom, String id, String componentId, String strChain)
    • checkPDBModelField

      protected int checkPDBModelField(int modelField, int currentModelNo) throws Exception
      Parameters:
      modelField -
      currentModelNo -
      Returns:
      new currentModelNo
      Throws:
      Exception
    • processSubclassAtom

      protected boolean processSubclassAtom(Atom atom, String assemblyId, String strChain)
      Parameters:
      atom -
      assemblyId -
      strChain -
      Returns:
      true if valid atom
    • filterCIFAtom

      protected boolean filterCIFAtom(Atom atom, String componentId)
    • processCitationListBlock

      protected void processCitationListBlock() throws Exception
      Throws:
      Exception
    • getBondOrder

      public int getBondOrder(String field)
    • checkSubclassSymmetry

      protected boolean checkSubclassSymmetry()
    • checkAllFieldsPresent

      protected boolean checkAllFieldsPresent(String[] keys, int lastKey, boolean critical)
    • isNull

      protected boolean isNull(String key)
    • skipLoop

      protected void skipLoop(boolean doReport) throws Exception
      Throws:
      Exception
    • fullTrim

      public static String fullTrim(Object s)
    • isFieldValid

      protected boolean isFieldValid()
    • parseIntField

      protected int parseIntField()
    • parseFloatField

      protected float parseFloatField()
    • parseLoopParameters

      protected void parseLoopParameters(String[] fieldNames) throws Exception
      sets up arrays and variables for tokenizer.getData() after the first tag of the loop has been checked.
      Parameters:
      fieldNames -
      Throws:
      Exception
    • getFieldString

      protected String getFieldString(byte type)
    • skipLoopKeyword

      protected void skipLoopKeyword()
    • isLoopKey

      protected boolean isLoopKey()
    • getFloatColumnData

      protected float getFloatColumnData(int i)