The first question to check is whether we are reading the stereo correctly:
obabel -iinchi -:"InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m1/s1" -osmi C[C@H](C(=O)O)N This SMILES does indeed represent D-Alanine. The problem is that you have generated a 0D mol file: e.g. obabel -iinchi -:"InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m1/s1" -omol ...where the tetrahedral stereo is stored on the atom rather than on the bonds. In other words, gen2D didn't work for you (all the atoms have 0 coordinates I'm guessing). I'm not familiar with DoTransformations, but it should work fine via OBOp.FindType("gen2D") or so. - Noel On 8 June 2017 at 21:37, Hendrik Vennekate <hvennek...@gmx.de> wrote: > Hi Noel, > > > > thanks for the quick reply. Actually, I was trying it through the library > directly (approximately like below): > > using namespace OpenBabel; > > OBConversion conversion; > > conversion.SetInFormat("INCHI"); > > OBMol molecule; > > conversion.ReadString(&molecule, > "InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m1/s1"); > > std::map<std::string, std::string> options; > > options["gen2D"] = ""; > > molecule.DoTransformations(&options, &conversion); > > FOR_BONDS_OF_MOL(obbond, molecule) > > cout << obbond->IsWedgeOrHash() << endl; > > ... and the output indicated that no bond was a wedge or hash, as I would > have expected. > > > > Alternatively, I put the above InChI string into a file and did the > following: > > obabel -i inchi /tmp/d-alanine.inchi -Otestout.mol > > To the best of my understanding of the MOL format, the fourth column of the > bond block should contain the stereo info if any. The output bond block > reads: > > 1 2 1 0 0 0 0 > > 2 3 1 0 0 0 0 > > 2 4 1 0 0 0 0 > > 3 5 2 0 0 0 0 > > 3 6 1 0 0 0 0 > > so all zeros. > > > > Again, I'm curious what I'm missing... > > > > Best wishes, > > > > Hendrik > > > > > > On Thursday, June 08, 2017 20:30:09 you wrote: > >> Hi there, > >> > >> The wiki is out of date. Stereo works fine. What was the specific command > >> you used that you feel didn't work? > >> > >> Noel > >> > >> On 8 Jun 2017 8:08 p.m., "Hendrik Vennekate" <hvennek...@gmx.de> wrote: > >> > >> Hello OpenBabel list, > >> > >> > >> > >> a quick question regarding InChI support: on the corresponding wiki page >> it > >> reads, "Experimental InChI read support was added in version 2.1, although > >> this does not always support stereochemistry." Has this been improved > >> meanwhile? > >> > >> In a little experiment with wikidata's InChI string for D-alanine > >> (1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m1/s1), I could not seem > >> to successfully reproduce the stereochemistry. > >> > >> > >> > >> Any support is greatly appreciated. > >> > >> > >> > >> Kind regards, > >> > >> > >> > >> Hendrik > >> > >> ------------------------------------------------------------ > >> ------------------ > >> 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