# htmd.projections.metricfluctuation module¶

class htmd.projections.metricfluctuation.MetricFluctuation(refmol, atomsel, trajalnstr='protein and name CA', refalnstr=None, centerstr='protein', pbc=True, refpos='mean', groupsel=None)

Creates a MetricFluctuation object that calculates the squared fluctuation of atom positions in trajectories.

Depending on the refpos option the projection either returns the fluctuation from the mean position of the atoms, or from coordinates of reference given in refmol. This means it calculates for atom coordinates (x,y,z) and reference coordinates (xr, yr, yz): (xr-x)**2+(yr-y)**2+(zr-z)**2. If groupsel is set to residue it will calculate the mean of this value over all atoms of the residue. To then get the RMSD you need to compute the square root (of the mean) of the results this projection returns over the desired atoms.

Parameters: refmol (Molecule object) – The reference Molecule to which we will align. atomsel (str) – Atom selection string for the atoms whose fluctuations we want to calculate. See more here trajalnstr (str, optional) – Atom selection string for the trajectories from which to align to the reference structure. See more here refalnstr (str, optional) – Atom selection string for refmol from which to align to the reference structure. If None, it defaults to the same as trajalnstr. See more here centerstr (str, optional) – Atom selection string around which to wrap the simulation. See more here pbc (bool) – Enable or disable coordinate wrapping based on periodic boundary conditions. refpos (str) – Set to ‘mean’ to calculate the fluctuation from the trajectory mean. Set to ‘refmol’ to calculate the fluctuation from the reference structure. groupsel (str or None) – Set to None to get the fluctuation per atom. Set to ‘residue’ to get the mean fluctuation of the residue by grouping all of its atoms given in atomsel metr MetricFluctuation object

Examples

copy()

Produces a deep copy of the object

getMapping(mol)

Returns the description of each projected dimension.

Parameters: mol (Molecule object) – A Molecule object which will be used to calculate the descriptions of the projected dimensions. map – A DataFrame containing the descriptions of each dimension DataFrame object
project(mol)

Project molecule.

Parameters: mol (Molecule) – A Molecule object to project. data – An array containing the projected data. np.ndarray