biotite.structure.rmsf

biotite.structure.rmsf(reference, subject)[source]

Calculate the RMSF between two structures.

The root-mean-square-fluctuation (RMSF) indicates the positional deviation of a structure to a reference structure, averaged over all models. Usually the reference structure, is the average over all models. The RMSF is defined as:

\[RMSF(i) = \sqrt{ \frac{1}{T} \sum\limits_{t=1}^T (x_i(t) - x_{ref,i}(t))^2}\]
Parameters
referenceAtomArray or ndarray, dtype=float, shape=(n,3)

The reference structure. Alternatively, coordinates can be provided directly as ndarray.

subjectAtomArrayStack or ndarray, dtype=float, shape=(m,n,3)

Structures to be compared with reference. The time t is represented by the models in the AtomArrayStack. Alternatively, coordinates can be provided directly as ndarray.

Returns
rmsfndarray, dtype=float, shape=(n,)

RMSF between subject and reference structure. Each element gives the RMSF for the atom at the respective index.

See also

rmsd

Notes

This function does not superimpose the subject to its reference. In most cases superimpose() should be called prior to this function.

Examples

Calculate the \(C_\alpha\) RMSF of all models to the average model:

>>> ca = atom_array_stack[:, atom_array_stack.atom_name == "CA"]
>>> ca_average = average(ca)
>>> ca, _ = superimpose(ca_average, ca)
>>> print(rmsf(ca_average, ca))
[1.372 0.360 0.265 0.261 0.288 0.204 0.196 0.306 0.353 0.238 0.266 0.317
 0.358 0.448 0.586 0.369 0.332 0.396 0.410 0.968]