# `topology`

Parser for topology XML files.

Code author: Nathan Baker

Code author: Yong Huang

pdb2pqr.topology.TOPOLOGYPATH = 'TOPOLOGY.xml'

  File name of topology XML data

class pdb2pqr.topology.Topology(topology_file)

  Contains the structured definitions of residue reference coordinates as well as alternate titration, conformer, and tautomer states.

  __init__(topology_file)

    Initialize object.

    Parameters:

      topology_file (file-like object) – topology file object ready for reading

class pdb2pqr.topology.TopologyAtom(parent)

  A class for atom topology information.

  __init__(parent)

    Initialize with an upper-level class that contains an atom array.

    For example, initialize with `TopologyReference` or `TopologyConformerAddition`

    Parameters:

      parent – parent object with atom array

class pdb2pqr.topology.TopologyConformer(topology_tautomer)

  A class for topology conformer information.

  __init__(topology_tautomer)

    Initialize object.

    Parameters:

      topology_tautomer (TopologyTautomer) – tautomer for which to evaluate conformers

class pdb2pqr.topology.TopologyConformerAdd(topology_conformer)

  A class for adding atoms to a conformer.

  __init__(topology_conformer)

    Initialize object.

    Parameters:

      topology_conformer (TopologyConformer) – conformer to which to add atoms

class pdb2pqr.topology.TopologyConformerRemove(topology_conformer)

  A class for removing atoms from a conformer.

  __init__(topology_conformer)

    Initialize object.

    Parameters:

      topology_conformer (TopologyConformer) – conformer to which to add atoms

class pdb2pqr.topology.TopologyDihedral(parent)

  A class for dihedral angle topology information.

  __init__(parent)

    Initialize with a parent that has a dihedral list.

    Parameters:

      parent – parent object with a dihedral list

class pdb2pqr.topology.TopologyHandler

  Handler for XML-based topology files.

  Assumes the following hierarchy of tags:

  - topology

    - residue

      - reference

      - titrationstate

        - tautomer

          - conformer

  __init__()
  characters(text)

    Parse characters in topology XML file.

    Parameters:

      text (str) – XML character data

  endElement(tag_name)

    End parsing element.

    Parameters:

      tag_name (str) – name of XML element tag for which to end parsing

  startElement(tag_name, _)

    Start element parsing.

    Parameters:

      tag_name (str) – name of XML element tag to start parsing

class pdb2pqr.topology.TopologyReference(topology_residue)

  A class for the reference structure of a residue.

  __init__(topology_residue)

    Initialize object.

    Parameters:

      topology_residue (TopologyResidue) – reference residue

class pdb2pqr.topology.TopologyResidue(topology_)

  A class for residue topology information.

  __init__(topology_)

    Initialize with a Topology object.

    Parameters:

      topology – topology object

class pdb2pqr.topology.TopologyTautomer(topology_titration_state)

  A class for topology tautomer information.

  __init__(topology_titration_state)

    Initialize object.

    Parameters:

      topology_titration_state (TopologyTitrationState) – titration state of this residue

class pdb2pqr.topology.TopologyTitrationState(topology_residue)

  A class for the titration state of a residue.

  __init__(topology_residue)

    Initialize object.

    Parameters:

      topology_residue (TopologyResidue) – residue topology