Re: [Rdkit-discuss] Fixed scale drawing

2017-09-15 Thread Maciek Wójcikowski
Hi again, I've managed to make it work. Please find the working code attached as a notebook. Unfortunately, it seam there is a small bug with SetScale: if the diff in min/max x or y in the minimum point and maximum point is zero or close to zero, then the molecules are broken. I've added a margin

Re: [Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Maciek Wójcikowski
I've tried that, but ended up with molecules out of picture. I'll try again tomorrow and ping back here should I succeed. The real problem were two atom molecules, which have delta x or y = 0, such as C=0 or CN. Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl

Re: [Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Greg Landrum
Hi Maciek, You can do this by calling setScale() method on MolDraw2D(). There's not a decent python example around yet (would be something for the cookbook I suppose), but the C++ code isn't too complex and demonstrates how it works:

[Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Maciek Wójcikowski
Hi RDKitters! Quick question: is there a way to force drawing to output molecules on a grid image or separate in fixed scale (i.e. constant/matching bond length)? Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl