1.1.1.3.1.1.1.4. ExplorationData

class molpher.swig_wrappers.core.ExplorationData[source]

Note

If an instance of this class is created explicitly, all parameters are set to their default values (see the description of molpher.core.ExplorationData).

Contains data about the state of an exploration tree and provides facilities to read it and change it along with the morphing parameters set.

This class uses getter and setter methods to read and modify the underlying data structure. The naming conventions tightly follow the wrapped C++ implementation and should be consistent with the parameter names published in 1.

1

Hoksza D., Škoda P., Voršilák M., Svozil D. (2014) Molpher: a software framework for systematic chemical space exploration. J Cheminform. 6:7. PubMed, DOI

Warning

Not all methods that can manipulate the tree topology are implemented and exposed in the API, yet. Those few that are exposed, however, should still be considered as experimental.

getSource()[source]

Returns the source molecule.

Returns

MolpherMol instance representing the current source molecule

Return type

MolpherMol

getTarget()[source]

Returns the target molecule.

Returns

MolpherMol instance representing the current target molecule

Return type

MolpherMol

getChemicalOperators()[source]

Returns a tuple of current chemical operators as str identifiers.

Table 1.6 Currently supported chemical operators.

Identifier

Description

OP_ADD_ATOM

Add a random atom to the molecule.

OP_REMOVE_ATOM

Remove an atom from the molecule.

OP_ADD_BOND

Add a bond between two random atoms.

OP_REMOVE_BOND

Remove a bond between two random atoms.

OP_MUTATE_ATOM

Change a randomly selected atom to a different element.

OP_INTERLAY_ATOM

Insert an atom between two other atoms.

OP_BOND_REROUTE

Move one ending of a bond to another atom.

OP_BOND_CONTRACTION

Remove an atom between two atoms and connect them with a new bond.

Returns

current chemical operators

Return type

tuple of str

getFingerprint()[source]

Returns an identifier of the currently set molecular fingerprint.

Table 1.7 Currently supported molecular fingerprints.

Identifier

Description

FP_ATOM_PAIRS

FP_MORGAN

FP_TOPOLOGICAL

FP_TOPOLOGICAL_LAYERED_1

FP_TOPOLOGICAL_LAYERED_2

FP_VECTORFP

FP_TOPOLOGICAL_TORSION

FP_EXT_ATOM_PAIRS

FP_EXT_MORGAN

FP_EXT_TOPOLOGICAL

FP_EXT_TOPOLOGICAL_LAYERED_1

FP_EXT_TOPOLOGICAL_LAYERED_2

FP_EXT_TOPOLOGICAL_TORSION

Returns

molecular fingerprint identifier

Return type

str

getSimilarityCoefficient()[source]

Returns an identifier of the currently set similarity measure.

Table 1.8 Currently supported similarity measures.

Identifier

Description

SC_ALL_BIT

SC_ASYMMETRIC

SC_BRAUN_BLANQUET

SC_COSINE

SC_DICE

SC_KULCZYNSKI

SC_MC_CONNAUGHEY

SC_ON_BIT

SC_RUSSEL

SC_SOKAL

SC_TANIMOTO

SC_TVERSKY_SUBSTRUCTURE

SC_TVERSKY_SUPERSTRUCTURE

Returns

similarity measure identifier

Return type

str

getMinAcceptableMolecularWeight()[source]
Returns

minimum acceptable weight during filtering

Return type

float

getMaxAcceptableMolecularWeight()[source]
Returns

maximum acceptable weight during filtering

Return type

float

getCntCandidatesToKeep()[source]
Returns

min number of candidates

Return type

int

getCntCandidatesToKeepMax()[source]
Returns

max number of candidates

Return type

int

getCntMorphs()[source]
Returns

Return type

int

getCntMorphsInDepth()[source]
Returns

number of morphs to generate

Return type

int

getDistToTargetDepthSwitch()[source]
Returns

distance threshold

Return type

float

getCntMaxMorphs()[source]
Returns

maximum number of non-producing morphs per molecule

Return type

int

getItThreshold()[source]
Returns

number of generations until non-producing morphs are pruned

Return type

int

setSource(arg2)[source]

Set the source molecule.

Parameters

*args (MolpherMol or str) – MolpherMol instance or SMILES representing the current source molecule

setTarget(arg2)[source]

Set the target molecule.

Parameters

*args (MolpherMol or str) – MolpherMol instance or SMILES representing the current source molecule

setChemicalOperators(arg2)[source]

Set the current chemical operators as str identifiers.

Parameters

*args (tuple of str) – current chemical operators as a tuple of str identifiers

setFingerprint(arg2)[source]

Set the molecular fingerprint.

Parameters

*args (str) – molecular fingerprint identifier

setSimilarityCoefficient(arg2)[source]

Set the similarity measure.

Parameters

*args (str) – similarity measure identifier

setMinAcceptableMolecularWeight(arg2)[source]
Parameters

*args (float) – minimum acceptable weight during filtering

setMaxAcceptableMolecularWeight(arg2)[source]
Parameters

*args (float) – maximum acceptable weight during filtering

setCntCandidatesToKeep(arg2)[source]
Parameters

*args (int) – min number of candidates

setCntCandidatesToKeepMax(arg2)[source]
Parameters

*args (int) – max number of candidates

setCntMorphs(arg2)[source]
Parameters

*args (int) –

setCntMorphsInDepth(arg2)[source]
Parameters

*args (int) – number of morphs to generate

setDistToTargetDepthSwitch(arg2)[source]
Parameters

*args (float) – distance threshold

setCntMaxMorphs(arg2)[source]
Parameters

*args (int) – maximum number of non-producing morphs per molecule

setItThreshold(arg2)[source]
Parameters

*args (int) – number of generations until non-producing morphs are pruned

static load(filename)

Load data and parameters from a tree snapshot or a XML template.

Parameters

filename (str) – path to the file to load from

save(filename)[source]

Save data and parameters from a tree snapshot or a XML template.

Parameters

filename (str) – path to the file to save to