Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-07 Thread Gianmarco Ghiandoni
Looks like the same issue. Glad that you are planning to work on it so I don't have to enforce a a narrow range of RDKit versions in my installation specs. Thanks, Giammy On Fri, 6 May 2022, 16:21 David Cosgrove, wrote: > Hi Giammy, > You're right, the new pictures look pretty rubbish. I

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-06 Thread David Cosgrove
Hi Giammy, You're right, the new pictures look pretty rubbish. I assume it's related to https://github.com/rdkit/rdkit/discussions/5195. I'll fix it over the weekend, and hopefully it'll show up in the next patch release. Dave On Fri, May 6, 2022 at 1:07 PM Gianmarco Ghiandoni wrote: > Hi

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-06 Thread Gianmarco Ghiandoni
Hi Dave, Thanks for your reply. The reason why my library sticks to 2021.09 is because I get even more trouble with later versions of RDKit. These are two examples of rendering with 2021 and 2022: [image: image.png][image: image.png] The good news is that your padding suggestion works, so I set

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-05 Thread David Cosgrove
Hi Giammy, On reflection overnight, you might try d2d.drawOptions().padding = 0.2 or something. That should increase the amount of empty space around the molecule (the default is 0.05, and it's the fraction of the width/height of the image) such that there's enough room to show the whole

Re: [Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-04 Thread David Cosgrove
Hi Giammy, I’d be pretty disappointed if that happened in 2022.03.[12]. I don’t think there’s a fix for that in 2021.09. If it still happens in the latest version please file it as a bug and I’ll take a look at it. The molecule rendering was completely overhauled over the winter to try and

[Rdkit-discuss] Annotations get trimmed on molecule renderings

2022-05-04 Thread Gianmarco Ghiandoni
Hi all, I am using rdkit_pypi==2021.9.4 to generate visualisation of compounds with their atomic hydrogen bond strengths. In particular, I am using this function to produce an SVG string: d2d = rdMolDraw2D.MolDraw2DSVG(fig_size[0], fig_size[1]) d2d.drawOptions().annotationFontScale = 0.7