unwrap_trj

Unwrap the given trajectory.

Unwrap the selected compounds out of the primary unit cell, i.e. calculate their real-space coordinates.

Options

-f

Trajectory file. See supported coordinate formats of MDAnalysis.

-s

Topology file. See supported topology formats of MDAnalysis.

--trj-out

Output file name for the unwrapped trajectory. See supported coordinate formats of MDAnalysis.

--top-out

Output file name for the topology file belonging to the generated unwrapped trajectory (optional). See supported topology formats of MDAnalysis. If you unwrap the full trajectory, providing --top-out is usually not necessary, because the input topology file can also be used with the generated unwrapped trajectory. However, if you unwrap only a subset of atoms with --sel, you probably want to generate a corresponding topology file.

-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. Note that the sampling interval should be as small as possible to avoid unwrapping errors. Non of the unwrapping methods works if the particle displacement between two frames is larger than half of the box length. For more details see the notes of mdtools.box.unwrap_frame(). Default: 1.

--sel

Selection string to select a group of atoms for the unwrapping. See MDAnalysis’ selection syntax for possible choices. Only the selected atoms will be unwrapped and written to the new trajectory. Use ‘all’ if you want to unwrap all atoms in the trajectory.

--cmp

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

The compounds of the selection group to make whole for the first frame before starting the actual unwrapping. Is ignored if set to “atoms”. Note that all atoms within each compound must be interconnected by bonds, otherwise an error will be raised. Also note that all atoms are wrapped back into the primary unit cell before making broken compounds whole. This means, you cannot start from an already unwrapped configuration unless --cmp is set to “atoms”.

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. Default: 'atoms'.

--center

{‘cog’, ‘com’}

The center of the compounds to shift to the primary unit cell before unwrapping the trajectory when making broken compounds whole:

  • 'cog': Center of geometry

  • 'com': Center of mass

Unless --cmp is “atoms”, broken compounds are made whole for the first frame before unwrapping the trajectory. Thereby, the compounds are shifted in such a way that their centers lie within the primary unit cell. A change of the centering method might affect the unwrapped trajectory, depending on the chosen unwrapping algorithm, because the unwrapping might start from a different starting configuration.

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

--method

{‘scaling’, ‘heuristic’, ‘displacement’, ‘hybrid’, ‘in-house’}

The unwrapping method to choose. See the notes section of mdtools.box.unwrap_frame() for further details. Default: 'scaling'.

--debug

Run in debug mode.

See also

mdtools.box.unwrap_frame()

Underlying function that performs the unwrapping.

Notes

See mdtools.box.unwrap_frame() for a description of the different unwrapping methods and their limitations.

References