Topology class¶
- class chemfiles.BondOrder(value)¶
Possible bond orders are:
BondOrder.Unknown
: the bond order is not specifiedBondOrder.Single
: bond order for single bondBondOrder.Double
: bond order for double bondBondOrder.Triple
: bond order for triple bondBondOrder.Quadruple
: bond order for quadruple bond (present in some metals)BondOrder.Quintuplet
: bond order for quintuplet bond (present in some metals)BondOrder.Amide
: bond order for amide bondBondOrder.Aromatic
: bond order for aromatic bond
- class chemfiles.Topology¶
A
Topology
contains the definition of all the atoms in the system, and the liaisons between the atoms (bonds, angles, dihedrals, …). It will also contain all the residues information if it is available.Create a new empty
Topology
.- add_bond(i, j, order=None)¶
Add a bond between the atoms at indexes
i
andj
in thisTopology
, optionally setting the bondorder
.
- bonds_order(i, j)¶
Get the bonds order corresponding to the bond between atoms i and j
- clear_bonds()¶
Remove all existing bonds, angles, dihedral angles and improper dihedral angles in this topology.
- remove_bond(i, j)¶
Remove any existing bond between the atoms at indexes
i
andj
in thisTopology
.This function does nothing if there is no bond between
i
andj
.
- residue_for_atom(index)¶
Get read-only access to the
Residue
containing the atom at the givenindex
from thisTopology
; orNone
if the atom is not part of a residue.
- residues_linked(first, second)¶
Check if the two
Residue
first
andsecond
from thisTopology
are linked together, i.e. if there is a bond between one atom in the first residue and one atom in the second one.
- resize(count)¶
Resize this
Topology
to containcount
atoms. If the new number of atoms is bigger than the current number, new atoms will be created with an empty name and type. If it is lower than the current number of atoms, the last atoms will be removed, together with the associated bonds, angles and dihedrals.