You are reading the documentation for version 2.1 of ProMod3. You may also want to read the documentation for: 3.0 1.3 2.0 3.1

Rotamer Constructor

Instead of creating rotamers or frame residues by yourself, you can use the convenient functionality provided by ProMod3.

The RotamerConstructor Baseclass

class promod3.sidechain.RotamerConstructor

Abstract base class that cannot be initialized from Python. It builds an interface implemented by scoring function specific constructors (e.g. SCWRL4RotamerConstructor).

ConstructRRMRotamerGroup(res, id, residue_index, rot_lib[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False, probability_cutoff = 0.98])
ConstructRRMRotamerGroup(all_atom_pos, aa_res_idx, id, residue_index, rot_lib[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False, probability_cutoff = 0.98])
ConstructRRMRotamerGroup(res, id, residue_index, rot_lib_entries[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False, probability_cutoff = 0.98])
ConstructRRMRotamerGroup(all_atom_pos, aa_res_idx, id, residue_index, rot_lib_entries[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False, probability_cutoff = 0.98])

All functions are also avaible for their flexible rotamer model counterpart. =>ConstructFRMRotamerGroup(...) with the same parameters.

Parameters:
  • res (ost.mol.ResidueHandle) – To extract the required backbone atoms
  • all_atom_pos (promod3.loop.AllAtomPositions) – To extract the required backbone atoms
  • aa_res_idx (int) – Index of residue in all_atom_pos from which to extract the required backbone atoms
  • id (RotamerID) – Identifies the sidechain.
  • residue_index (int) – Important for the energy calculations towards the Frame you don’t want to calculate a pairwise energy of the sidechain particles towards particles representing the own backbone...
  • rot_lib (RotamerLib / BBDepRotamerLib) – To search for rotamers
  • rot_lib_entries (list) – RotamerLibEntry objects to circumvent the direct use of a rotamer library
  • phi (float) – Phi dihedral angle
  • psi (float) – Psi dihedral angle
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
  • probability_cutoff (float) – For some rotamers, there might be many low probability entries in the library. The function adds single rotamers to the group until the cumulative probability of the added rotamers is larger or equal probability_cutoff.
Returns:

The rotamer group containing all constructed rotamers with internal energies assigned.

Return type:

RRMRotamerGroup

Raises:

RuntimeError when not all required backbone atoms are present in residue or not all required atom positions are set in all_atom_pos

ConstructBackboneFrameResidue(res, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])
ConstructBackboneFrameResidue(all_atom_pos, aa_res_idx, id, residue_index[, phi = -1.0472, psi = -0.7854 n_ter = False, c_ter = False])

Constructs frame residues only containing backbone atoms (the ones that don’t show up in a rotamer).

Parameters:
  • res (ost.mol.ResidueHandle) – Residue from which to extract the backbone positions
  • all_atom_pos (promod3.loop.AllAtomPositions) – To extract the backbone positions
  • aa_res_idx (int) – Index of residue in all_atom_pos from which to extract the backbone positions
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – Important for the energy calculations towards the Frame you don’t want to calculate a pairwise energy of the sidechain particles towards particles representing the own backbone...
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
Return type:

FrameResidue

Raises:

RuntimeError when not all required backbone atoms are present in residue or not all required atom positions are set in all_atom_pos.

ConstructSidechainFrameResidue(res, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])
ConstructSidechainFrameResidue(all_atom_pos, aa_res_idx, id, residue_index[, phi = -1.0472, psi = -0.7854 n_ter = False, c_ter = False])

Constructs frame residues only containing sidechain atoms (the ones that you observe in a rotamer).

Parameters:
  • res (ost.mol.ResidueHandle) – Residue from which to extract the backbone positions
  • all_atom_pos (promod3.loop.AllAtomPositions) – To extract the backbone positions
  • aa_res_idx (int) – Index of residue in all_atom_pos from which to extract the backbone positions
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – Important for the energy calculations towards the Frame you don’t want to calculate a pairwise energy of the sidechain particles towards particles representing the own backbone...
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
Return type:

FrameResidue

Raises:

RuntimeError when not all required sidechain atoms are present in residue or not all required sidechain atom positions are set in all_atom_pos.

AssignInternalEnergies(rot_group, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])

Assigns an internal energy to every rotamer in rot_group, i.e. an energy value before looking at any structural component of the energy function. The default implementation simply assigns 0.0 to every rotamer, it’s up to the energy function specific constructors to override that behaviour.

