7.6. Reactions

Reaction.py: Methods to execute reactions.

minedatabase.reactions.transform_all_compounds_with_full(compound_smiles: list, coreactants: dict, coreactant_dict: dict, operators: dict, generation: int, explicit_h: bool, kekulize: bool, processes: int) Tuple[dict, dict]

Transform compounds given a list of rules.

Carry out the transformation of a list of compounds given operators. Generates new products and returns them to be processed by pickaxe.

Parameters
compound_smileslist

List of SMILES to react.

coreactantsdict

Dictionary of correactants RDKit Mols defined in rules.

coreactant_dictdict

Dictionary of correactant compoudnds defined in rules.

operatorsdict

Dictionary of reaction rules.

generationint

Value of generation to expand.

explicit_hbool

Whether or not to have explicit Hs in reactions.

kekulizebool

Whether or not to kekulize compounds.

processesint

Number of processors being used.

Returns
Tuple[dict, dict]

Returns a tuple of New Compounds and New Reactants.