biotite.structure.hbond

biotite.structure.hbond(atoms, selection1=None, selection2=None, selection1_type='both', cutoff_dist=2.5, cutoff_angle=120, donor_elements=('O', 'N', 'S'), acceptor_elements=('O', 'N', 'S'), periodic=False)[source]

Find hydrogen bonds in a structure using the Baker-Hubbard algorithm. 1

This function identifies hydrogen bonds based on the bond angle \(\theta\) and the bond distance \(d_{H,A}\). The default criteria is \(\theta > 120^{\circ}\) and \(d_{H,A} \le 2.5 \mathring{A}\). Consequently, the given structure must contain hydrogen atoms. Otherwise, no hydrogen bonds will be found.

Parameters
atomsAtomArray or AtomArrayStack

The atoms to find hydrogen bonds in.

selection1, selection2: ndarray or None

Boolean mask for atoms to limit the hydrogen bond search to specific sections of the model. The shape must match the shape of the atoms argument. If None is given, the whole atoms stack is used instead. (Default: None)

selection1_type: {‘acceptor’, ‘donor’, ‘both’}, optional (default: ‘both’)

Determines the type of selection1. The type of selection2 is chosen accordingly (‘both’ or the opposite). (Default: ‘both’)

cutoff_distfloat, optional

The maximal distance between the hydrogen and acceptor to be considered a hydrogen bond. (Default: 2.5)

cutoff_anglefloat, optional

The angle cutoff in degree between Donor-H..Acceptor to be considered a hydrogen bond (default: 120).

donor_elements, acceptor_elements: tuple of str

Elements to be considered as possible donors or acceptors (Default: O, N, S).

periodicbool, optional

If true, hydrogen bonds can also be detected in periodic boundary conditions. The box attribute of atoms is required in this case. (Default: False).

Returns
tripletsndarray, dtype=int, shape=(n,3)

n x 3 matrix containing the indices of every Donor-H..Acceptor interaction that is available in any of the models. n is the number of found interactions. The three matrix columns are D_index, H_index, A_index. If only one model (AtomArray) is given, triplets contains all of its hydrogen bonds.

maskndarry, dtype=bool, shape=(m,n)

m x n matrix that shows if an interaction with index n in triplets is present in the model m of the input atoms. Only returned if atoms is an AtomArrayStack.

See also

hbond_frequency

Notes

The result of this function may include false positives: Only the chemical elements and the bond geometry is checked. However, there are some cases where a hydrogen bond is still not reasonable. For example, a nitrogen atom with positive charge could be considered as acceptor atom by this method, although this does make sense from a chemical perspective.

References

1

E. N. Baker, R. E. Hubbard, “Hydrogen bonding in globular proteins,” Progress in Biophysics and Molecular Biology, vol. 44, pp. 97–179, January 1984. doi: 10.1016/0079-6107(84)90007-5

Examples

Calculate the total number of hydrogen bonds found in each model:

>>> triplets, mask = hbond(atom_array_stack)
>>> hbonds_per_model = np.count_nonzero(mask, axis=1)
>>> print(hbonds_per_model)
[14 14 14 12 11 12  9 13  9 14 13 13 14 11 11 12 11 14 14 13 14 13 15 17
 14 12 15 12 12 13 13 13 12 12 11 14 10 11]

Get hydrogen bond donors of third model:

>>> # Third model -> index 2
>>> triplets = triplets[mask[2,:]]
>>> # First column contains donors
>>> print(atom_array_stack[2, triplets[:,0]])
    A       5  GLN N      N        -5.009   -0.575   -1.365
    A       6  TRP N      N        -2.154   -0.497   -1.588
    A       7  LEU N      N        -1.520   -1.904    0.893
    A       8  LYS N      N        -2.716   -4.413    0.176
    A       8  LYS NZ     N        -6.352   -4.311   -4.482
    A       9  ASP N      N        -0.694   -5.301   -1.644
    A      11  GLY N      N         2.142   -4.244    1.916
    A      10  GLY N      N         1.135   -6.232    0.250
    A      14  SER OG     O         4.689   -5.759   -2.390
    A      13  SER N      N         6.424   -5.220    3.257
    A      14  SER N      N         6.424   -5.506    0.464
    A      15  GLY N      N         8.320   -3.632   -0.318
    A      16  ARG N      N         8.043   -1.206   -1.866
    A       6  TRP NE1    N         3.420    0.332   -0.121