ProtoCaller.Ensemble.Perturbation module¶
This Module contains the Perturbation
class
which needs two parametrised ligands and performs subsequent alignment of the first
ligand to a reference ligand (if this is not needed, it can be aligned to itself) and
alignment of the second ligand to the first ligand with appropriate atom mapping
using routines from rdkitwrapper
, RDKit and BioSimSpace.
-
class
ProtoCaller.Ensemble.Perturbation.
Perturbation
(ligand1, ligand2, name=None)¶ Bases:
object
The main class responsible for single-topology perturbations in ProtoCaller.
- Parameters
ligand1 (ProtoCaller.Ensemble.Ligand.Ligand) – Initialises ligand1.
ligand2 (ProtoCaller.Ensemble.Ligand.Ligand) – Initialises ligand1.
name (str or None, optional) – Initialises name.
-
ligand1
¶ The first ligand.
-
ligand2
¶ The second ligand.
-
current_ref
¶ The current reference ligand.
-
alignAndCreateMorph
(ref)¶ Default alignment method wrapping the two alignment stages - aligning ligand1 to a reference and aligning and mixing ligand2 to ligand1.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
- Returns
morph (BioSimSpace.System) – The mixed topology object object.
mcs ([tuple]) – The maximum common substructure of the two molecules.
-
alignToEachOther
(output_filename=None, realign=False, **kwargs)¶ Aligns the second ligand to the first ligand.
- Parameters
output_filename (str) – The name of the output file. None uses the default value.
realign (bool) – Whether to realign an already aligned ligand.
kwargs – Keyword arguments to pass to ProtoCaller.Wrappers.rdkitwrapper.alignTwoMolecules.
- Returns
morph (BioSimSpace.System) – The mixed topology object.
mcs ([tuple]) – The maximum common substructure of the two molecules.
-
alignToReference
(ref, output_filename=None, realign=False, **kwargs)¶ Aligns the first ligand to a reference ligand.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
output_filename (str) – The name of the output file. None uses the default value.
realign (bool) – Whether to realign an already aligned ligand.
kwargs – Keyword arguments to pass to ProtoCaller.Wrappers.rdkitwrapper.alignTwoMolecules.
- Returns
mcs – The maximum common substructure of the two molecules.
- Return type
[tuple]
-
get_morph
(ref)¶ Returns the mixed topology object corresponding to a reference ligand.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
- Returns
morph – The mixed topology object aligned to the reference ligand.
- Return type
BioSimSpace.System
-
get_parametrised_files1
(ref)¶ Returns parametrised files for the first ligand corresponding to a reference ligand.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
- Returns
files – The parametrised files for the first ligand aligned to the reference ligand. The first file is a topology file and the second file is a coordinate file.
- Return type
[str, str]
-
get_parametrised_files2
(ref)¶ Returns parametrised files for the second ligand corresponding to a reference ligand.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
- Returns
files – The parametrised files for the first second aligned to the reference ligand. The first file is a topology file and the second file is a coordinate file.
- Return type
[str, str]
-
property
isAligned
¶ Whether there is a mixed topology file that has been aligned to the current reference ligand.
-
isAlignedTo
(ref)¶ Returns whether there is a mixed topology file that has been aligned to the reference ligand.
- Parameters
ref (ProtoCaller.Ensemble.Ligand.Ligand) – The reference ligand.
- Returns
exists – Whether the mixed topology file has already been aligned to the reference ligand.
- Return type
bool
-
property
morph
¶ The mixed topology object corresponding to the current reference ligand.
-
property
name
¶ The name of the perturbation.
-
property
parametrised_files1
¶ The parametrised files for the first ligand corresponding to the current reference ligand.
-
property
parametrised_files2
¶ The parametrised files for the second ligand corresponding to the current reference ligand.