biotite.structure.info.bond_type

biotite.structure.info.bond_type(res_name, atom_name1, atom_name2)[source]

Get the BondType for two atoms of the same residue, based on the PDB chemical components dictionary.

Parameters
res_namestr

The up to 3-letter name of the residue atom_name1 and atom_name2 belong to.

atom_name1, atom_name2str

The names of the two atoms to get the bond order from.

Returns
orderBondType or None

The BondType of the bond between atom_name1 and atom_name2. If the atoms form no bond, if any of the two atoms does not exist in the context of the residue or if the residue is unknown to the chemical components dictionary, None is returned.

Examples

>>> print(bond_type("PHE", "CA", "CB"))
BondType.SINGLE
>>> print(bond_type("PHE", "CG", "CD1"))
BondType.AROMATIC_DOUBLE
>>> print(bond_type("PHE", "CA", "CG"))
None
>>> print(bond_type("PHE", "FOO", "BAR"))
None