packman.anm.hd_anm module

The ‘hdANM’ object host file.

This is file information, not the class information. This information is only for the API developers. Please read the ‘hdANM’ object documentation and the publication for details.

Citation:

Pranav M. Khade, Domenico Scaramozzino, Ambuj Kumar, Giuseppe Lacidogna, Alberto Carpinteri, Robert L. Jernigan, hdANM: a new comprehensive dynamics model for protein hinges, Biophysical Journal, 2021, https://doi.org/10.1016/j.bpj.2021.10.017

About .hng File: - hdANM requires the information about hinges and domains in the .hng format. - Each column in the .hng file is tab delimited. - Each row in the .hng file follows collowing pattern:

Filename_ChainID Domain/HingeId ResidueStartPosition:ResidueEndPosition

Example of .hng file for PDBID 1EXR:

1EXR_A  D1  1:70
1EXR_A  H1  70:90
1EXR_A  D2  90:148

Above format means that there are two domains (D1 and D2) separated by a hinge (H1). D1 stretches from residue 1 to 70; D2 stretches from 90 to 148 and hinge H1 is in the middle.

Example:

from packman.anm import hdANM
help( hdANM )

Notes

Authors:
class packman.anm.hd_anm.hdANM(atoms, hng_file, gamma=1.0, dr=15.0, power=0, pf=None)

Bases: object

This class contains the functions essential to carry out the Hinge-Domain-Anisotropic Network Model and Compliance analysis.

Notes: * Tutorial: * For more details about the parameters for compliance, or to site this, read the following paper:

Parameters:
  • atoms ([packman.molecule.Atom]) – Two dimentional array of atoms.
  • hng_file (string) – .hng filename and path. (Contains the information about hinge and domains on the protein)
  • gamma (float, optional) – Spring Constant Value. Defaults to 1.0.
  • dr (float, optional) – Distance Cutoff. Defaults to 15.0.
  • power (int, optional) – Power of distance (mainly useful in non-parametric mode). Defaults to 0.
  • pf (None, optional) – Parameter free model?. Defaults to None.
Raises:
  • Exception – [description]
  • Exception – [description]
  • Exception – [description]
calculate_RT_eigen_vectors()

Calculate the reverse transformed vectors from the hdANM eigenvectors.

Reverse transformed means that the hdANM eigenvector of dimension: 6D+3H x 6D+3H (D: Number of domains; H: Number of hinge atoms) are converted to 3N x 6D+3H (N: Number of atoms)

Note

  • It was refered as ‘exploded vector’ utill version 1.3.3
calculate_cross_correlation(n_modes='all')

Calculate the cross correlation matrix for the hdANM modes.

Crosscorrelation matrix is generated for all modes by default. Please change the n_modes parameter to restrict modes.

Parameters:n_modes (-) – Number of modes that need to be considered to calculate the cross correlation matrix.
calculate_decomposition(include_mass=True)

Decompose the Hessian Matrix of the hdANM model.

Parameters:include_mass (bool) – Amino Acid Residue mass/Atomic mass should be (True) or shouldn’t be (False) included for the decomposition. Defaults to True

Note

  • Eigen values and Eigen Vectors are calculated. use hdANM().get_eigenvalues() and hdANM().get_eigenvectors() to obtain them.
  • Currently only molecular weight is included in case of Amino Acid Residue(coarse grained) mass.
  • Mass of the Amino Acid Residues/Atoms can be found in /packman/constants/Constants.py

ie… from packman.constants import amino_acid_molecular_weight from packman.constants import atomic_weigh

calculate_fluctuations()

Calculate the Fluctuations of the hd-ANM model.

The fluctualtions/ theoretical b-factors are calculated using this method.

Note

  • Fluctuations are calculated. use hdANM().get_fluctuations() to obtain the fluctuations.
  • Endmode needs to be put in the code if and when required.
  • hdANM().fluctuations stores the output of this function.
calculate_hessian(mass_type='unit')

Build the Hessian Matrix of the hdANM model.

This is the most essential step for hdANM. It picks up blocks from ANM hessian matrix and puts it in the format described in the paper.

Parameters:mass_type (unit/atom/residue) – Whether to use unit (1), atomic weights or residue mass for the mass matrix.

