Closed MachineGUN001 closed 1 year ago
I do not fully understand the question. These functions can be used if one wants to process several molecules simultaneously. This could be efficient with a relatively small number of parallel processes, otherwise access to a fragment DB will become a bottleneck. All arguments can be supplied as usual. Example
from crem.crem import mutate_mol, mutate_mol2
from multiprocessing import Pool
from functools import partial
from rdkit import Chem
m = Chem.MolFromSmiles('CCCC')
pool = Pool(3)
for res in pool.imap_unordered(partial(mutate_mol2, db_name='replacements_sa2.db', replace_ids=[0]), [m]):
print(len(res), res)
got it. thank you for providing the demonstration and explanation. This is a very interesting use.
hi, DrrDom,
could you please provide some example for using
grow_mol2
andmut_mol2
functions? In particular, how to set the parameters, such asreplace_ids
? Many many thanks