Client Traj Edit

Welcome to

_________ _______           _______  _______  _        _______  ______  
\__   __/(  ___  )|\     /|(  ____ )(  ____ \( (    /|(       )(  __  \ 
   ) (   | (   ) || )   ( || (    )|| (    \/|  \  ( || () () || (  \  )
   | |   | (___) || |   | || (____)|| (__    |   \ | || || || || |   ) |
   | |   |  ___  || |   | ||     __)|  __)   | (\ \) || |(_)| || |   | |
   | |   | (   ) || |   | || (\ (   | (      | | \   || |   | || |   ) |
   | |   | )   ( || (___) || ) \ \__| (____/\| )  \  || )   ( || (__/  )
   )_(   |/     \|(_______)|/   \__/(_______/|/    )_)|/     \|(______/ 
                                                                       

A command-line interface for Molecular Dynamics Analysis routines.

version: 0.11.2

Edit a trajectory.

In short, takes a trajectory and apply a modification:

  1. frame slicing

  2. atom selection

  3. unwrap

  4. align

  5. file format change

Saves the result to a new trajectory.

All operations are performed with MDAnalysis <https://www.mdanalysis.org>_.

Examples

Changes trajectory file format

taurenmd trajedit top.pdb traj.xtd -d traj.dcd

Extracts a part of the trajectory atoms, in this example segid A, the option -o saves the first frame of the new trajectory to a topology file:

taurenmd trajedit top.pdb traj.xtc -d tsegidA.dcd -o -l "segid A"

You can slice the trajectory by appending the following -s, -e or -p options, this saves only every 100 frames:

[...] -p 100

You can align the trajectory to a part of the system, for example, align the whole system to one of its subunits:

taurenmd trajedit top.pdb traj.dcd -d alignedA.dcd -a "segid A and name CA"

further restrain the output to a specific subselection with -l:

[...] -l "segid A or segid B"

trajedit also implements the unwrap method from which is an alternative approach to the imagemol client, that implements from MDTraj. See references section.

taurenmd trajedit top.pdb traj.dcd -d unwrapped.dcd -w -o unwrapped_frame0.pdb

References

usage: tmdtrajedit [-h] [-v] [-i] [-l SELECTION] [-s START] [-e STOP]
                   [-p STEP] [-d TRAJ_OUTPUT] [-o [TOP_OUTPUT]] [-a [ALIGN]]
                   [-w] [--unwrap-reference UNWRAP_REFERENCE]
                   [--unwrap-compound UNWRAP_COMPOUND]
                   topology trajectories [trajectories ...]

Positional Arguments

topology

Path to the topology file.

trajectories

Path to the trajectory files. If multiple files are given, trajectories will be concatenated by input order.

Named Arguments

-v, --version

show program’s version number and exit

-i, --insort

Sorts input trajectories paths according to their tail numbers, if paths are formatted as follows: my_trajectory_#.dcd, where # is a number. Defaults to False.

Default: False

-l, --selection

Atom selection for the output trajectory. Selection rules are as defined by the MD analysis library used by the client interface. For instructions read the main command-line client description. Defaults to ‘all’.

Default: “all”

-s, --start

The starting index for the frame slicing. Frames are 0-indexed, so the first frame is -s 0. The starting index is inclusive. Defaults to None, considers from the beginning.

-e, --stop

The ending index for the frame slicing. Frames are 0-indexed, so the last frame of a 500 frame trajectory is index 499, but because the ending index is exclusive, -e 500 is required. Defaults to None, considers to the end.

-p, --step

The periodicity step value for the frame slicing, -p 10 means every 10 frames. Defaults to None, considers every 1 frame.

-d, --traj-output

Modified trajectory output file name. File type will be defined by file name extension. Defaults to traj_out.dcd.

Default: “traj_out.dcd”

-o, --top-output

Export edited trajectory first frame as topololy file. You can specify the exact file name, otherwise, defaults to input trajectory path + ‘frame0.pdb’. Also, if name starts with ‘’, it is used as file suffix, if name ends with ‘_’, it is used as prefix, instead.

Default: False

-a, --align

Align system to a atom group. Alignmed RMSD is compared to the Topology coordinates. Uses MDAnalysis.analysis.align.alignto. If given without argument defaults to ‘all’. Defaults to False.

Default: False

-w, --unwrap

Unwraps selection according to: https://www.mdanalysis.org/docs/documentation_pages/core/groups.html#MDAnalysis.core.groups.AtomGroup.unwrap

Default: False

--unwrap-reference

The unwrap method reference parameter. Has effect only if ‘-w’ is given. Defaults to None.

--unwrap-compound

The unwrap method compound parameter. Has effect only if ‘-w’ is given. Defaults to fragments.

Default: “fragments”