Class MMCifReader

All Implemented Interfaces:
javajs.api.GenericLineReader
Direct Known Subclasses:
MMTFReader

public class MMCifReader extends CifReader
mmCIF files are recognized prior to class creation. Required fields include one of: _entry.id _database_PDB_ _pdbx_ _chem_comp.pdbx_type _audit_author.name _atom_site.
Author:
Bob Hanson (hansonr@stolaf.edu)
  • Field Details

  • Constructor Details

    • MMCifReader

      public MMCifReader()
  • Method Details

    • initSubclass

      protected void initSubclass()
      Overrides:
      initSubclass in class CifReader
    • processSubclassEntry

      protected void processSubclassEntry() throws Exception
      Overrides:
      processSubclassEntry in class CifReader
      Throws:
      Exception
    • processSubclassLoopBlock

      protected boolean processSubclassLoopBlock() throws Exception
      Overrides:
      processSubclassLoopBlock in class CifReader
      Throws:
      Exception
    • sortAssemblyModels

      protected void sortAssemblyModels()
      issue here is that mmCIF assembly atoms can be in different blocks by chain: Model1:Chain1 Model2:Chain1 Model1:Chain2 Model2:Chain2 ... and so assigned to too many atom sets.
    • finalizeSubclass

      protected boolean finalizeSubclass() throws Exception
      Overrides:
      finalizeSubclass in class CifReader
      Throws:
      Exception
    • checkSubclassSymmetry

      protected boolean checkSubclassSymmetry()
      Overrides:
      checkSubclassSymmetry in class CifReader
    • setBonds

      private void setBonds()
      Note that setting bonds from _struct_conn is only done if we have updated CIF files, which include _chem_comp_bond.
    • processBonds

      private void processBonds(javajs.util.Lst<Object[]> cmap, Map<Object,Integer> map, boolean isStructConn)
    • processSequence

      private boolean processSequence() throws Exception
      get canonical 1-letter DNA/RNA sequence code from 3-letter code. For example, "2MG" --> "G"
      Returns:
      true
      Throws:
      Exception
    • processAssemblyGenBlock

      private boolean processAssemblyGenBlock() throws Exception
      Throws:
      Exception
    • addAssembly

      protected void addAssembly(String[] assem) throws Exception
      Throws:
      Exception
    • checkFilterAssembly

      protected void checkFilterAssembly(String id, Map<String,Object> info)
    • decodeAssemblyOperators

      private String decodeAssemblyOperators(String ops)
    • crossBinary

      private String crossBinary(String ops1, String ops2)
    • processStructOperListBlock

      private boolean processStructOperListBlock(boolean isNCS) throws Exception
      Throws:
      Exception
    • addMatrix

      protected void addMatrix(String id, javajs.util.M4 m4, boolean isNCS)
    • processChemCompLoopBlock

      private boolean processChemCompLoopBlock() throws Exception
      a general name definition field. Not all hetero
      Returns:
      true if successful; false to skip
      Throws:
      Exception
    • addHetero

      protected void addHetero(String groupName, String hetName, boolean doCheck, boolean addNote)
    • processStructConfLoopBlock

      private boolean processStructConfLoopBlock() throws Exception
      identifies ranges for HELIX and TURN
      Returns:
      true if successful; false to skip
      Throws:
      Exception
    • addStructure

      private void addStructure(Structure structure)
    • processStructSheetRangeLoopBlock

      private boolean processStructSheetRangeLoopBlock() throws Exception
      identifies sheet ranges
      Returns:
      true if successful; false to skip
      Throws:
      Exception
    • processStructSiteBlock

      private boolean processStructSiteBlock() throws Exception
      identifies structure sites
      Returns:
      true if successful; false to skip
      Throws:
      Exception
    • setBiomolecules

      private void setBiomolecules()
    • setBiomolecule

      private int setBiomolecule(Map<String,Object> biomolecule, javajs.util.BS bsAll)
    • createParticle

      private void createParticle(String id)
    • getOpMatrix

      private javajs.util.M4 getOpMatrix(String ops)
    • processStructConnLoopBlock

      private boolean processStructConnLoopBlock() throws Exception
      Throws:
      Exception
    • processCompBondLoopBlock

      private boolean processCompBondLoopBlock() throws Exception
      Throws:
      Exception
    • processSubclassAtom

      public boolean processSubclassAtom(Atom atom, String assemblyId, String strChain)
      Overrides:
      processSubclassAtom in class CifReader
      Returns:
      true if valid atom
    • checkPDBModelField

      protected int checkPDBModelField(int modelField, int currentModelNo) throws Exception
      Overrides:
      checkPDBModelField in class CifReader
      Returns:
      new currentModelNo
      Throws:
      Exception
    • incrementModel

      protected int incrementModel(int modelNo) throws Exception
      Throws:
      Exception
    • setHetero

      private void setHetero()