Dynamics Analysis¶
This module defines classes and functions for protein dynamics analysis.
Dynamics Models¶
The following classes are designed for modeling and analysis of protein dynamics:
ANM
- Anisotropic network model, for coarse-grained NMAGNM
- Gaussian network model, for coarse-grained dynamics analysisPCA
- Principal component analysis of conformation ensemblesEDA
- Essential dynamics analysis of dynamics trajectoriesNMA
- Normal mode analysis, for analyzing data from external programsRTB
- Rotations and Translation of Blocks method
Usage of these classes are shown in Anisotropic Network Model (ANM), Gaussian Network Model (GNM), Ensemble Analysis, and Essential Dynamics Analysis examples.
The following classes are for analysis of individual modes or subsets of modes:
Customize ENMs¶
The following classes allow for using structure or distance based, or other custom
force constants and cutoff distances in ANM
and GNM
calculations:
Gamma
- base class for developing property custom force constant calculation methodsGammaStructureBased
- secondary structure based force constantsGammaVariableCutoff
- atom type based variable cutoff function
Membrane Models¶
The following classes are designed for modeling and analysis of protein dynamics in membranes:
Usage of these classes are shown in exanm and imanm examples.
Signature Dynamics (SignDy)¶
The following classes are designed for signature dynamics analysis of protein/domain families, together with those in the database module:
calcEnsembleENMs()
- perform NMA on a protein family ensemble using ENMsModeEnsemble
- handle outputs of ensemble NMA, an ensemble of normal modessdarray
- handle signature dynamics data in an array based on a numpy array
There are many other functions starting showSignature or calcSignature for plotting and analysis. There are also load and save functions for mode ensembles and signature arrays.
Usage of these classes are shown in Overview, Core Calculations, and Classification using sequence, structure and dynamics distances examples.
Function library¶
Dynamics of the functions in this library accept a modes argument (may also appear in different names), which may refer to one or more of the following:
Some of these functions may also accept Vector
instances as mode
argument. These are noted in function documentations.
Analyze models¶
The following functions are for calculating atomic properties from normal modes:
calcCollectivity()
- degree of collectivity of a modecalcCovariance()
- covariance matrix for given modescalcCrossCorr()
- cross-correlations of fluctuationscalcFractVariance()
- fraction of variance explained by a modecalcPerturbResponse()
- response to perturbations in positionscalcProjection()
- projection of conformations onto modescalcSqFlucts()
- square-fluctuationscalcTempFactors()
- temperature factors fitted to exp. data
Compare models¶
The following functions are for comparing normal modes or dynamics models:
calcOverlap()
- overlap (correlation) between modescalcCumulOverlap()
- cumulative overlap between modescalcSubspaceOverlap()
- overlap between normal mode subspacescalcCovOverlap()
- covariance overlap between modelsprintOverlapTable()
- formatted overlap table printed on screen
Generate conformers¶
The following functions can be used to generate conformers along normal modes:
deformAtoms()
- deform atoms along a modesampleModes()
- deform along random combination of a set of modestraverseMode()
- traverse a mode along both directions
Adaptive ANM¶
The following class and its functions can be used to generate conformers using adaptive ANM:
AdaptiveANM
- generate transitions between two conformers using best overlapping modes
ENM-MD hybrid methods¶
The following classes and functions can be used to generate conformers using ENM-MD hybrid methods:
ClustENM
- generate conformers by exploring combinations of modes and clustering, using minimisation and optionally MD- :function:`.ANMD` - generate conformers by traversing a number of individual modes, applying minimisation to each conformer
Essential Site Scanning Analysis (ESSA)¶
The following class and its functions can be used to perform Essential Site Scanning Analysis:
Editing models¶
The following functions can be used to reduce, slice, or extrapolate models:
sliceMode()
- take a slice of the normal modeextendMode()
- extend a coarse-grained mode to all-atomssliceModel()
- take a slice of a modelextendModel()
- extend a coarse-grained model to all-atomsreduceModel()
- reduce a model to a subset of atomssliceVector()
- take a slice of a vectorextendVector()
- extend a coarse-grained vector to all-atoms
Parse/write data¶
The following functions are parsing or writing normal mode data:
parseArray()
- numeric arrays, e.g. coordinates, eigenvectorsparseModes()
- normal modesparseNMD()
- normal mode, coordinate, and atomic data for NMWizparseSparseMatrix()
- matrix data in sparse coordinate list formatwriteArray()
- numeric arrays, e.g. coordinates, eigenvectorswriteModes()
- normal modeswriteNMD()
- normal mode, coordinate, and atomic datawriteOverlapTable()
- overlap between modes in a formatted tablewriteBILD()
- normal mode and coordinate data for ChimeraX
Save/load models¶
Dynamics objects can be efficiently saved and loaded in later Python sessions using the following functions:
loadModel()
,saveModel()
- load/save dynamics modelsloadVector()
,saveVector()
- load/save modes or vectors
Short-hand functions¶
Following allow for performing some dynamics calculations in one function call:
Plotting functions¶
Plotting functions are called by the name of the plotted data/property
and are prefixed with “show”. Function documentations refers to the
matplotlib.pyplot
function utilized for actual plotting.
Arguments and keyword arguments are passed to the Matplotlib functions.
showMode()
- mode shapeshowOverlap()
- overlap between modesshowSqFlucts()
- square-fluctuationsshowEllipsoid()
- depict projection of a normal mode space on anothershowContactMap()
- contact map based on a Kirchhoff matrixshowProjection()
- projection of conformations onto normal modesshowOverlapTable()
- overlaps between two modelsshowScaledSqFlucts()
- square-fluctuations fitted to experimental datashowNormedSqFlucts()
- normalized square-fluctuationsshowCrossProjection()
- project conformations onto modes from different modelsshowCrossCorr()
- cross-correlations between fluctuations in atomic positionsshowCumulOverlap()
- cumulative overlap of a mode with multiple modes from another modelshowFractVars()
- fraction of variancesshowCumulFractVars()
- cumulative fraction of variancesresetTicks()
- change ticks in a plot
Heat Mapper support¶
The following functions can be used to read, write, and plot VMD plugin Heat Mapper files.
Visualize modes¶
Finally, normal modes can be visualized and animated using VMD plugin Normal Mode Wizard. The following functions allow for running NMWiz from within Python:
viewNMDinVMD()
- run VMD and load normal mode datapathVMD()
- get/set path to VMD executable