bond_type#
- biotite.structure.info.bond_type(res_name, atom_name1, atom_name2)[source]#
Get the
BondTypefor 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
BondTypeof 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(repr(bond_type("PHE", "CA", "CB"))) <BondType.SINGLE: 1> >>> print(repr(bond_type("PHE", "CG", "CD1"))) <BondType.AROMATIC_DOUBLE: 6> >>> print(repr(bond_type("PHE", "CA", "CG"))) None >>> print(repr(bond_type("PHE", "FOO", "BAR"))) None