[Rdkit-discuss] Empty SVG for valid mol?

2014-02-12 Thread Michał Nowotka
I want to get SVG image for some compound: import cairo from rdkit import Chem import StringIO from rdkit.Chem.Draw import cairoCanvas imageData = StringIO.StringIO() surf = cairo.SVGSurface(imageData,200,200) ctx = cairo.Context(surf) mol =

Re: [Rdkit-discuss] Empty SVG for valid mol?

2014-02-12 Thread Greg Landrum
Hi Michal, you're going to kick yourself. ;-) On Wed, Feb 12, 2014 at 4:06 PM, Michał Nowotka mmm...@gmail.com wrote: I want to get SVG image for some compound: import cairo from rdkit import Chem import StringIO from rdkit.Chem.Draw import cairoCanvas imageData =

[Rdkit-discuss] Stop reaction opening ring

2014-02-12 Thread Matthew Swain
Hi, If any atoms specified in a reaction happen to form a ring, RDKit will break it open: rxn = AllChem.ReactionFromSmarts('[C:1][C:2][O:3][C:4][C:5][C:1][C:2][C:3][C:4][C:5]') mol = Chem.MolFromSmiles('C1CCOC1') prod = rxn.RunReactants((mol,))[0][0] Chem.MolToSmiles(prod)

[Rdkit-discuss] boost::regex

2014-02-12 Thread Igor Filippov
Dear Greg et al, I was wondering if the only binary dependency on boost is boost::regex used in SLN reader/writer? If that is the case would it be possible to ifdef this code with a flag - I never had a need to use SLN but compiling the correct version of boost::regex and caring around associated

Re: [Rdkit-discuss] boost::regex

2014-02-12 Thread Greg Landrum
Hi Igor, On Wed, Feb 12, 2014 at 4:42 PM, Igor Filippov igor.v.filip...@gmail.comwrote: Dear Greg et al, I was wondering if the only binary dependency on boost is boost::regex used in SLN reader/writer? If that is the case would it be possible to ifdef this code with a flag - I never had

Re: [Rdkit-discuss] boost::regex

2014-02-12 Thread Igor Filippov
Fantastic! You're ahead of the curve as always! Igor On Wed, Feb 12, 2014 at 10:55 AM, Greg Landrum greg.land...@gmail.comwrote: Hi Igor, On Wed, Feb 12, 2014 at 4:42 PM, Igor Filippov igor.v.filip...@gmail.comwrote: Dear Greg et al, I was wondering if the only binary dependency on

Re: [Rdkit-discuss] Empty SVG for valid mol?

2014-02-12 Thread Michał Nowotka
Yes, I forgot, but only it this example, not in real code. Corrected code still returns empty svg: import cairo from rdkit import Chem import StringIO from rdkit.Chem.Draw import cairoCanvas imageData = StringIO.StringIO() surf = cairo.SVGSurface(imageData,200,200) ctx = cairo.Context(surf) mol