Re: [Open Babel] generate image dynamically

2018-12-26 Thread Dimitri Maziuk via OpenBabel-discuss
On 12/23/18 2:52 PM, Spencer Trinh wrote: > output=pybel.Outputfile('svg',filename='testsvg.svg',opt={'u':None,'C':None}) > > for name,mol in mols.items(): > > mol.removeh() > > mol.title=name > > output.write(mol) > > output.close() From

[Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Dimitri Maziuk via OpenBabel-discuss
(Repost with a catchy Subject) Noel, Geoff, this sounds like a bug: On 12/23/18 2:52 PM, Spencer Trinh wrote: > > output=pybel.Outputfile('svg',filename='testsvg.svg',opt={'u':None,'C':None}) > for name,mol in mols.items(): > mol.removeh() > mol.title=name > output.write(mol) > output.close()

Re: [Open Babel] Help using Pybel in Microsoft Visual Studio and from within batch file

2018-12-26 Thread Geoffrey Hutchison
> My second question is regarding running python programs in command line, > have you ever tried to run the python program that imports pybel from inside > a batch file? For me this throws an error "ModuleNotFoundError: No module > named pybel". One way or another, the environment is different.

Re: [Open Babel] generate image dynamically

2018-12-26 Thread Dimitri Maziuk via OpenBabel-discuss
Noel, Geoff, this sounds like a bug: On 12/23/18 2:52 PM, Spencer Trinh wrote: > > output=pybel.Outputfile('svg',filename='testsvg.svg',opt={'u':None,'C':None}) > for name,mol in mols.items(): > mol.removeh() > mol.title=name > output.write(mol) > output.close() > ... The svg file itself has

Re: [Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Fredrik Wallner
The svg-format has an option to omit the XML declaration, namely ’x’. So try with opt={’u’:None, ’C’:None, ’x’:None} I haven’t had time to test though... > 26 dec. 2018 kl. 21:14 skrev Dimitri Maziuk via OpenBabel-discuss > : > > (Repost with a catchy Subject) > > Noel, Geoff, > > this

Re: [Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Dimitri Maziuk via OpenBabel-discuss
PS I haven't looked at SVG specs too closely: anyone knows what is does with multiple "..." elements in the same file? -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu signature.asc Description: OpenPGP digital signature

Re: [Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Dimitri Maziuk via OpenBabel-discuss
On 12/26/18 4:23 PM, Fredrik Wallner wrote: > The svg-format has an option to omit the XML declaration, namely ’x’. So try > with opt={’u’:None, ’C’:None, ’x’:None} > I haven’t had time to test though... Outputfile shouldn't need an extra option for writing out valid files. A valid XML file

Re: [Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Spencer Trinh
i played around with the xml file and indeed, if you remove the repeated declarations and shift the x-axis of the other structures around relative to the first, then the added structures can be seen, otherwise they overlap each other and only one structure is viewable. Vào Th 4, 26 thg 12, 2018