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)[source]

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

__init__(topology_file)[source]

Initialize object.

Parameters:

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

class pdb2pqr.topology.TopologyAtom(parent)[source]

A class for atom topology information.

__init__(parent)[source]

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)[source]

A class for topology conformer information.

__init__(topology_tautomer)[source]

Initialize object.

Parameters:

topology_tautomer (TopologyTautomer) – tautomer for which to evaluate conformers

class pdb2pqr.topology.TopologyConformerAdd(topology_conformer)[source]

A class for adding atoms to a conformer.

__init__(topology_conformer)[source]

Initialize object.

Parameters:

topology_conformer (TopologyConformer) – conformer to which to add atoms

class pdb2pqr.topology.TopologyConformerRemove(topology_conformer)[source]

A class for removing atoms from a conformer.

__init__(topology_conformer)[source]

Initialize object.

Parameters:

topology_conformer (TopologyConformer) – conformer to which to add atoms

class pdb2pqr.topology.TopologyDihedral(parent)[source]

A class for dihedral angle topology information.

__init__(parent)[source]

Initialize with a parent that has a dihedral list.

Parameters:

parent – parent object with a dihedral list

class pdb2pqr.topology.TopologyHandler[source]

Handler for XML-based topology files.

Assumes the following hierarchy of tags:

  • topology

    • residue

      • reference

      • titrationstate

        • tautomer

          • conformer

__init__()[source]
characters(text)[source]

Parse characters in topology XML file.

Parameters:

text (str) – XML character data

endElement(tag_name)[source]

End parsing element.

Parameters:

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

startElement(tag_name, _)[source]

Start element parsing.

Parameters:

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

class pdb2pqr.topology.TopologyReference(topology_residue)[source]

A class for the reference structure of a residue.

__init__(topology_residue)[source]

Initialize object.

Parameters:

topology_residue (TopologyResidue) – reference residue

class pdb2pqr.topology.TopologyResidue(topology_)[source]

A class for residue topology information.

__init__(topology_)[source]

Initialize with a Topology object.

Parameters:

topology – topology object

class pdb2pqr.topology.TopologyTautomer(topology_titration_state)[source]

A class for topology tautomer information.

__init__(topology_titration_state)[source]

Initialize object.

Parameters:

topology_titration_state (TopologyTitrationState) – titration state of this residue

class pdb2pqr.topology.TopologyTitrationState(topology_residue)[source]

A class for the titration state of a residue.

__init__(topology_residue)[source]

Initialize object.

Parameters:

topology_residue (TopologyResidue) – residue topology