Hi all,

On a related topic, is it possible to depict an arbitrary string on a cairo
canvas? I am thinking particularly depicting the name or ID of a molecule
below its structure.

Regards,

George

On 12 July 2011 06:36, Peter Schmidtke <[email protected]> wrote:

> Thanks Greg,
>
> I'll give it a try ;)
>
> ++
>
> Peter
>
> On 07/11/2011 06:47 PM, Greg Landrum wrote:
> > Hi Peter,
> >
> > On Mon, Jul 11, 2011 at 1:35 PM, Peter Schmidtke <[email protected]>
> wrote:
> >
> >> I wondered if it was possible and easy to show some numerical properties
> >> or strings or whatever for each atom on a 2d representation of a
> molecule.
> >>
> >> Is something like that implemented (didn't really see it right now)?
> >>
> > There's nothing like that built in, but pretty much everything you
> > need to be able to annotate the drawing yourself after the molecule
> > has been drawn is already there.
> >
> > Take a look at the code in $RDBASE/rdkit/Chem/Draw/__init__.py:MolToImage
> > After line 70 executes, you have a canvas (either cairo, aggdraw, or
> > sping, depending on which system you have installed) that contains the
> > molecule drawing as well as MolDrawing instance named drawer. drawer
> > has a data element atomPs that can be used to get the position of
> > atoms in canvas coordinates : drawer.atomPs[mol][atomIdx]. The code
> > for the individual canvases shows how to do something with these
> > coordinates.
> >
> >  -greg
> >
>
>
> --
>
> Peter Schmidtke
> PhD Student
> Dept. Physical Chemistry
> Faculty of Pharmacy
> University of Barcelona
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to