connect_via_distances#

biotite.structure.connect_via_distances(atoms: AtomArray[N], distance_range: Mapping[tuple[str, str], tuple[float, float]] | None = None, tolerance: float = 0.4, inter_residue: bool = True, default_bond_type: BondType = BondType.ANY, periodic: bool = False) → BondList[source]#

Create a BondList for a given atom array, based on pairwise atom distances.

A BondType.ANY, bond is created for two atoms within the same residue, if the distance between them does not exceed the sum of their covalent radii [1] plus the given tolerance. Bonds between two adjacent residues are created for the atoms expected to connect these residues, i.e. 'C' and 'N' for peptides and "O3'" and 'P' for nucleotides.

Parameters:
atomsAtomArray

The structure to create the BondList for.

distance_rangedict of tuple(str, str) -> tuple(float, float), optional

Deprecated, has no effect anymore: The distance range is now computed from the covalent radii and tolerance.

tolerancefloat, optional

The tolerance added to the sum of the covalent radii of two atoms to obtain the maximum bond distance.

inter_residuebool, optional

If true, connections between consecutive amino acids and nucleotides are also added.

default_bond_typeBondType or int, optional

By default, all created bonds have BondType.ANY. An alternative BondType can be given in this parameter.

periodicbool, optional

If set to true, bonds can also be detected in periodic boundary conditions. The box attribute of atoms is required in this case.

Returns:
BondList

The created bond list. It only contains connectivity information, i.e. each bond has the BondType.ANY type.

See also

connect_via_residue_names

Connect atoms based on their residue names, which is more accurate when the molecule is part of the Chemical Component Dictionary (CCD).

infer_bond_types

Infer proper bond types for the created bonds afterwards.

Notes

A bond is created between two atoms, if their distance \(D\) fulfills

\[D \leq r_1 + r_2 + t,\]

where \(r_1\) and \(r_2\) are the covalent radii of the two atoms and \(t\) is the given tolerance. Covalent radii are taken from [1], where the radius for \(sp^3\) carbon is used for carbon atoms and the low-spin radius is used for manganese, iron and cobalt.

This method might miss bonds, if the bond distance is unexpectedly high, or it might create false bonds, if two atoms within a residue are accidentally in the right distance. The latter is typically the case for metal atoms in clusters, e.g. iron-sulfur clusters, as their distance to each other is within the covalent range. A more accurate method for determining bonds is connect_via_residue_names(), if residue names from the Chemical Component Dictionary are used.

References