rmsd_vs_time

Calculate the Root Mean Square Deviation (RMSD) between a reference frame and all other frames in the trajectory.

Todo

  • Implement a “superposition” functionality like in MDAnalysis.analysis.rms.rmsd().

  • Provide an option to make broken compounds whole before calculating their centers. Currently, making compounds whole is only possible by first wrapping the trajectory and then making the compounds whole. However, for calculating a time-dependent RMSD, an unwrapped trajectory might be desired.

Take a structure from a reference frame and calculate the RMSD to its configuration in all other frames in the trajectory. This generates an RMSD as function of time.

Options

-f

Trajectory file. See supported coordinate formats of MDAnalysis.

-s

Topology file. See supported topology formats of MDAnalysis.

-o

Output filename.

-b

First frame to read from the trajectory. Frame numbering starts at zero. Default: 0.

-e

Last frame to read from the trajectory. This is exclusive, i.e. the last frame read is actually END - 1. A value of -1 means to read the very last frame. Default: -1.

--every

Read every n-th frame from the trajectory. Default: 1.

--ref-frame

Frame from which to take the reference structure. None means take the same frame as given by -b. Default: None.

--sel

Selection string to select a group of atoms for which to calculate the RMSD as function of time. See MDAnalysis’ selection syntax for possible choices.

--cmp

{‘group’, ‘segments’, ‘residues’, ‘molecules’, ‘fragments’, ‘atoms’}

The compounds of the selection group to use for the RMSD calculation. Compounds can be ‘group’ (the entire selection group), ‘segments’, ‘residues’, ‘molecules’, ‘fragments’, or ‘atoms’. Refer to the MDAnalysis’ user guide for an explanation of these terms. Note that in any case, even if CMP is e.g. ‘residues’, only the atoms belonging to the selection group are taken into account, even if the compound might comprise additional atoms that are not contained in the selection group. If COMPOUND is something different than 'atoms', the RMSD will be calculated between the centers of the compounds as given by --center. Note that broken compounds are not made whole before calculating their centers, so be sure to provide a trajectory with whole compounds if you want to calculate the RMSD between compound centers. This decision was made, because currently compounds can only be made whole when wrapping the trajectory beforehand. However, for calculating a time-dependent RMSD, an unwrapped trajectory might be desired. Default: 'atoms'.

--center

{‘cog’, ‘com’, ‘coc’}

The center of the compounds to use for the RMSD calculation.

  • 'cog': Center of geometry

  • 'com': Center of mass

  • 'coc': Center of charge

Note that MDAnalysis always guesses atom masses from the atom types, even if the input file contains the masses. Default: 'cog'.

--weights

{‘mass’, ‘charge’}

Weights to use for calculating the RMSD. If None, all compounds are assumed to have a weight equal to one. Weights must not sum up to zero. Thus, you cannot weight atoms by charge in a charge neutral selection. Default: None.

--center-pos

Shift the reference and candidate positions by their (weighted) center, respectively, before calculating the RMSD.

--mic

Take the minimum image convention into account when calculating the RMSD. This works also with unwrapped trajectories. The box dimensions are taken from the reference frame. Note that this might not be desireable in simulations where the box size changes (like in NpT simulations).

--debug

Run in debug mode.

See also

scripts.structure.rmsd_trj_trj()

Calculate the RMSD between two trajectories for each frame.

mdtools.structure.rmsd()

The underlying function that is called by this script.

Notes

TODO

Examples

TODO