Client Distances¶
Welcome to
_________ _______ _______ _______ _ _______ ______
\__ __/( ___ )|\ /|( ____ )( ____ \( ( /|( )( __ \
) ( | ( ) || ) ( || ( )|| ( \/| \ ( || () () || ( \ )
| | | (___) || | | || (____)|| (__ | \ | || || || || | ) |
| | | ___ || | | || __)| __) | (\ \) || |(_)| || | | |
| | | ( ) || | | || (\ ( | ( | | \ || | | || | ) |
| | | ) ( || (___) || ) \ \__| (____/\| ) \ || ) ( || (__/ )
)_( |/ \|(_______)|/ \__/(_______/|/ )_)|/ \|(______/
A command-line interface for Molecular Dynamics Analysis routines.
version: 0.11.2
Calculates distances between centers of geometry of two selections.¶
Distance is given in 3D XYZ coordinate space units.
Algorithm¶
Distance between centers of geometry is calculated by::
np.linalg.norm(np.subtract(coord1, coord2))
Where, coord* are the centers of geometry of each atom selection
-l1 and -l2, respectively.
Read further on np.linalg.norm
and np.subtract.
Examples¶
Calculate the distances between two carbon alphas:
taurenmd dist top.pdb traj.dcd -l1 'resnum 10 and name CA' -l2 'resnum 20 and name CA'
Calculate the distances between two chains:
taurenmd dist top.pdb traj.dcd -l1 'segid A' -l2 'segid B'
-x exports the data to a CSV file. You can also plot the data with
the -v option:
[...] -x distances.csv -v title=my-plot-title xlabel=frames ylabel=degrees ...
where [...] is the previous command example.
dist can be run directly as main command instead of subroutine:
tmddist
References¶
MD data accessed using MDAnalysis.
selection commands follow MDAnalysis selection nomenclature.
usage: tmddist [-h] [-v] [-i] [-l1 SEL1] [-l2 [SEL2 [SEL2 ...]]] [-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
- -l1, --sel1
First selection (a single selection).
Default: “all”
- -l2, --sel2
Second selections. As many as desired. For example: –sel2 “segid A” “segid B and name CA”.
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.
- -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