Modelling Package

This module contains tools for modifying biomolecular structures. For example, it includes tools adding capping groups, non-canonical amino acids and loops.

Submodules

isambard.modelling.non_canonical module

Contains tools for working with non-canonical animo acids.

isambard.modelling.non_canonical.align_nab(tar, ref)[source]

Aligns the N-CA and CA-CB vector of the target monomer.

Parameters:
  • tar (ampal.Residue) – The residue that will be aligned to the reference.
  • ref (ampal.Residue) – The reference residue for the alignment.
isambard.modelling.non_canonical.apply_trans_rot(ampal, translation, angle, axis, point, radians=False)[source]

Applies a translation and rotation to an AMPAL object.

isambard.modelling.non_canonical.convert_pro_to_hyp(pro)[source]

Converts a pro residue to a hydroxypro residue.

All metadata associated with the original pro will be lost i.e. tags. As a consequence, it is advisable to relabel all atoms in the structure in order to make them contiguous.

Parameters:pro (ampal.Residue) – The proline residue to be mutated to hydroxyproline.

Examples

We can create a collagen model using isambard and convert every third residue to hydroxyproline:

>>> import isambard
>>> col = isambard.specifications.CoiledCoil.tropocollagen(aa=21)
>>> col.pack_new_sequences(['GPPGPPGPPGPPGPPGPPGPP']*3)
>>> to_convert = [
...     res for (i, res) in enumerate(col.get_monomers())
...     if not (i + 1) % 3]
>>> for pro in to_convert:
...     isambard.ampal.non_canonical.convert_pro_to_hyp(pro)
>>> col.sequences
['GPXGPXGPXGPXGPXGPXGPX', 'GPXGPXGPXGPXGPXGPXGPX', 'GPXGPXGPXGPXGPXGPXGPX']

isambard.modelling.scwrl module

This module provides an interface to the program Scwrl4.

The Scwrl executable must be on your path. Run the test_scwrl function to determine if it is available.

For more information on Scwrl see [1].

References

[1]Krivov GG, Shapovalov MV, and Dunbrack Jr RL (2009) “Improved prediction of protein side-chain conformations with SCWRL4.”, Proteins.
isambard.modelling.scwrl.pack_side_chains_scwrl(assembly, sequences, rigid_rotamer_model=True, hydrogens=False)[source]

Packs side chains onto a protein structure.

Parameters:
  • assembly (AMPAL Assembly) – AMPAL object containing some protein structure.
  • sequence ([str]) – A list of amino acid sequences in single-letter code for Scwrl to pack.
  • rigid_rotamer_model (bool, optional) – If True, Scwrl will use the rigid-rotamer model, which is faster but less accurate.
  • hydrogens (bool, optional) – If False, the hydrogens produced by Scwrl will be ommitted.
Returns:

packed_structure – A new AMPAL Assembly containing the packed structure, with the Scwrl score in the tags.

Return type:

AMPAL Assembly

isambard.modelling.scwrl.parse_scwrl_out(scwrl_std_out, scwrl_pdb)[source]

Parses SCWRL output and returns PDB and SCWRL score. :param scwrl_std_out: Std out from SCWRL. :type scwrl_std_out: str :param scwrl_pdb: String of packed SCWRL PDB. :type scwrl_pdb: str

Returns:
  • fixed_scwrl_str (str) – String of packed SCWRL PDB, with correct PDB format.
  • score (float) – SCWRL Score
isambard.modelling.scwrl.run_scwrl(pdb, sequence, path=True, rigid_rotamer_model=True, hydrogens=False)[source]

Runs SCWRL on input PDB strong or path to PDB and a sequence string.

Parameters:
  • pdb (str) – PDB string or a path to a PDB file.
  • sequence (str) – Amino acid sequence for SCWRL to pack in single-letter code.
  • path (bool, optional) – True if pdb is a path.
  • rigid_rotamer_model (bool, optional) – If True, Scwrl will use the rigid-rotamer model, which is faster but less accurate.
  • hydrogens (bool, optional) – If False, the hydrogens produced by Scwrl will be ommitted.
Returns:

  • scwrl_std_out (str) – Std out from SCWRL.
  • scwrl_pdb (str) – String of packed SCWRL PDB.

Raises:

ChildProcessError – Raised if SCWRL failed to run.

isambard.modelling.scwrl.scwrl_available()[source]

True if Scwrl is available.