-
class
mdfptools.Composer.MDFP(mdfp_dict)[source]¶ A MDFP object contains a set of features for a molecule, obtaining from a simulation or a set of simulations.
Methods
get_mdfp(self)- returns
-
__init__(self, mdfp_dict)[source]¶ - Parameters
fp_dict (dict) –
Keys are each of the type features a given Extractor obtains, e.g. “2d_count” are the 2D topological features obtained from molecule SMILES, “intra_lj” are the intra-molecular LJ energies obtained from simulation.
Values are the corresponding set of numerics, stored as lists.
-
class
mdfptools.Composer.BaseComposer[source]¶ The BaseComposer class containing functions that can be used by different composers for different types of simulations
Methods
run(smiles)- param smiles
SMILES string of the solute molecule
-
classmethod
_get_relevant_properties()[source]¶ Where the set of features to be included in the final MDFP are defined
-
classmethod
_get_2d_descriptors()[source]¶ Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs)[source]¶ Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
__init__(self, /, *args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
class
mdfptools.Composer.SolutionComposer[source]¶ Composer used to extract features from solution simulations, namely one copy of solute in water solvent. This generates fingerprint most akin to that from the original publication.
Methods
run(mdtraj_obj, parmed_obj[, smiles])- param mdtraj_obj
The simulated trajectory
-
classmethod
run(mdtraj_obj, parmed_obj, smiles=None, **kwargs)[source]¶ - Parameters
mdtraj_obj (mdtraj.trajectory) – The simulated trajectory
parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated system.
smiles (str) – SMILES string of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_relevant_properties()[source]¶ Where the set of features to be included in the final MDFP are defined
-
__init__(self, /, *args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
classmethod
_get_2d_descriptors()¶ Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs)¶ Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
class
mdfptools.Composer.LiquidComposer[source]¶ Composer used to extract features from liquid simulations, namely a box containing replicates of the same molecule.
Methods
run(mdtraj_obj, parmed_obj[, smiles])- param mdtraj_obj
The simulated trajectory
-
classmethod
run(mdtraj_obj, parmed_obj, smiles=None, **kwargs)[source]¶ - Parameters
mdtraj_obj (mdtraj.trajectory) – The simulated trajectory
parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated system.
smiles (str) – SMILES string of one copy of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_relevant_properties()[source]¶ Where the set of features to be included in the final MDFP are defined
-
__init__(self, /, *args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
classmethod
_get_2d_descriptors()¶ Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs)¶ Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
class
mdfptools.Composer.SolutionLiquidComposer(solv_mdtraj_obj, solv_parmed_obj, liq_mdtraj_obj, liq_parmed_obj, smiles=None, **kwargs)[source]¶ Composer used to extract features from pairs of solution and liquid simulations.
Methods
run(smiles)- param smiles
SMILES string of the solute molecule
-
classmethod
__init__(solv_mdtraj_obj, solv_parmed_obj, liq_mdtraj_obj, liq_parmed_obj, smiles=None, **kwargs)[source]¶ - Parameters
solv_mdtraj_obj (mdtraj.trajectory) – The simulated solution trajectory
solv_parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated solution system.
liq_mdtraj_obj (mdtraj.trajectory) – The simulated liquid trajectory
liq_parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated liquid system.
smiles (str) – SMILES string of one copy of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_2d_descriptors()¶ Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs)¶ Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
classmethod
run(smiles)¶ - Parameters
smiles (str) – SMILES string of the solute molecule
MDFP¶
Molecular Dynamics Fingerprint (MDFP) Object
-
class
mdfptools.Composer.MDFP(mdfp_dict)[source] A MDFP object contains a set of features for a molecule, obtaining from a simulation or a set of simulations.
Methods
get_mdfp(self)- returns
-
__init__(self, mdfp_dict)[source] - Parameters
fp_dict (dict) –
Keys are each of the type features a given Extractor obtains, e.g. “2d_count” are the 2D topological features obtained from molecule SMILES, “intra_lj” are the intra-molecular LJ energies obtained from simulation.
Values are the corresponding set of numerics, stored as lists.
-
get_mdfp(self)[source] - Returns
- Return type
a list of floating values, i.e. the mdfp feature vector
Composers¶
Post-processing of simulation trajectories to form (compose) molecular dynamic fingerprints (MDFPs)
-
class
mdfptools.Composer.BaseComposer[source] The BaseComposer class containing functions that can be used by different composers for different types of simulations
Methods
run(smiles)- param smiles
SMILES string of the solute molecule
-
classmethod
run(smiles)[source] - Parameters
smiles (str) – SMILES string of the solute molecule
-
classmethod
_get_relevant_properties()[source] Where the set of features to be included in the final MDFP are defined
-
classmethod
_get_2d_descriptors()[source] Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs)[source] Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature.
-
class
mdfptools.Composer.SolutionComposer[source] Composer used to extract features from solution simulations, namely one copy of solute in water solvent. This generates fingerprint most akin to that from the original publication.
Methods
run(mdtraj_obj, parmed_obj[, smiles])- param mdtraj_obj
The simulated trajectory
-
classmethod
run(mdtraj_obj, parmed_obj, smiles=None, **kwargs)[source] - Parameters
mdtraj_obj (mdtraj.trajectory) – The simulated trajectory
parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated system.
smiles (str) – SMILES string of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_relevant_properties()[source] Where the set of features to be included in the final MDFP are defined
-
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature.
-
classmethod
_get_2d_descriptors() Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs) Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
class
mdfptools.Composer.LiquidComposer[source] Composer used to extract features from liquid simulations, namely a box containing replicates of the same molecule.
Methods
run(mdtraj_obj, parmed_obj[, smiles])- param mdtraj_obj
The simulated trajectory
-
classmethod
run(mdtraj_obj, parmed_obj, smiles=None, **kwargs)[source] - Parameters
mdtraj_obj (mdtraj.trajectory) – The simulated trajectory
parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated system.
smiles (str) – SMILES string of one copy of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_relevant_properties()[source] Where the set of features to be included in the final MDFP are defined
-
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature.
-
classmethod
_get_2d_descriptors() Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs) Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
class
mdfptools.Composer.SolutionLiquidComposer(solv_mdtraj_obj, solv_parmed_obj, liq_mdtraj_obj, liq_parmed_obj, smiles=None, **kwargs)[source] Composer used to extract features from pairs of solution and liquid simulations.
Methods
run(smiles)- param smiles
SMILES string of the solute molecule
-
classmethod
__init__(solv_mdtraj_obj, solv_parmed_obj, liq_mdtraj_obj, liq_parmed_obj, smiles=None, **kwargs)[source] - Parameters
solv_mdtraj_obj (mdtraj.trajectory) – The simulated solution trajectory
solv_parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated solution system.
liq_mdtraj_obj (mdtraj.trajectory) – The simulated liquid trajectory
liq_parmed_obj (parmed.structure) – Parmed object of the fully parameterised simulated liquid system.
smiles (str) – SMILES string of one copy of the solute. If mdfptools.Parameteriser was used during parameterisation, then smiles is automatically obtained from the parmed_obj.
-
classmethod
_get_2d_descriptors() Obtain those 2D topological features as described in the original publication.
-
classmethod
_get_statistical_moments(property_extractor, statistical_moments=[<function mean at 0x7f3b88a77730>, <function std at 0x7f3b88a778c8>, <function median at 0x7f3b8892d950>], **kwargs) Performs statistical weighting of the numerical properties (e.g. LJ and electrostatics energies) obtained from each frame of simulation.
- Parameters
property_extractor (mdfptools.Extractor) – The particular type of Extractor methodclass used to obtain the various properties from simulation.
statistical_moments (list) – The list of statistical weighting to be performed to each properties from all the frames. Default list of weighting are the mean, standard deviation and median.
-
classmethod
run(smiles) - Parameters
smiles (str) – SMILES string of the solute molecule
-
classmethod
_get_relevant_properties()[source] Where the set of features to be included in the final MDFP are defined