trajectory_analysis – DRMSD, Pairwise Distances and More

This Module requires numpy

This module contains functions to analyze trajectories, mainly similiraty measures baed on RMSDS and pairwise distances.

Author: Niklaus Johner (niklaus.johner@unibas.ch)

AverageDistanceMatrixFromTraj(t, sele, first=0, last=-1)

This function calcultes the distance between each pair of atoms in sele, averaged over the trajectory t.

Parameters:
  • t (CoordGroupHandle) – the trajectory

  • sele (EntityView) – the selection used to determine the atom pairs

  • first (int) – the first frame of t to be used

  • last (int) – the last frame of t to be used

Returns:

a numpy NpairsxNpairs matrix, where Npairs is the number of atom pairs in sele.

DistRMSDFromTraj(t, sele, ref_sele, radius=7.0, average=False, seq_sep=4, first=0, last=-1)

This function calculates the distance RMSD from a trajectory. The distances selected for the calculation are all the distances between pair of atoms from residues that are at least seq_sep apart in the sequence and that are smaller than radius in ref_sel. The number and order of atoms in ref_sele and sele should be the same.

Parameters:
  • t (CoordGroupHandle) – the trajectory

  • sele (EntityView) – the selection used to calculate the distance RMSD

  • ref_sele (EntityView) – the reference selection used to determine the atom pairs and reference distances

  • radius (float) – the upper limit of distances in ref_sele considered for the calculation

  • seq_sep (int) – the minimal sequence separation between atom pairs considered for the calculation

  • average (bool) – use the average distance in the trajectory as reference instead of the distance obtained from ref_sele

  • first (int) – the first frame of t to be used

  • last (int) – the last frame of t to be used

Returns:

a numpy vecor dist_rmsd(Nframes).

DistanceMatrixFromPairwiseDistances(distances, p=2)

This function calculates an distance matrix M(NframesxNframes) from the pairwise distances matrix D(NpairsxNframes), where Nframes is the number of frames in the trajectory and Npairs the number of atom pairs. M[i,j] is the distance between frame i and frame j calculated as a p-norm of the differences in distances from the two frames (distance-RMSD for p=2).

Parameters:
  • distances – a pairwise distance matrix as obtained from PairwiseDistancesFromTraj()

  • p – exponent used for the p-norm.

Returns:

a numpy NframesxNframes matrix, where Nframes is the number of frames.

PairwiseDistancesFromTraj(t, sele, first=0, last=-1, seq_sep=1)

This function calculates the distances between any pair of atoms in sele with sequence separation larger than seq_sep from a trajectory t. It return a matrix containing one line for each atom pair and Nframes columns, where Nframes is the number of frames in the trajectory.

Parameters:
  • t (CoordGroupHandle) – the trajectory

  • sele (EntityView) – the selection used to determine the atom pairs

  • first (int) – the first frame of t to be used

  • last (int) – the last frame of t to be used

  • seq_sep (int) – The minimal sequence separation between atom pairs

Returns:

a numpy NpairsxNframes matrix.

RMSD_Matrix_From_Traj(t, sele, first=0, last=-1, align=True, align_sele=None)

This function calculates a matrix M such that M[i,j] is the RMSD (calculated on sele) between frames i and j of the trajectory t aligned on sele.

Parameters:
  • t (CoordGroupHandle) – the trajectory

  • sele (EntityView) – the selection used for alignment and RMSD calculation

  • first (int) – the first frame of t to be used

  • last (int) – the last frame of t to be used

Returns:

Returns a numpy NframesxNframes matrix, where Nframes is the number of frames.

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

(Currently viewing dev) / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.