Analysis Functions

This module defines functions for calculating physical properties from normal modes.

prody.dynamics.analysis.calcAnisousFromModel(model)[source]

Returns a Nx6 matrix containing anisotropic B factors (ANISOU lines) from a covariance matrix calculated from model.

Parameters:

model (ANM, PCA) – 3D model from which to calculate covariance matrix

prody.dynamics.analysis.calcCollectivity(mode, masses=None, is3d=None)[source]

Returns collectivity of the mode. This function implements collectivity as defined in equation 5 of [BR95]. If masses are provided, they will be incorporated in the calculation. Otherwise, atoms are assumed to have uniform masses.

[BR95]

Bruschweiler R. Collective protein dynamics and nuclear spin relaxation. J Chem Phys 1995 102:3396-3403.

Parameters:
prody.dynamics.analysis.calcCovariance(modes)[source]

Returns covariance matrix calculated for given modes. This is 3Nx3N for 3-d models and NxN (equivalent to cross-correlations) for 1-d models such as GNM.

prody.dynamics.analysis.calcCrossCorr(modes, n_cpu=1, norm=True)[source]

Returns cross-correlations matrix. For a 3-d model, cross-correlations matrix is an NxN matrix, where N is the number of atoms. Each element of this matrix is the trace of the submatrix corresponding to a pair of atoms. Cross-correlations matrix may be calculated using all modes or a subset of modes of an NMA instance. For large systems, calculation of cross-correlations matrix may be time consuming. Optionally, multiple processors may be employed to perform calculations by passing n_cpu=2 or more.

prody.dynamics.analysis.calcCrossProjection(ensemble, mode1, mode2, scale=None, **kwargs)[source]

Returns projection of conformational deviations onto modes from different models.

Parameters:
  • ensemble (Ensemble) – ensemble for which deviations will be projected

  • mode1 (Mode, Vector) – normal mode to project conformations onto

  • mode2 (Mode, Vector) – normal mode to project conformations onto

  • scale – scale width of the projection onto mode1 (x) or mode2(y), an optimized scaling factor (scalar) will be calculated by default or a value of scalar can be passed.

This function uses calcProjection and its arguments can be passed to it as keyword arguments. By default, this function applies RMSD scaling and normalisation. These can be turned off with rmsd=False and norm=False.

prody.dynamics.analysis.calcDistFlucts(modes, n_cpu=1, norm=True)[source]

Returns the matrix of distance fluctuations (i.e. an NxN matrix where N is the number of residues, of MSFs in the inter-residue distances) computed from the cross-correlation matrix (see Eq. 12.E.1 in [IB18]). The arguments are the same as in calcCrossCorr().

[IB18]

Dill K, Jernigan RL, Bahar I. Protein Actions: Principles and Modeling. Garland Science 2017.

prody.dynamics.analysis.calcFractVariance(mode)[source]

Returns fraction of variance explained by the mode. Fraction of variance is the ratio of the variance along a mode to the trace of the covariance matrix of the model.

prody.dynamics.analysis.calcHemnmaScore(modes)

Calculate the score from hybrid electron microscopy normal mode analysis (HEMNMA) [CS14] as implemented in the Scipion continuousflex plugin [MH20]. This score prioritises modes as a function of mode number and collectivity order.

[CS14]

Sorzano COS, de la Rosa-Trevín JM, Tama F, Jonić S. Hybrid Electron Microscopy Normal Mode Analysis graphical interface and protocol. J Struct Biol 2014 188:134-41.

[MH20]

Harastani M, Sorzano COS, Jonić S. Hybrid Electron Microscopy Normal Mode Analysis with Scipion. Protein Sci 2020 29:223-236.

Parameters:

modes (Mode, Vector, ModeSet, NMA) – mode(s) or vector(s)

prody.dynamics.analysis.calcHinges(modes, atoms=None, flag=False)[source]

Returns the hinge sites identified using normal modes.

Parameters:
  • modes (GNM) – normal modes of which will be used to identify hinge sites

  • atoms (Atomic) – an Atomic object on which to map hinges. The output will then be a selection.

  • flag (bool) – whether return flag or index array. Default is False

prody.dynamics.analysis.calcHitTime(model, method='standard')[source]

Returns the hit and commute times between pairs of nodes calculated based on a NMA object.

[CB95]

Chennubhotla C., Bahar I. Signal Propagation in Proteins and Relation

to Equilibrium Fluctuations. PLoS Comput Biol 2007 3(9).

Parameters:
  • model (NMA) – model to be used to calculate hit times

  • method (str) – method to be used to calculate hit times. Available options are "standard" or "kirchhoff". Default is "standard"

Returns:

(ndarray, ndarray)

prody.dynamics.analysis.calcMostMobileNodes(modes, **kwargs)[source]

Returns indices for nodes with highest root mean square fluctuations (RMSFs) for given set of normal modes above a particular percentile and/or cutoff.

Parameters:
  • percentile (int) – percentile for internal cutoff (between 0 and 100). Default 0 takes all values

  • cutoff (float) – user-defined cutoff, default is to take all values

