- biotite.structure.connect_via_distances(atoms, distance_range=None, atom_mask=None, inter_residue=True, default_bond_type=BondType.ANY, periodic=False)[source]¶
BondListfor a given atom array, based on pairwise atom distances.
BondType.ANY, bond is created for two atoms within the same residue, if the distance between them is within the expected bond distance range. Bonds between two adjacent residues are created for the atoms expected to connect these residues, i.e.
'N'for peptides and
The structure to create the
- distance_rangedict of tuple(str, str) -> tuple(float, float), optional
Custom minimum and maximum bond distances. The dictionary keys are tuples of chemical elements representing the atoms to be potentially bonded. The order of elements within each tuple does not matter. The dictionary values are the minimum and maximum bond distance, respectively, for the given combination of elements. This parameter updates the default dictionary. Hence, the default bond distances for missing element pairs are still taken from the default dictionary. The default bond distances are taken from .
- atom_maskndarray, dtype=bool, shape=(n,), optional
DEPRECATED: This option has no effect.
- 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
BondTypecan 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.
The created bond list.
This method might miss bonds, if the bond distance is unexpectedly high or low, or it might create false bonds, if two atoms within a residue are accidentally in the right distance. A more accurate method for determining bonds is