rmsd_trj_trj

Calculate the Root Mean Square Deviation (RMSD) between two trajectories for each frame.

Todo

Take two groups of atoms from two trajectories and calculate the RMSD between these groups for each frame. You must read the same number of frames from both trajectories and both atom groups must have the same number of atoms.

Options

-f

First and second trajectory file. See supported coordinate formats of MDAnalysis.

-s

First and second topology file. See supported topology formats of MDAnalysis.

-o

Output filename.

-b

First frame to read from the first and second trajectory, respectively. Frame numbering starts at zero. Default: [0, 0].

-e

Last frame to read from the first and second trajectory, respectively. 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, -1].

--every

Read every n-th frame from the first and second trajectory, respectively. Default: [1, 1].

--sel1, --sel2

Selection string to select a group of atoms from the first/second trajectory for which to calculate the RMSD. See MDAnalysis’ selection syntax for possible choices.

--cmp

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

The compounds of both selection groups, respectively, 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 the RMSD between two trajectories, unwrapped trajectories might be desired. Default: ['atoms', 'atoms'].

--center

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

The center of the compounds to use for the RMSD calculation, respectively for each trajectory.

  • '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', 'cog'].

--weights

{‘masses’, ‘charges’}

Weight the RMSD by the given property of the compounds from the first trajectory. 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 first trajectory. Note that this might not be desireable if the two trajectories have different box sizes changes.

--debug

Run in debug mode.

See also

scripts.structure.rmsd_vs_time

Calculate the RMSD between a reference frame and all other frames in a trajectory.

mdtools.structure.rmsd()

The underlying function that is called by this script.

Notes

TODO

Examples

TODO