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
Hi,
You can create new object that stores MMP and has default pandas and
ipython representation as base64 encoded png. This usually works for me,
but I'm not sure why in this case it works only for ipython representation
and not for pandas.. The code:
# codecell
import pandas as pd
import
Hi,
I'm not sure if it will work but you can try:
df['new'] = df['Transformation'].map(showLine_MMP)
Regards,
Samo
On Thu, May 8, 2014 at 4:31 PM, paul.czodrow...@merckgroup.com wrote:
Dear RDKitters,
I started to play around with the great Chem.PandasTool contribution
provided by
Hi Paul,
The Draw modules also contains a ReactionToImage function;
Your MMP can be read as a reaction.
Hope this helps further!
Grégori
Date: Thu, 8 May 2014 16:31:32 +0200
From: paul.czodrow...@merckgroup.com
Subject: [Rdkit-discuss] Chem.PandasTools
To: rdkit-discuss@lists.sourceforge.net
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
Hi Paul,
The Draw modules
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'
6 matches
Mail list logo