Parameters:
  • rot_group (RRMRotamerGroup / FRMRotamerGroup) – containing all rotamers for which internal energies have to be assigned
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – The index of the residue which is represented by rot_group
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal

Scoring Function Specific RotamerConstructors

class promod3.sidechain.SCWRL4RotamerConstructor(cb_in_sidechain)

This object implements the full interface defined in RotamerConstructor and constructs rotamers and frame residues that are parametrized according to the SCWRL4 method. They contain all heavy atoms, but also the polar hydrogens.

Parameters:cb_in_sidechain (bool) – If set to true, all constructed rotamers will contain the cb atom. This flag also affects the construction of frame residues and controls whether the cb atom shows up in the backbone frame residues or sidechain frame residues. This is useful when you want to represent ALA or GLY with actual rotamers, but be aware of increased runtime. This flag can be set to False for most modeling applications and you just don’t generate any rotamers for ALA and GLY.
ConstructFrameResidue(residue, residue_index)

Constructs a FrameResidue from a ost.mol.ResidueHandle. This can be useful to mark a region occupied by a ligand. Note, that there won’t be any parametrization of hbonds in this function. All heavy atoms of the residue will be represented as carbons and hydrogens are skipped.

Parameters:
Returns:

FrameResidue

ConstructFrameResidueHeuristic(residue, residue_index, comp_lib)

Constructs a FrameResidue from a ost.mol.ResidueHandle using a heuristic treatment of the atoms based on the passed compounds library. This is meant to be used as an alternative to ConstructFrameResidue(), which will be called by this function if the residue is not known by the given compounds library. Only non-hydrogen atoms are considered and by default added as uncharged carbons. Special treatment is used for atoms known by the compounds library in the following cases:

  • carbons, nitrogens, oxygens and sulfur particles use an appropriate type as in the SidechainParticle enumeration
  • carbonyls are added as charged oxygen particles as hbond acceptors
Parameters:
Returns:

FrameResidue

AssignInternalEnergies(rot_group, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])

Overrides the method defined in RotamerConstructor. Takes the rotamer group and assigns every single rotamer its internal energy based on the probabilistic approach used by SCWRL4. => -internal_e_prefac*log(p/max_p), where internal_e_prefac and p are rotamer specific and max_p is the maximum probablity of any of the rotamers in rot_group. If you construct a rotamer group by the ConstructRRMRotamerGroup/ConstructFRMRotamerGroup functions, this function is already called at construction and the energies are properly assigned.

Parameters:
  • rot_group (RRMRotamerGroup / FRMRotamerGroup) – containing all rotamers for which internal energies have to be assigned
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – The index of the residue which is represented by rot_group
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
class promod3.sidechain.SCWRL3RotamerConstructor(cb_in_sidechain)

This object implements the full interface defined in RotamerConstructor and constructs rotamers and frame residues that are parametrized according to the SCWRL3 method. They contain only heavy atoms.

Parameters:cb_in_sidechain (bool) – If set to true, all constructed rotamers will contain the cb atom. This flag also affects the construction of frame residues and controls whether the cb atom shows up in the backbone frame residues or sidechain frame residues. This is useful when you want to represent ALA or GLY with actual rotamers, but be aware of increased runtime. This flag can be set to False for most modeling applications and you just don’t generate any rotamers for ALA and GLY.
AssignInternalEnergies(rot_group, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])

Overrides the method defined in RotamerConstructor. Takes the rotamer group and assigns every single rotamer its internal energy based on the probabilistic approach used by SCWRL3. => -internal_e_prefac*log(p/max_p), where internal_e_prefac and p are rotamer specific and max_p is the maximum probablity of any of the rotamers in rot_group. If you construct a rotamer group by the ConstructRRMRotamerGroup/ConstructFRMRotamerGroup functions, this function is already called at construction and the energies are properly assigned.

Parameters:
  • rot_group (RRMRotamerGroup / FRMRotamerGroup) – containing all rotamers for which internal energies have to be assigned
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – The index of the residue which is represented by rot_group
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
class promod3.sidechain.VINARotamerConstructor(cb_in_sidechain)

This object implements the full interface defined in RotamerConstructor and constructs rotamers and frame residues that are parametrized according to the VINA method. They contain only heavy atoms.

