Dear Grégori, 

when storing the image into a new data frame:
"
MMP_reaction = Chem.rdChemReactions.ReactionFromSmarts("[*:1][H]>>[*:1]C")
newnew_df = pd.DataFrame(columns=['fig'],index=[1] )
newnew_df['fig'].ix[1] = Draw.ReactionToImage(MMP_reaction)
"

apparently, the image can be stored in a data frame, but in the ipython 
notebook it is displayed as "<PIL image...."



Cheers & Thanks so far (in particular for the impressive speed in 
response!),
Paul

> Hi Paul,
> 
> You first have to read the MMP into a reaction object 
> (Chem.ReactionFromSmarts).
> 
> Greg
> 
> On Friday, May 9, 2014, <paul.czodrow...@merckgroup.com> wrote:
> Dear Gregori & Samo,
> 
> thanks for your hints.
> 
> I just tried running
> 
> Draw.ReactionToImage("[*:1][H]>>[*:1]C")
> 
> =>
> 
> AttributeError: 'str' object has no attribute 'GetNumReactantTemplates'
> 
> 
> 
> BTW, how would I finally add a picture to a Pandas data frame?
> 
> 
> Cheers,
> 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://www.merckgroup.com/disclaimer to access the German, French, 
Spanish and Portuguese versions of this disclaimer.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to