Hi,
OpenBabel seems to have an issue with Senkirkine.
http://www.chemspider.com/Chemical-Structure.10254880.html
The following will segfault, InChI comes from ChemSpider:
echo "InChI=1S/C19H27NO6/c1-5-13-10-12(2)19(3,24)18(23)25-11-14-6-8-20(4)9-7-15(16(14)21)26-17(13)22/h5-6,12,15,24H,7-11H2,1-4H3/b13-5-,14-6-/t12-,15-,19-/m1/s1" | obabel -i inchi - -xK -o inchi
The corresponding does not SEGV, but does not result in any conversion:
echo "C/C=C\1/CC@HC)(C)O)C" | obabel -i inchi - -xK -o inchi
Only the SDF/MOL get me an inchikey:
and also
http://www.chemspider.com/FilesHandler.ashx?type=str&striph=yes&id=10254880
obabel -i sdf data.sdf -xK -o inchi HPDHKHMHQGCNPE-PYWIAZMFSA-N
It seems that also most depiction services choke on the InChI:
While the corresponding SMILES from ChemSpider seems to work in
several toolkits, including OpenBabel:
https://apps.ideaconsult.net/ambit2/depict?search=C%2FC%3DC\1%2FC[C%40H]%28[C%40%40]%28C%28%3DO%29OC%2FC%2F2%3DC%2FCN%28CC[C%40H]%28C2%3DO%29OC1%3DO%29C%29%28C%29O%29C&smarts=
I tried Open Babel 2.3.2 and today's Open Babel 2.3.90 -- Mar 4 2015 (a65a93bed157d66f8fd6b68e1d5e96ba77ffa744)
Anything else where I can help debug this ?
Yours,
Steffen
The issue also occurs if the InChI is generated by obabel itself:
sneumann@acryl:~/Downloads$ obabel -i mol senkirkine.mol -o inchi - | obabel -i inchi - -xK -o inchi
1 molecule converted
Segmentation fault (core dumped)
Sorry for the chatter, Open Babel 2.3.0 -- Dec 17 2011 -- 16:15:10
does work:
sneumann@balzer:~/Downloads $ /vol/local/bin/obabel -i mol senkirkine.mol -o inchi - | /vol/local/bin/obabel -i inchi - -xK -o inchi
1 molecule converted
HPDHKHMHQGCNPE-QLJRNOHWSA-N
1 molecule converted
Yours,
Steffen
Confirmed
Seems to work fine now with the latest code. Can you confirm?
Unfortunately I can't check,
I get SEGV for many more cases,
even doing a fresh build and checkout,
possibly my setup is borked. If it is fixed for you,
I am happy to have this closed.
Yours, Steffen
Ah - seems to work on Windows but fail on Linux.
Forget my previous comment. It seems to be working fine for me on Linux too.
Your syntax is a bit wrong. No need for "-" when piping input into obabel.
I am running on Arch Linux with todays master branch from github and still get segfaults for this InChi or others like InChI=1S/C19H27NO7/c1-11-9-19(12(2)27-19)17(23)26-14-6-8-20(4)7-5-13(15(14)21)10-25-16(22)18(11,3)24/h5,11-12,14,24H,6-10H2,1-4H3/b13-5-/t11-,12-,14-,18-,19?/m1/s1
Best,
Christoph
I can confirm that the latest master branch (commit 7be9ee2fb614bfc5a2c0ffa97a14f94815ea5382) converts both InChis correctly on a fresh Debian 3.16.7 system. It is still unclear to me why the same branch segfaults on 4.1.4-1-ARCH.
Best regards,
Christoph