Dear Jean-Paul,
> > (1)
> > "
> > from multiprocessing import Pool
> > p4 = Pool(processes=4)
ms = [x for x in Chem.SDMolSupplier('cpds.sdf') if x is not None]
> > def fps_calc(m):
> > fps = [GetMorganFingerprint(x,3) for x in m]
> > return fps
> > fps = p4.map(fps_calc,ms)
> > "
> > ==>
> > "TypeError: 'Mol' object is not iterable"
> >
>
> The object "m" is a single molecule and not an iterable (array, set etc).
> I guess you snipped an important bit of code (what type is ms?)
>
This is really strange, since I was pretty sure that ms contains a list of
molecules (see the above statement how ms is defined).
>
> > (2)
> > "
> > from multiprocessing import Pool
> > p4 = Pool(processes=4)
> > def distij(i,j,fps=fps):
> > return 1-DataStructs.DiceSimilarity(fps[i],fps[j])
> >
> > def DivSelection(distij,nfps,quantity_train):
> > picker = MaxMinPicker()
> > picked_indices = picker.LazyPick(distij,nfps,quantity_train)
> > return picked_indices
> > "
> > pickIndices = p4.map(DivSelection, ???)
> >
>
> I imagine, even if I haven't used the multiprocessing module, that you
> would need to pass the list of parameters (tuples maybe?) to feed into
> the multiple DivSelection calls.
I tried to pass a tuple, but in my case it didn't work.
> I hope this puts you on the right track... I am just filling in till
> Greg gives an incredible one liner which will solve all your problems.
> JP
Thanks so far,
Paul
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.
Click http://disclaimer.merck.de to access the German, French, Spanish and
Portuguese versions of this disclaimer.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss