nrgten.encom

class nrgten.encom.ENCoM(pdb_file, kr=1000, ktheta=10000, kphi=10000, epsi=0.01, apply_epsi=False, interact_const=3, null_interact_const=1, power_dependenceV4=4, interact_mat=None, use_stem=False, kphi1=1, kphi3=0.5, bfact_params=False, added_atypes=None, added_massdef=None, atypes_list=None, massdef_list=None, verbose=False, solve=True, ignore_hetatms=False, use_pickle=False, solve_mol=True, one_mass=False, interact_level=3, teruel2021_legacy=False, new_optimized_params=False, use_precomp_vcon=False)

Class implementing the latest version of ENCoM (Elastic Network Contact Model).

It extends the ENM class, implementing its own build_hessian(), pickle() and build_from_pickle() methods. See ENM class for the attributes it inherits. For details about the ENCoM model, see the 2014 Frappier and Najmanovich paper: doi.org/10.1371/journal.pcbi.1003569

Note

This class also implements the STeM model (Generalized Spring Tensor Model, on which ENCoM is based). The original STeM paper can be found here: doi.org/10.1186/1472-6807-10-S1-S3

dirpath

The absolute path to the directory containing the encom.py module.

Type:

str

use_stem

If True, the model reverts back to STeM.

Type:

bool

pd

The power dependency of the long-range interaction.

Type:

float

kr

The weight of the first term (bond stretching) from the ENCoM potential.

Type:

float

ktheta

The weight of the second term (angle bending) from the ENCoM potential.

Type:

float

kphi

The weight of the third term (torsion angles) from the ENCoM potential.

Type:

float

epsi

The weight of the fourth term (long-range interactions) from the ENCoM potential.

Type:

float

bfact_params

If True, the best parameters for b-factor prediction (according to the 2014 paper) are used

Type:

bool

ic

The interaction constant for favorable pairs of atom types.

Type:

float

inter_mat

The interaction matrix for atom types, in a list of lists format where every first element is None (to allow indexing starting at 1 instead of 0).

Type:

list

V1_H

The Hessian for the 1st potential term (bond stratching).

Type:

numpy.ndarray

V2_H

The Hessian for the 2nd potential term (angle bending).

Type:

numpy.ndarray

V3_H

The Hessian for the 3rd potential term (torsion angles).

Type:

numpy.ndarray

V4_H

The Hessian for the 4th potential term (long-range interactions).

Type:

numpy.ndarray

bij

Matrix of the Bij term in the ENCoM potential, which is the modulating factor for the long-range interaction (V4)

Type:

numpy.ndarray

__init__(pdb_file, kr=1000, ktheta=10000, kphi=10000, epsi=0.01, apply_epsi=False, interact_const=3, null_interact_const=1, power_dependenceV4=4, interact_mat=None, use_stem=False, kphi1=1, kphi3=0.5, bfact_params=False, added_atypes=None, added_massdef=None, atypes_list=None, massdef_list=None, verbose=False, solve=True, ignore_hetatms=False, use_pickle=False, solve_mol=True, one_mass=False, interact_level=3, teruel2021_legacy=False, new_optimized_params=False, use_precomp_vcon=False)

Constructor for the ENCoM class.

Parameters:
  • pdb_file (str) – The PDB file to read.

  • kr (float, optional) – The weight of the first term (bond stretching) from the ENCoM potential.

  • ktheta (float, optional) – The weight of the second term (angle bending) from the ENCoM potential.

  • kphi (float, optional) – The weight of the third term (torsion angles) from the ENCoM potential.

  • epsi (float, optional) – The weight of the fourth term (long-range interactions) from the ENCoM potential.

  • apply_epsi (bool, optional) – If True, the other constants are multiplied by epsi.

  • interact_const (float, optional) – The interaction constant for favorable pairs of atom types.

  • power_dependenceV4 (float, optional) – The power dependency of the long-range interaction.

  • interact_mat (list, optional) – The interaction matrix for atom types, in a list of lists format where every first element is None (to allow indexing starting at 1 instead of 0).

  • use_stem (bool, optional) – If True, the model reverts back to STeM (on which ENCoM is based).

  • kphi1 (float, optional) – Scales the kphi constant.

  • kphi3 (float, optional) – Scales the kphi constant.

  • bfact_params (bool, optional) – If True, the best parameters for b-factor prediction (according to the 2014 paper) are used.

  • added_atypes (list, optional) – list of .atypes configuration files to add.

  • added_massdef (list, optional) – list of .masses configuration files to add.

  • atypes_list (list, optional) – If supplied, the default .atypes configuration files are ignored and these are the only ones read.

  • massdef_list (list, optional) – If supplied, the default .masses configuration files are ignored and these are the only ones read.

  • verbose (bool, optional) – Triggers the verbose mode.

  • solve (bool, optional) – If True, the Hessian matrix will be built and solved.

  • use_pickle (bool, optional) – If True, the ENM object will be solved only once and subsequently built from its pickled representation. Uses a lot of disk space for large systems.

  • ignore_hetatms (bool, optional) – Flag to ignore HETATM records in the PDB file.

  • solve_mol (bool, optional) – If True, the underlying Macromol object will be solved, i.e. the connectivity of the residues will be inferred.

  • one_mass (bool, optional) – If True, nucleic acids will be built using only one mass per nucleotide instead of 3.

  • teruel2021_legacy (bool, optional) – If True, the parameters will perfectly reproduce the vibrational entropy calculations in the Teruel et al. 2021 PLoS Computational Biology paper

build_from_pickle()

Builds an ENCoM object from its pickled state.

Returns:

True if successful, False otherwise.

build_hessian()

Builds the Hessian matrix.

Returns:

The Hessian matrix.

build_hybrid_hessian(other, solve=True)

Builds the Hessian matrix with V1, V2, V3 from self and V4 from other.

pickle()

Builds a pickled state from the ENCoM object.