Dear RDkit users,

I am using futures.ProcessPoolExecutor to execute some functions in
parallel mode. But when passing RDkit mol object, the molecule properties
are not preserved by default. There was a similar topic raised in 2017 (
https://sourceforge.net/p/rdkit/mailman/message/35602828/).

As ProcessPoolExecutor need to pickle the parameters, refer to a ticket
raised in 2017 (https://github.com/rdkit/rdkit/issues/1320), I have come up
with the following solution:

   -

   before submit jobs to ProcessPool, change the default rdkit mol pickle
   setting
   - Chem.SetDefaultPickleProperties(Chem.PropertyPickleOptions.AllProps)

   inside the function that is called by the ProcessPool jobs, change the
   default rdkit mol pickle setting
   - Chem.SetDefaultPickleProperties(Chem.PropertyPickleOptions.AllProps)
      -


HTH

Zhenting

11/22/2020



   -
      -
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to