biotite.structure.hbond_frequency

biotite.structure.hbond_frequency(mask)[source]

Get the relative frequency of each hydrogen bond in a multi-model structure.

The frequency is the amount of models, where the respective bond exists divided by the total amount of models.

Parameters
mask: ndarray, dtype=bool, shape=(m,n)

Input mask obtained from hbond function.

Returns
ndarray, dtype=Float

For each individual interaction n of the mask, returns the percentage of models m, in which this hydrogen bond is present.

See also

hbond

Examples

>>> triplets, mask = hbond(atom_array_stack)
>>> freq = hbond_frequency(mask)
>>> print(freq)
[0.263 0.289 0.105 0.105 0.237 0.026 0.053 0.395 1.000 1.000 1.000 0.026
 0.421 0.026 0.026 0.316 0.816 0.026 0.921 0.026 0.342 0.026 0.105 0.026
 0.132 0.053 0.026 0.158 0.026 0.868 0.211 0.026 0.921 0.316 0.079 0.237
 0.105 0.421 0.079 0.026 1.000 0.053 0.132 0.026 0.184]