Get bonded atom pairs#

Extracting covalent bond index pairs for a standard amino acid residue.

The function molsysmt.element.group.amino_acid.get_bonded_atom_pairs() computes covalent bond connections among the given atom names.

Added in version 1.0.0.

Basic usage#

Let’s retrieve the bond pairs for alanine:

import molsysmt as msm
atom_names = ['N', 'CA', 'C', 'O', 'CB']
bonds = msm.element.group.amino_acid.get_bonded_atom_pairs('ALA', atom_names)
print('Bond index pairs in ALA backbone + CB:', bonds)
Bond index pairs in ALA backbone + CB: [[0, 1], [1, 2], [1, 4], [2, 3]]