Analysis Functions

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

calcCollectivity(mode, masses=None)[source]

Return 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:
calcCovariance(modes)[source]

Return covariance matrix calculated for given modes.

calcCrossCorr(modes, n_cpu=1)[source]

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

calcFractVariance(mode)[source]

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

calcSqFlucts(modes)[source]

Return 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 Å2, for ANM and GNM, on the other hand, it is arbitrary or relative units.

calcTempFactors(modes, atoms)[source]

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

calcProjection(ensemble, modes, rmsd=True)[source]

Return 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 projection pass rmsd=True. Vector instances are accepted as ensemble argument to allow for projecting a deformation vector onto normal modes.

calcCrossProjection(ensemble, mode1, mode2, scale=None, **kwargs)[source]

Return 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 mode x or y, best scaling factor will be calculated and printed on the console, absolute value of scalar makes the with of two projection same, sign of scalar makes the projections yield a positive correlation
calcPerturbResponse(model, atoms=None, repeats=100)[source]

Return a matrix of profiles from scanning of the response of the structure to random perturbations at specific atom (or node) positions. The function implements the perturbation response scanning (PRS) method described in [CA09]. Rows of the matrix are the average magnitude of the responses obtained by perturbing the atom/node position at that row index, i.e. prs_profile[i,j] will give the response of residue/node j to perturbations in residue/node i. PRS is performed using the covariance matrix from model, e.t. ANM instance. Each residue/node is perturbed repeats times with a random unit force vector. When atoms instance is given, PRS profile for residues will be added as an attribute which then can be retrieved as atoms.getData('prs_profile'). model and atoms must have the same number of atoms. atoms must be an AtomGroup instance.

[CA09]Atilgan C, Atilgan AR, Perturbation-Response Scanning Reveals Ligand Entry-Exit Mechanisms of Ferric Binding Protein. PLoS Comput Biol 2009 5(10):e1000544.

The RPS matrix can be save as follows:

prs_matrix = calcPerturbationResponse(p38_anm)
writeArray('prs_matrix.txt', prs_matrix, format='%8.6f', delimiter='      ')
Read the Docs v: v1.5
Versions
latest
v1.5
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.