moleculekit.tools.modelling module#

moleculekit.tools.modelling.model_gaps(mol, sequence, segid, promod_img, minimize=False, build_sidechains=True, merge_distance=4)#

Model gaps in a protein sequence using ProMod3.

This method will also mutate any residues in the Molecule that do not match the input sequence.

Parameters:
  • mol (Molecule) – The molecule containing the segment to model.

  • sequence (str) – The sequence to model.

  • segid (str) – The segment ID of the segment to model.

  • promod_img (str) – The path to the ProMod3 apptainer/singularity image. Follow the instructions at https://openstructure.org/promod3/3.4/container/singularity/ to obtain this image.

  • minimize (bool) – Whether to minimize the model after building it.

  • build_sidechains (bool) – Whether to build sidechains after building the model.

  • merge_distance (float) – The distance to merge fragments at.

Returns:

modeled_segment – The modeled segment.

Return type:

Molecule

Examples

>>> from moleculekit.molecule import Molecule
>>> from moleculekit.tools.modelling import model_gaps
>>> mol = Molecule("5VQ6")
>>> sequence = "HMTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHHYREQIKRVKDSEDVPMVLVGNKSDLPSRTVDTKQAQDLARSYGIPFIETSAKTRQGVDDAFYTLVREIRKHKEK"
>>> res = model_gaps(mol, sequence, "0", "./promod.img")