bonded_topology

A module containing the BondedTopology class.

The BondedTopology class represents a bonded topology in a molecular topology and is used to store the bonds, angles, dihedrals, impropers, and shake bonds of a molecular system along with their properties.

Summary

Classes:

BondedTopology

A class to represent a bonded topology in a molecular topology.

Reference

class BondedTopology(
bonds: list[Bond] | None = None,
angles: list[Angle] | None = None,
dihedrals: list[Dihedral] | None = None,
impropers: list[Dihedral] | None = None,
shake_bonds: list[Bond] | None = None,
ordering_keys: list[str] | None = None,
)[source]

Bases: TopologyPropertiesMixin

A class to represent a bonded topology in a molecular topology.

It inherits from TopologyPropertiesMixin. A mixin class to add the most common properties of a topology.

Parameters:
  • bonds (List[Bond], optional) – A list of bonds in the bonded topology, by default None.

  • angles (List[Angle], optional) – A list of angles in the bonded topology, by default None.

  • dihedrals (List[Dihedral], optional) – A list of dihedrals in the bonded topology, by default None.

  • impropers (List[Dihedral], optional) – A list of impropers in the bonded topology, by default None.

  • shake_bonds (List[Bond], optional) – A list of shake bonds in the bonded topology, by default None.

  • ordering_keys (List[str], optional) – A list of keys to order the blocks of the bonded topology, when initializing from a file, by default None.

extend_shake_bonds(
shake_bonds: list[Bond],
n_atoms: PositiveInt,
n_extensions: PositiveInt = 1,
n_atoms_per_extension: PositiveInt | None = None,
) None[source]

Extend the shake bonds in the bonded topology.

This function is useful when two or more atomic systems are merged, and the shake bonds need to be extended to the new atoms.

Parameters:
  • shake_bonds (List[Bond]) – A list of shake bonds to extend.

  • n_atoms (PositiveInt) – The number of atoms in the system before the extension.

  • n_extensions (PositiveInt, optional) – The number of extensions to perform, by default 1.

  • n_atoms_per_extension (PositiveInt | None, optional) – The number of atoms in the system after each extension, by default None.

Raises:
  • PQValueError – If n_atoms_per_extension is not provided and n_extensions is not 1.

  • PQValueError – If n_atoms_per_extension is less than the highest index in the provided shake bonds.

property angle_linkers: list[Angle]

The angles that are linkers.

Type:

List[Angle]

property bond_linkers: list[Bond]

The bonds that are linkers.

Type:

List[Bond]

property dihedral_linkers: list[Dihedral]

The dihedrals that are linkers.

Type:

List[Dihedral]

property improper_linkers: list[Dihedral]

The impropers that are linkers.

Type:

List[Dihedral]

logger = <CustomLogger PQAnalysis.BondedTopology (INFO)>
property shake_linkers: list[Bond]

The shake bonds that are linkers.

Type:

List[Bond]

property unique_angle1_indices: set[PositiveInt]

The unique indices of the first atoms in the angles.

Type:

Set[PositiveInt]

property unique_angle2_indices: set[PositiveInt]

The unique indices of the second atoms in the angles.

Type:

Set[PositiveInt]

property unique_angle3_indices: set[PositiveInt]

The unique indices of the third atoms in the angles.

Type:

Set[PositiveInt]

property unique_bond1_indices: set[PositiveInt]

The unique indices of the first atoms in the bonds.

Type:

Set[PositiveInt]

property unique_bond2_indices: set[PositiveInt]

The unique indices of the second atoms in the bonds.

Type:

Set[PositiveInt]

property unique_dihedral1_indices: set[PositiveInt]

The unique indices of the first atoms in the dihedrals.

Type:

Set[PositiveInt]

property unique_dihedral2_indices: set[PositiveInt]

The unique indices of the second atoms in the dihedrals.

Type:

Set[PositiveInt]

property unique_dihedral3_indices: set[PositiveInt]

The unique indices of the third atoms in the dihedrals.

Type:

Set[PositiveInt]

property unique_dihedral4_indices: set[PositiveInt]

The unique indices of the fourth atoms in the dihedrals.

Type:

Set[PositiveInt]

property unique_improper1_indices: set[PositiveInt]

The unique indices of the first atoms in the impropers.

Type:

Set[PositiveInt]

property unique_improper2_indices: set[PositiveInt]

The unique indices of the second atoms in the impropers.

Type:

Set[PositiveInt]

property unique_improper3_indices: set[PositiveInt]

The unique indices of the third atoms in the impropers.

Type:

Set[PositiveInt]

property unique_improper4_indices: set[PositiveInt]

The unique indices of the fourth atoms in the impropers.

Type:

Set[PositiveInt]

property unique_shake_indices: set[PositiveInt]

The unique indices of the atoms in the shake bonds.

Type:

Set[PositiveInt]

property unique_shake_target_indices: set[PositiveInt]

The unique indices of the target atoms in the shake bonds.

Type:

Set[PositiveInt]