Class TopoCifParser

java.lang.Object
org.jmol.adapter.readers.cif.TopoCifParser

public class TopoCifParser extends Object
see https://github.com/COMCIFS/TopoCif Basic idea: We have TLinks, TNodes, and TAtoms TLinks each have two TNodes and may also be associated with bridging TAtom sets. TNode extends TAtom and may also maintain a list of TAtoms. TAtoms extend Atom and may have symmetry aspects.
Author:
Bob Hanson hansonr@stolaf.edu 2020.11.17 2021.05.07
  • Field Details

  • Constructor Details

    • TopoCifParser

      public TopoCifParser()
  • Method Details

    • setReader

      public TopoCifParser setReader(CifReader reader)
      filter "TOPOS_TYPES=hb" will only load hydrogen bonds; options include v, vw, and hb
    • ProcessRecord

      public void ProcessRecord(String key, String data) throws Exception
      process _topol_node.id 1
      Throws:
      Exception
    • processBlock

      public boolean processBlock(String key) throws Exception
      Throws:
      Exception
    • finalizeReader

      public boolean finalizeReader() throws Exception
      PRIOR to symmetry application, process all internal symop/translation aspects.
      Throws:
      Exception
    • finalizeSymmetry

      public void finalizeSymmetry(boolean haveSymmetry) throws Exception
      Symmetry has been applied. Identify all of the connected atoms and process the group associations
      Throws:
      Exception
    • getNetByID

      public org.jmol.adapter.readers.cif.TopoCifParser.TNet getNetByID(String id)
      Find or create a net with this netID, giving it a default name "Net"+id
      Parameters:
      id -
      Returns:
      net, never null
    • getAtomFromName

      public Atom getAtomFromName(String atomLabel)
    • getNetFor

      public org.jmol.adapter.readers.cif.TopoCifParser.TNet getNetFor(String id, String label, boolean forceNew)
      Find or create a TNet for this id and label.
      Parameters:
      id - or null
      label - or null
      forceNew - true to create a new net
      Returns:
      a net, or null if not forceNew and not found
    • findNode

      public org.jmol.adapter.readers.cif.TopoCifParser.TNode findNode(String nodeID, int op, P3 trans)
      Called from TLink and TAtom to find a node with the given symmetry.
      Parameters:
      nodeID -
      op - match for linkSymop
      trans - match for linkTrans
      Returns:
      the node, or null if no such node was found