Get donor atoms#
Identifying hydrogen bond donor pairs (heavy atom and bonded hydrogen).
The function molsysmt.interactions.hbonds.get_donor_atoms() detects donor heavy atoms along with their covalently bonded hydrogen atoms for hydrogen-bond geometric analysis. Each row retains one actual covalent pair. Rows are sorted by donor and then hydrogen index; interleaved atom indices do not change which hydrogen belongs to a donor.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function: molsysmt.interactions.hbonds.get_donor_atoms().
Basic usage#
Let’s identify hydrogen bond donor pairs in a protein system:
import molsysmt as msm
molsys = msm.convert(msm.systems['chicken villin HP35']['chicken_villin_HP35.h5msm'])
Note
Demo Systems Catalog
This tutorial uses demonstration datasets provided by MolSysMT. To explore the full catalog of bundled systems, forms, and file paths, visit the Demo Systems guide.
We inspect the built-in default inclusion and exclusion rules for hydrogen bond donors:
print('Default donor inclusion rules:', msm.interactions.hbonds.donor_inclusion_rules)
print('Default donor exclusion rules:', msm.interactions.hbonds.donor_exclusion_rules)
Default donor inclusion rules: ["(atom_type=='O') bonded to (atom_type=='H')", "(atom_type=='N') bonded to (atom_type=='H')"]
Default donor exclusion rules: ["(atom_name=='NE2') not bonded to (atom_type=='H')", "(atom_name=='ND1') not bonded to (atom_type=='H')"]
We detect donor pairs for the first three residues (group_index in [1, 2, 3]):
donor_pairs = msm.interactions.hbonds.get_donor_atoms(molsys, selection='group_index==[1, 2, 3]')
print('Donor pairs (heavy_atom, bonded_H):\n', donor_pairs)
Donor pairs (heavy_atom, bonded_H):
[[ 6 7]
[23 24]
[42 43]
[51 52]]
Inspecting donor atom metadata#
We inspect the heavy atoms (column 0) and bonded hydrogens (column 1) comprising the detected donor pairs:
heavy_donors = donor_pairs[:, 0]
bonded_hydrogens = donor_pairs[:, 1]
print('Heavy donor atoms:')
msm.info(molsys, element='atom', selection=heavy_donors)
Heavy donor atoms:
| index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 6 | 7 | N | N | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 23 | 24 | N | N | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 42 | 43 | N | N | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 51 | 52 | OG | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
Custom inclusion and exclusion rules#
Custom donor rules allow focusing exclusively on backbone amide donors or specific residue types:
backbone_donors = msm.interactions.hbonds.get_donor_atoms(molsys, selection='group_index==[1, 2, 3]',
inclusion_rules="atom_name=='N'")
msm.info(molsys, element='atom', selection=backbone_donors[:, 0])
| index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 6 | 7 | N | N | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 23 | 24 | N | N | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 42 | 43 | N | N | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
| 51 | 52 | OG | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
See also
Related Tools & References
Get acceptor atoms: Identify hydrogen bond acceptor atoms with
molsysmt.interactions.hbonds.get_acceptor_atoms().Get Buch hydrogen bonds: Detect hydrogen bonds via Buch criteria with
molsysmt.interactions.hbonds.get_buch_hbonds().Get Luzar-Chandler hydrogen bonds: Detect hydrogen bonds via Luzar-Chandler criteria with
molsysmt.interactions.hbonds.get_luzard_chandler_hbonds().