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

