This is already fixed in my development code, where I have changed the handling of implicit hydrogens throughout the library:
>obabel -:"CCOC(=O)c1ccc([NH3+])cc1" -oinchi -xF | obabel -iinchi -osmi ============================== *** Open Babel Warning in InChI code #1 :Proton(s) added/removed 1 molecule converted CCOC(=O)c1ccc(cc1)[NH3+] 1 molecule converted The problem is that the current code just gives the InChI a charged nitrogen and tells it to guess the number of hydrogens (aka apply the InChI implicit valence model). The new code gives it the number of implicit hydrogens. BTW, consider a less general subject line in future. :-) Regards, - Noel On 18 March 2017 at 15:00, Jan Halborg Jensen <jhjen...@chem.ku.dk> wrote: > Hi all > > 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 > > Any help appreciated > > Best regards, Jan > > ------------------------------------------------------------------------------ > 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 > ------------------------------------------------------------------------------ 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