Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-08 Thread Greg Landrum
On Tue, Sep 6, 2016 at 10:00 PM, Dimitri Maziuk wrote: > On 09/05/2016 03:47 AM, Greg Landrum wrote: > > Dave's right about the font size: it's expressed in whatever coordinates > > the molecule is being drawn in. > > I'd put Dave's explanation in the doc++ (?) comment on

Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-06 Thread Dimitri Maziuk
PS. looking at this, it may have come out a little confusing, so I start with a 3D mol file and run it through rdkit.Chem.AllChem.Compute2DCoords() CID112084.svg is what comes out. Running rdkit.Chem.AddHs() before Compute2DCoords() generates the layout seen on other 3 pictures.

Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-06 Thread Dimitri Maziuk
On 09/05/2016 03:47 AM, Greg Landrum wrote: > Dave's right about the font size: it's expressed in whatever coordinates > the molecule is being drawn in. I'd put Dave's explanation in the doc++ (?) comment on FontSize get/setter in MolDraw2D:

Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-05 Thread Greg Landrum
Dave's right about the font size: it's expressed in whatever coordinates the molecule is being drawn in. Cross-platform font handling is tough. Cross-platform, cross-toolkit font handling is even tougher. What's currently there seems to be an quasi-workable solution. I suspect the other part of

Re: [Rdkit-discuss] rdMolDraw2D drawing code

2016-09-05 Thread David Cosgrove
HI Dmitri, Sorry for the delay replying. I assume that by 'add padding' you mean that the code that generates the 2D drawing coordinates should take account of the size of the labels and would, from your example, maybe open out the C9-O23-C14 bond a bit so that O21 and O24 are further apart? If

[Rdkit-discuss] rdMolDraw2D drawing code

2016-09-02 Thread Dimitri Maziuk
Hi all, I finally got a round tuit for playing with the drawing code and I like it -- great job, thank you Greg and Dave and everyone who contributed. One question though: is it possible to add padding around atom labels? Or use some other trick to make the attached look less crowded? (Yes, I do