On Mar 18, 2017, at 16:00, Jan Halborg Jensen <jhjen...@chem.ku.dk> wrote: > babel -:"CCOC(=O)c1ccc([NH3+])cc1" -oinchi -xF > > gives > > InChI=1/C9H11NO2/c1-2-12-9(11)7-3-5-8(10)6-4-7/h3-6H,2,10H2,1H3/p+1/fC9H12NO2/h10H/q+1 > > > but converting this InChI back to smiles gives CCOC(=O)c1ccc(cc1)[NH2+] > > I use obabel -oinchi temp3.inchi -osmi
When I do the first step (with "obabel", not "babel"), I get a warning message from obabel saying "Proton(s) added/removed". % obabel -:"CCOC(=O)c1ccc([NH3+])cc1" -oinchi -xF ============================== *** Open Babel Warning in InChI code #1 :Proton(s) added/removed InChI=1/C9H11NO2/c1-2-12-9(11)7-3-5-8(10)6-4-7/h3-6H,2,10H2,1H3/p+1/fC9H12NO2/h10H/q+1 1 molecule converted This warning comes from InChI itself, not Open Babel. I can verify this with the InChI binary. First, I'll convert the SMILES to SDF: % obabel -:"CCOC(=O)c1ccc([NH3+])cc1" -osdf > test.sdf Then use the pre-release version of InChI from early this year (I haven't yet upgraded to the final release) % /Users/dalke/ftps/inchi-1.05pr2/INCHI-1-SRC/INCHI_EXE/bin/Linux/inchi-1 test.sdf -FixedH InChI version 1, Software v. 1.05 (inchi-1 executable) Linux Build of Jan 5 2017 00:51:46 *** pre-release, for evaluation only *** Opened log file 'test.sdf.log' Opened input file 'test.sdf' Opened output file 'test.sdf.txt' Opened problem file 'test.sdf.prb' The command line used: "/Users/dalke/ftps/inchi-1.05pr2/INCHI-1-SRC/INCHI_EXE/bin/Linux/inchi-1 test.sdf -FixedH" Generating non-standard InChI with the options: Mobile H Perception OFF (include FixedH layer) Do not reconnect metals (omit RecMet layer) Absolute Stereo ON Omit undefined/unknown stereogenic centers and bonds Do not account for keto-enol tautomerism Do not account for 1,5-tautomerism Input format: MOLfile Output format: Plain text Full Aux. info Timeout per structure: 60 sec Up to 1024 atoms per structure Warning (Proton(s) added/removed) structure #1. End of file detected after structure #1. Finished processing 1 structure: 0 errors, processing time 0:00:00.00 % cat test.sdf.txt * Input_File: "test.sdf" Structure: 1 InChI=1/C9H11NO2/c1-2-12-9(11)7-3-5-8(10)6-4-7/h3-6H,2,10H2,1H3/p+1/fC9H12NO2/h10H/q+1 AuxInfo=1/1/N:1,2,7,15,8,14,6,9,4,10,5,3/E:(3,4)(5,6)/F:m/E:m/rA:15nCCOCOCCCCN+HHHCC/rB:s1;s2;s3;d4;s4;d6;s7;d8;s9;s10;s10;s10;s9;s6d14;/rC:;;;;;;;;;;;;;;; You can see it gives the same InChI as you got from Open Babel, and it gives the same warning about "Proton(s) added/removed". Cheers, Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ 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