prody.dynamics.analysis.calcPairDeformationDist(model, coords, ind1, ind2, kbt=1.0)[source]

Returns distribution of the deformations in the distance contributed by each mode for selected pair of residues ind1 ind2 using model from a ANM. Method described in [EB08] equation (10) and figure (2).

[EB08]

Eyal E., Bahar I. Toward a Molecular Understanding of the Anisotropic Response of Proteins to External Forces: Insights from Elastic Network Models. Biophys J 2008 94:3424-34355.

Parameters:
  • model (ANM) – this is an 3-dimensional NMA instance from a ANM calculations.

  • coords (ndarray.) – a coordinate set or an object with getCoords() method. Recommended: coords = parsePDB('pdbfile').select('protein and name CA').

  • ind1 (int) – first residue number.

  • ind2 (int) – second residue number.

prody.dynamics.analysis.calcProjection(ensemble, modes, rmsd=True, norm=False)[source]

Returns projection of conformational deviations onto given modes. ensemble coordinates are used to calculate the deviations that are projected onto modes. For K conformations and M modes, a (K,M) matrix is returned.

Parameters:

By default, root-mean-square deviation (RMSD) along the normal mode is calculated. To calculate the raw projection pass rmsd=False.

By default, the projection is not normalized. If you would like it to be, pass norm=True.

Vector instances are accepted as ensemble argument to allow for projecting a deformation vector onto normal modes.

prody.dynamics.analysis.calcRMSFlucts(modes)[source]

Returns root mean square fluctuation(s) (RMSF) for given set of normal modes. This is calculated just by doing the square root of the square fluctuations

prody.dynamics.analysis.calcScipionScore(modes)[source]

Calculate the score from hybrid electron microscopy normal mode analysis (HEMNMA) [CS14] as implemented in the Scipion continuousflex plugin [MH20]. This score prioritises modes as a function of mode number and collectivity order.

[CS14]

Sorzano COS, de la Rosa-Trevín JM, Tama F, Jonić S. Hybrid Electron Microscopy Normal Mode Analysis graphical interface and protocol. J Struct Biol 2014 188:134-41.

[MH20]

Harastani M, Sorzano COS, Jonić S. Hybrid Electron Microscopy Normal Mode Analysis with Scipion. Protein Sci 2020 29:223-236.

Parameters:

modes (Mode, Vector, ModeSet, NMA) – mode(s) or vector(s)

prody.dynamics.analysis.calcSpecDimension(mode)[source]
Parameters:

mode (Mode or Vector) – mode or vector

prody.dynamics.analysis.calcSqFlucts(modes)[source]

Returns sum of square-fluctuations for given set of normal modes. Square fluctuations for a single mode is obtained by multiplying the square of the mode array with the variance (Mode.getVariance()) along the mode. For PCA and EDA models built using coordinate data in Å, unit of square-fluctuations is |A2|, for ANM and GNM, on the other hand, it is arbitrary or relative units.

prody.dynamics.analysis.calcTempFactors(modes, atoms)[source]

Returns temperature (β) factors calculated using modes from a ANM or GNM instance scaled according to the experimental B-factors from atoms.

prody.dynamics.analysis.getGlobalHinges(gnm, n_modes=None, threshold=15, space=None, atoms=None, min_variance=0.33, trim=5)[source]

[HZ384] H Zhang, M Gur, I Bahar (2024) Global hinge sites of proteins as target sites for drug binding Proc Natl Acad Sci USA 121 (49), e2414333121 Updated hinge identification based on [HZ384]. This will:

  1. If GNM model is provided without specification of n_modes, number of modes will be determined to achieve 33% cumulative variance. If selected GNM modes are provided directly, all modes will be used for hinge detection.

  2. Identify hinge regions based on crossovers and residues within band, whose magnitude is specified by the threshold.

  3. Merge overlapping or adjacent hinge regions.

  4. Reduce transient hinge regions.

  5. Trim hinges at N- or C-terminal ends.

  6. Return list of hinges by mode.

Parameters:
  • gnm (GNM or ModeSet) – Normal mode information used for hinge detection. This can be a GNM model or a ModeSet. If a GNM model is provided, modes are selected automatically based on n_modes or min_variance.

  • n_modes (int or None) – Number of lowest-frequency modes to consider when gnm is a GNM. If None, modes are selected to satisfy min_variance.

  • min_variance (float) – Minimum cumulative variance used to determine the number of modes when n_modes is None.

  • threshold (float) – Threshold controlling hinge bandwidth.

  • space (int or None) – Minimum spacing between hinge points.

  • trim (int or bool) – Number of residues excluded from each terminus when identifying hinges. If False, no trimming is applied. Default is 5.

Returns:

List of sorted hinge indices

Return type:

[list[int], list[int], …]

prody.dynamics.analysis.getHinges(v, threshold=15, space=None)[source]

Detect hinge-like regions within single eigenvector.

arg v:

eigenvector

type v:

ndarray

arg threshold:

threshold controlling band width for hinge region identification.

type threshold:

float

Parameters:

space – spacing between hinge regions. Increasing this value reduces the number of local hinges

while preserving global hinge behavior. Default to None. :type space: int or None