Hi,

Replying to the list, I think other may have better answer than mine.


Hello Pascal—
>
>
>
> Thanks for the response and working through this.
>
>
>
> I have responded to your questions below.
>
>
>
> Stan
>
>
>
>
>
>
>
>
> *From:* Pascal Muller [mailto:pascal.jm.mul...@gmail.com]
> *Sent:* Friday, November 10, 2017 5:00 AM
> *To:* Stanley P Kolis <kolis_stan...@lilly.com>; babel <
> openbabel-discuss@lists.sourceforge.net>
> *Subject:* [EXTERNAL] Re: [Open Babel] Problem Converting .cdx files
> using Pybel
>
>
>
> Dear Stan,
>
>
>
> OpenBabel Version:        2.4.1
>
> Operating System:           Windows/Jupyter Notebook
>
>
>
> I have been trying to use the instructions at this link
> <https://openbabel.org/docs/dev/UseTheLibrary/Python_Pybel.html> and also
> in the original Chemistry Central Journal
> <https://ccj.springeropen.com/articles/10.1186/1752-153X-2-5>
> publication.  I am able to convert .sdf files over to .smi files without
> any problem.  However, when I try to convert .cdx files to .sdf or .smi
> files, the system crashes and I get an error in the command window that
> tells me that there is no ‘ChemDraw Header’ that pybel/openbabel is
> expecting to see.
>
>
>
> I have included a .cdx file that I’ve been using.  Any chance that you
> guys can help me figure out what’s going on?
>
>
>
>
>
> With the command line (Open Babel 2.4.1, Linux)
>
> obabel -icdx multiNitroCompounds.cdx -OmultiNitroCompounds.sdf
>
>
>
> the conversion is done without problem, but with one warning: "Alias O2N
> was not chemically interpreted"
>
> ·        *I see the same error message as above when working from the
> command line and the jupyter notebook.*
>
> Indeed, nitro groups are not all represented in the same way in the sdf
> file (see picture).
>
> I think that it should not be linked to the "no ChemDraw header" message,
> however.
>
> What's the message exactly? May you share the corresponding part of your
> Pybel script?
>
> ·        *The attached pdf shows the error messages received in the
> Jupyter notebook and at the command prompt in the background.*
>
> ·        *Script is pretty simple:*
>
> o   *import pybel as pb*
>
> o   *allmols = [mol for mol in pb.readfile(“cdx”, “untitled.cdx”)]*
>

Indeed, I have the same error than you using pybel:

 ==============================
*** Open Babel Warning  in Expand
  Alias O2N was not chemically interpreted

==============================
*** Open Babel Error  in CDXReader
  Invalid file, no ChemDraw Header
terminate called without an active exception
Aborted


It seems than the .cdx file may somehow badly formated, raising an error
originating in chemdrawcdx.cpp.

I have not ChemDraw installed, so I can't test other cdx file.
Does another .cdx file raise the same error?

Best regards,
Pascal



>
> Without using Pybel, does the Open Babel GUI convert the .cdx file?
>
> ·        *The Open Babel GUI does work to do the conversion (to both the
> .sdf and .smi formats).*
>
> ·        *This is a good short-term fix, but would still like to be able
> to call the conversion script from other files I’ve written.*
>
>
>
> Regards,
>
> Pascal
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to