%load_ext autoreload
%autoreload 2
import molsysmt as msm

Get bonded atom pairs#

In construction.

msm.element.group.get_bonded_atom_pairs('NH4', ['N', 'HN1', 'HN2', 'HN3', 'HN4'])
[[0, 1], [0, 2], [0, 3], [0, 4]]
msm.element.group.get_bonded_atom_pairs('NH4', ['N', 'HN1', 'HN2', 'HN3', 'HN4'],
                                        atom_indices=[10,11,12,13,14])
[[10, 11], [10, 12], [10, 13], [10, 14]]
atom_names = ['N','CA','C','O','CB','CG','ND1','CD2','CE1','NE2','OXT']
msm.element.group.get_bonded_atom_pairs('HIS', atom_names)
[[0, 1],
 [1, 2],
 [1, 4],
 [2, 3],
 [2, 10],
 [4, 5],
 [5, 6],
 [5, 7],
 [6, 8],
 [7, 9],
 [8, 9]]
atom_names = ['N','CA','C','O','CB','CG1','CG2','OXT','H','HN2','HA','HB',
              '1HG1','2HG1','3HG1','1HG2','2HG2','3HG2','HXT']
atom_indices = list(range(10, 10+len(atom_names)))
msm.element.group.amino_acid.get_bonded_atom_pairs('VAL', atom_names, atom_indices=atom_indices)
[[10, 11],
 [10, 18],
 [10, 19],
 [11, 12],
 [11, 14],
 [11, 20],
 [12, 13],
 [12, 17],
 [14, 15],
 [14, 16],
 [14, 21],
 [15, 22],
 [15, 23],
 [15, 24],
 [16, 25],
 [16, 26],
 [16, 27],
 [17, 28]]