Client Rotations

The image bellow complements the textual explanation of the roll, pitch, and yaw angles, and how we calculate them.

../_images/taurenmd_roll_pitch_yaw_scheme_inkscape.svg

Welcome to

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

A command-line interface for Molecular Dynamics Analysis routines.

version: 0.11.2

Decompose Eurler angle rotations for a selection.

Calculate the Roll, Pitch and Yaw angles of a plane along the trajectory.

Read further on roll, pitch and yaw angles (Euler Angles) - wikipedia.

Here we decompose these movements around the three different axis centered at an origin.

Calculation algorithm

Given a selection of three regions, selection A, selection B and selection C:

  1. Center the system to the three selections center of geometry for every frame, this is called the origin;

  2. Calculate a plane given by the center of geometries of the three selections, plane ABC;

  3. Define the vector OA that goes from the origin to the center of geometry of selection A, this represents the Yaw axis;

  4. Define the normal vector to the plane ABC (ABCn), this represents the Roll axis;

  5. Define the cross product betwee vectors OA and ABCn (AONn), this is the Pitch axis;

  6. Repeat this process for every frame.

Calculating the angles:

Angles represent the right hand rotation around an axis of the sistem in a i-frame compared to the reference frame.

Roll

The roll angle is given by the torsion angle between OA, origin, ABCn, and OAi (in frame), displaced along ABCn.

Pitch

The pitch angle is by the torsion angle between ABCn, origin, AONn, and ABCni (in frame), displaced along AONn.

Yaw

The yaw angle is given by the torsion angle between the AONn, origin, OA, and AONni (in frame), displaced along OA.

Examples

In the case of an homotrimer, define the axis and the origin on the trimers:

taurenmd rotations -z 'segid A' 'segid B' 'segid C' -x rotations.csv

References

usage: tmdrotations [-h] [-v] [-i] -z PLANE_SELECTION PLANE_SELECTION
                    PLANE_SELECTION [-a {degrees,radians}] [-r REF_FRAME]
                    [-s START] [-e STOP] [-p STEP] [-x [EXPORT]]
                    [--plot [PLOT [PLOT ...]]]
                    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

-z, --plane-selection

Three selection strings representing three atom regions. The plane is defined by the three centres of geometry of the three selections. For example: -z ‘segid A’ ‘segid B’ ‘segid C’.

-a, --aunit

Possible choices: degrees, radians

Angular unit, either degrees or radians.

Default: “degrees”

-r, --ref-frame

The frame in the trajectory that serves as reference to compute against.Defaults to 0.

Default: 0

-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.

-x, --export

Export calculated values to a CSV file. Defaults to ‘results.csv’, alternatively, you can give a specific file name.

Default: False

--plot

Plot results. Additional arguments can be given to configure the plot style. Example: –plot xlabel=frames ylabel=RMSD color=red.Accepted plot arguments are defined by the function used to plot the result. The main description of this client which plotting function is used. Defaults to None, no plot is produced.

Default: False