Parameters:cb_in_sidechain (bool) – If set to true, all constructed rotamers will contain the cb atom. This flag also affects the construction of frame residues and controls whether the cb atom shows up in the backbone frame residues or sidechain frame residues. This is useful when you want to represent ALA or GLY with actual rotamers, but be aware of increased runtime. This flag can be set to False for most modeling applications and you just don’t generate any rotamers for ALA and GLY.
AssignInternalEnergies(rot_group, id, residue_index[, phi = -1.0472, psi = -0.7854, n_ter = False, c_ter = False])

Overrides the method defined in RotamerConstructor. Takes the rotamer group and assigns every single rotamer its internal energy based on the probabilistic approach used by SCWRL3/SCWRL4. => -internal_e_prefac*log(p/max_p), where internal_e_prefac and p are rotamer specific and max_p is the maximum probablity of any of the rotamers in rot_group. If you construct a rotamer group by the ConstructRRMRotamerGroup/ConstructFRMRotamerGroup functions, this function is already called at construction and the energies are properly assigned.

Parameters:
  • rot_group (RRMRotamerGroup / FRMRotamerGroup) – containing all rotamers for which internal energies have to be assigned
  • id (RotamerID) – Identifies the sidechain
  • residue_index (int) – The index of the residue which is represented by rot_group
  • phi (float) – The dihedral angle of the current residue
  • psi (float) – The dihedral angle of the current residue
  • n_ter (bool) – Whether the residue is n-terminal
  • c_ter (bool) – Whether the residue is c-terminal
ConstructFrameResidueHeuristic(res, res_idx)

Constructs a FrameResidue from a ost.mol.ResidueHandle using a heuristic treatment of the atoms. It is important that the residue has proper bonds assigned, as they influence the atom typing procedure. Furthermore, you need hydrogens to automatically estimate the correct atom type for oxygens and nitrogens (hydrogen bond donor/acceptor). Alternatively you can assign generic properties to oxygens and nitrogens to circumvent the requirement of hydrogens. This is further described for the case of oxygen.

  • Carbon is assigned C_VINAParticle VINAParticleType if its only bound to other carbons or hydrogens (and deuterium). All other carbons are assigned C_P_VINAParticle VINAParticleType.
  • In case of oxygen, the heuristic first checks for set generic properties. If the atom has the bool properties “is_hbond_acceptor” AND “is_hbond_donor” set, it decides between the according oxygen types in VINAParticleType. If the generic properties are not set, every oxygen is assumed to be an hbond acceptor. But only an hbond donor if its bound to a hydrogen (or deuterium). You can set the generic properties for an ost.mol.AtomHandle by calling at.SetBoolProp(“is_hbond_donor”, False) and at.SetBoolProp(“is_hbond_acceptor”, True). An oxygen with those generic properties is assigned O_A_VINAParticle VINAParticleType.
  • In case of nitrogen, the heuristic again first checks for set generic properties. If the atom has the bool properties “is_hbond_acceptor” AND “is_hbond_donor” set, it decides between the according nitrogen types in VINAParticleType. If not, nitrogen is expected to be an hbond donor if it is bound to a hydrogen (or deuterium) and an hbond acceptor if it is bound to less than 3 other atoms (sounds horrible but works surprisingly well).
  • Atoms of elements [“MG”, “MN”, “ZN”, “CA”, “FE”] are assigned M_VINAParticle VINAParticleType.
  • Atoms of elements [“S”, “P”, “F”, “CL”, “BR”, “I”] are assigned their corresponding VINAParticleType.
  • All other atoms are neglected and not added to the returned FrameResidue.
Parameters:
Return type:

FrameResidue

ConstructRRMRotamerHeuristic(res)

Construct a RRMRotamer with the atom typing heuristic as in the ConstructFrameResidueHeuristic() method.

Parameters:res (ost.mol.ResidueHandle) – Residue from which to create the RRMRotamer
Return type:RRMRotamer
ConstructFRMRotamerHeuristic(res)

Construct a FRMRotamer with the atom typing heuristic as in the ConstructFrameResidueHeuristic() method. The constructed FRMRotamer only contains one subrotamer that contains the atoms from residue.

Parameters:res (ost.mol.ResidueHandle) – Residue from which to create the FRMRotamer
Return type:FRMRotamer

Contents

Search

Enter search terms or a module, class or function name.

Previous topic

Frame - The Rigid Part

Next topic

Rotamer Library

You are here