Re: [Open Babel] OpenBabel-discuss Digest, Vol 160, Issue 16

2019-09-21 Thread Dimitri Maziuk via OpenBabel-discuss
On 9/21/2019 11:28 AM, Geoffrey Hutchison wrote: On the other hand, not every file format supports arbitrary precision (e.g., 8 decimals or more) - there's not much that babel can do about that, except by suggesting other formats with better suitability. OTGH I've seen lots of numbers

Re: [Open Babel] converting certain molecules to 3D

2019-08-07 Thread Dimitri Maziuk via OpenBabel-discuss
On 8/6/2019 8:16 PM, Geoffrey Hutchison wrote: If there's stereochemistry in any of your 2D molecules, you're not guaranteed to get the right 3D conformer from the conversion. What? Why do you say that? Because that's how it works. If I have a 2D alanine SDF and I "convert" to 3D, I may get

Re: [Open Babel] converting certain molecules to 3D

2019-08-06 Thread Dimitri Maziuk via OpenBabel-discuss
On 8/5/19 11:53 AM, c.blanes wrote: > hello, > I'm interested in converting to 3D only the 2D molecules in a batch where 2D > and 3D molecules are mixed but I don't know how I could distinguish them > using obabel in a python script. Could you help me please? What format are they in? If there's

Re: [Open Babel] PDB files with multiple bonds via CONECT

2019-07-30 Thread Dimitri Maziuk via OpenBabel-discuss
On 7/29/2019 4:53 PM, Stefano Forli wrote: ... PDB files ... Just a note: PDB has stopped accepting X-ray structures in .pdb format a while back, and is going to stop accepting .pdb NMR structures soon. I.e. what you are discussing is a dead format essentially. Dima

Re: [Open Babel] Python Docker image

2019-04-06 Thread Dimitri Maziuk via OpenBabel-discuss
On 4/6/2019 3:04 AM, moritz.be...@gmail.com wrote: Thanks for the hint to use conda. However, maybe alpine-glibc is the wrong base image? You snuck a /bin/bash in there and when I change that to /bin/sh or /bin/ash I get a lot of errors upon importing pybel. That image is for a service

Re: [Open Babel] Python Docker image

2019-04-02 Thread Dimitri Maziuk via OpenBabel-discuss
On 4/2/19 7:42 PM, Dimitri Maziuk via OpenBabel-discuss wrote: sorry, too much trimming: > FROM frolvlad/alpine-glibc > RUN echo 'export PATH=/opt/anaconda/bin:$PATH' > > /etc/profile.d/anaconda.sh && \ > wget --quiet \ > https://repo.continuum.io/miniconda/Minicon

Re: [Open Babel] Python Docker image

2019-04-02 Thread Dimitri Maziuk via OpenBabel-discuss
On 4/2/19 6:45 PM, moritz.be...@gmail.com wrote: > Hi all, > > I'm building Docker images for openbabel with Python bindings for > Python versions 3.6 - 3.8 from source. Don't. FROM frolvlad/alpine-glibc RUN echo 'export PATH=/opt/anaconda/bin:$PATH' > /etc/profile.d/anaconda.sh && \ wget

Re: [Open Babel] Some questons

2019-01-31 Thread Dimitri Maziuk via OpenBabel-discuss
On 1/31/19 12:52 PM, Geoffrey Hutchison wrote: > Noel O'Boyle posted an article on SMILES -> SVG using Open Babel: > https://baoilleach.blogspot.com/2015/02/cheminformaticsjs-open-babel.html > > > I believe there's also

Re: [Open Babel] generate image dynamically

2019-01-07 Thread Dimitri Maziuk via OpenBabel-discuss
On 1/7/19 11:04 AM, Dmitri Maziuk via OpenBabel-discuss wrote: > .. subscribe as e.g. > person@work, then have their @work address forwarded to gmail, later > try to unsubscribe their person@work address and wonder why that is not > working. Sorry, braino: I meant "trying to usubscribe

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

2018-12-28 Thread Dimitri Maziuk via OpenBabel-discuss
On 12/28/18 4:43 PM, Spencer Trinh wrote: > I still don't understand. If I use mol.write, I can only do one at a time > right?Do I just loop mol.write and return the result at end or something ? Yes. Collect them into an array of SVG strings. I'd probably try to render them in a template as or

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

2018-12-28 Thread Dimitri Maziuk via OpenBabel-discuss
On 12/28/18 6:03 AM, Spencer Trinh wrote: > ... The xml file generated was thru Outputfile() and thus a file path > is required. How to generate as a string? For the 3rd time: pybel.Molecule.write() -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

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

[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] 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] 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

Re: [Open Babel] Getting bond information

2018-05-24 Thread Dimitri Maziuk via OpenBabel-discuss
On 5/24/2018 4:10 AM, Julian Kerr wrote: Any babel command returning the bond information will work for me (not just converting to a file format). if your source is mmCIF, all you need to do is look at _chem_comp_bond table. Dima