Notes

  • Possible argument removal for the decomposition function
  • use hdANM().domain_hessian, hdANM().domain_mass_matrix and hdANM().domain_info to access output of this function
  • Mass of the Amino Acid Residues/Atoms can be found in /packman/constants/Constants.py

ie… from packman.constants import amino_acid_molecular_weight from packman.constants import atomic_weigh

calculate_hessian_pseudoinverse(n_modes='all')

Calculate the hessian pseudoinverse for the hd-ANM modes

Pseudoinverse is calculated using this methd. Please note that first 6 rigid modes are eliminated in this calculation.

Note

  • Can be called on demand or can be called from get method automatically (Needs thinking)
calculate_movie(mode_number, scale=1.5, n=20, extrapolation='curvilinear', ftype='cif', ca_to_aa=False)

This function generates the dynamic 3D projection of the normal modes obtained using hd-ANM. The 3D projection can be linearly extrapolated or curvilinearly extrapolated depending on the choices. The first frame is the original structure and the projection progresses in positive (+) direction, returning to original structure and then in negative direction (-) again returning to the original structure.

Parameters:
  • mode_number (int) – Mode number. (first non-rigid mode is 6th)
  • scale (float) – Multiplier; extent to which mode will be extrapolated. Defaults to 1.5
  • n (int) – Number of frames in output (should be =>8 and ideally multiple of 4) Defaults to 20
  • extrapolation (linear/curvilinear) – Extrapolation method Defaults to “curvilinear”
  • ftype (string) – Extension of the output file (.cif / .pdb)
  • ca_to_aa (boolean) – If only single atom type is used (often C-alpha atom only), enabling extrapolates the C-alpha motion to all the atoms. (Default: False)

Note

  • Scale and n parameters should be redesigned.
  • direction is the variable which be allow user to explore only positive or only negative direction of the modes.
Returns:True if successful; false otherwise.
get_RT_eigen_vectors()

Get the Reverse Transformed vectors from the hdANM eigenvectors.

Reverse transformed means that the hdANM eigenvector of dimension: 6D+3H x 6D+3H (D: Number of domains; H: Number of hinge atoms) are converted to 3N x 6D+3H (N: Number of atoms)

Note

  • It was refered as ‘exploded vector’ utill version 1.3.3
Returns:Reverse Transformed Vector if successful; None otherwise
Return type:numpy.ndarray
get_crosscorrelation_matrix(n_modes='all')
get_eigenvalues()

Get the Eigenvalues obtained by decomposing the Hessian Matrix of the hd-ANM model.

Notes

  • Make sure that the hdANM().calculate_hessian() and ANM().calculate_decomposition() is called before calling this function. (will return None otherwise)
Returns:Eigenvalues if successful; None otherwise
Return type:numpy.ndarray
get_eigenvectors()

Get the Eigenvectors obtained by decomposing the Hessian Matrix of the hd-ANM model.

Notes

  • Make sure that the hdANM().calculate_hessian() and hdANM().calculate_decomposition() is called before calling this function. (will return None otherwise)
Returns:Eigenvectors if successful; None otherwise
Return type:numpy.ndarray
get_fluctuations()

Get the Fluctuations obtained from Eigenvectors and Eigenvalues

Notes

  • Make sure that the hdANM().calculate_hessian(), hdANM().calculate_decomposition() and hdANM().calculate_fluctuations() is called before calling this function. (will return None otherwise)
Returns:Fluctuations if successful; None otherwise
Return type:numpy.ndarray
get_hessian()

Get the Hessian Matrix of the hd-ANM model.

Notes

  • Make sure that the hdANM().calculate_hessian() is called before calling this function. (will return None otherwise)
Returns:Hessian matrix if successful; None otherwise
Return type:numpy.ndarray
get_hessian_block(Index1, Index2)

Calculate Hij (Hessian matrix component) using equation . ()

Notes:

Returns:Hij if successful; None otherwise
Return type:numpy.ndarray
get_hessian_pseudoinverse(n_modes='all')

Get the Pseudoinverse of the hdANM model.

Returns:Pseudoinverse if successul; None otherwise
Return type:numpy.ndarray