Hi Brian,
Can you provide a complete block of code of the serial code or the parallel
block and synthesize function?
Best,
Christos
Christos Kannas
Researcher
Ph.D Student
Mob (UK): +44 (0) 7447700937
Mob (Cyprus): +357 99530608
[image: View Christos Kannas's profile on LinkedIn]
<http://cy.linkedin.com/in/christoskannas>
On 2 March 2015 at 19:26, Bennion, Brian <benni...@llnl.gov> wrote:
> That is a great help and I will make the changes.
>
> I realized however that I was only operating on the same reaction nproc
> times and not actually dividing up the real work to be done.
>
> For example, one scaffold has 2 sites that I would like to make changes
> to. however they are not identical sites and require their own list of
> precursor compounds (eg primary and secondary amines).
>
> Need to figure out how to "vectorize" the nested loops I have in the
> serial script in order to properly split up the entire job.
>
> Each loop is driven by list of molecule objects.
>
> Brian
>
>
> ------------------------------
> *From:* Christos Kannas [chriskan...@gmail.com]
> *Sent:* Monday, March 02, 2015 10:46 AM
> *To:* Bennion, Brian
> *Cc:* RDKit
> *Subject:* Re: [Rdkit-discuss] compatibiltiy between parallel python and
> rdkit
>
> Hi Brian,
>
> This is due to the way all parallel Python packages handle message
> transfer across processes. They pickle the message sent, and RDKit's
> default molecule object is not pickle safe (if such a term exists). You
> have to convert molecule objects to PropertyMol ones that are pickle safe.
>
> Best,
>
> Christos Kannas
>
> Sent from my Galaxy Note 4.
> On 2 Mar 2015 17:50, "Bennion, Brian" <benni...@llnl.gov> wrote:
>
>> Hello,
>>
>> I am relatively new to rdkit but have found it to be very useful in
>> creating compounds with the reaction functions.
>>
>> Currently my project involves taking a handful of scaffolds and creating
>> shrubbery for these scaffolds based on available precursor compounds. I
>> found that creating more than a few hundred compounds takes much to long (i
>> am not very patient). It would be best if I could create 100K compounds an
>> a few hours. Again, I have a perfectly working serial script that does
>> want I need.
>>
>> That is when I found parallel python and spent a few days learning how to
>> get the two projects to play with each other.
>>
>> I am stuck at a point where I make a command:
>> molename=m.GetOpt("_Name")
>> and this stops the program with:
>>
>> An error has occured during the function execution
>> Traceback (most recent call last):
>> File "/usr/lib/python2.7/site-packages/ppworker.py", line 90, in run
>> __result = __f(*__args)
>> File "<string>", line 31, in synthesize
>> KeyError: '_Name'
>>
>> It seems that the parallel process does not know what this command is
>> supposed to do.
>> The parallel process is started with this code.
>> for index in xrange(parts):
>> starti = start+index*step
>> endi = min(start+(index+1)*step, end)
>> # Submit a job which will synthesize a number of compounds
>> # synthesize - the function
>> # give starting info to synthesize (hash, starti, endi) - tuple with
>> arguments for synthesize
>> # () - tuple with functions on which function synthesize depends
>> # ("Allchem",) - tuple with module names which must be imported
>> before synthesize execution
>> jobs.append(job_server.submit(synthesize, (ms1, ms2,rxnR1, rxnR23,
>> oxime, starti, endi), (),
>> ("rdkit","rdkit.Chem","rdkit.Chem.AllChem","rdkit.Chem.Draw",)))
>>
>>
>> I am naive to think that these two python modules can not play together?
>> Or can I fix a mistake I have made somewhere
>>
>>
>> Brian
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss