Get bonded atom pairs#

Extracting standard internal covalent bond connectivity for recognized residues and groups.

The function molsysmt.element.group.get_bonded_atom_pairs() returns standard chemical bond pairs given a group name and a list of present atom names.

Added in version 1.0.0.

Basic usage#

Let’s retrieve the covalent bond topology for an alanine residue:

import molsysmt as msm
atom_names = ['N', 'CA', 'C', 'O', 'CB', 'H', 'HA', 'HB1', 'HB2', 'HB3']
bonds = msm.element.group.get_bonded_atom_pairs('ALA', atom_names)
print('Alanine bonded atom pairs (index pairs):', bonds)
Alanine bonded atom pairs (index pairs): [[0, 1], [0, 5], [1, 2], [1, 4], [1, 6], [2, 3], [4, 7], [4, 8], [4, 9]]