pestifer.psfutil.psfbond module¶
Definition of the PSFBond and PSFBondList classes for handling bonds in PSF topology files.
These classes are used to represent bonds formed between pairs of atoms in a molecular structure, as defined in PSF files.
The PSFBond class represents a single bond, while the PSFBondList class is a collection of such bonds.
These are descendants of the PSFTopoElement and PSFTopoElementList classes, respectively,
which provide a framework for representing and manipulating generic PSF topology elements
- class pestifer.psfutil.psfbond.PSFBond(idx_list: list[int])[source]¶
Bases:
PSFTopoElementA class representing a bond in a PSF topology file.
- class pestifer.psfutil.psfbond.PSFBondList(input_data, **kwargs)[source]¶
Bases:
PSFTopoElementListA class representing a list of
PSFBondobjects. This class inherits fromPSFTopoElementListand provides methods for managing a collection of bonds in a PSF topology file. It can be initialized from a list of lines or from aPSFTopoElementListobject.- to_graph()[source]¶
Create a
networkx.Graphrepresentation of the bond list, where bonds are edges between atom serial numbers.- Returns:
A networkx graph representing the bond list, with atom serial numbers as nodes and bonds as edges.
- Return type: