This limitation of the 3D builder is described in the docs and also flagged up by the warning message: https://open-babel.readthedocs.org/en/latest/3DStructureGen/SingleConformer.html#obbuilder
We have an idea what to add to get around this (distance geometry), but no-one has done it yet. Regards, - Noel On 18 February 2015 at 22:48, Stefano Forli <fo...@scripps.edu> wrote: > In fact, my mistake was to assume the config object would be build > accordingly to Cahn-Ingold-Prelog rules, hence my misunderstanding when the > winding showed up identical. > I've read the documentation and tried with refs, and yes, it works as > expected (same results as with the winding with less confusion). > > Although, I still think there is a problem. > I've started looking into the winding issue because I was generating > enantiomers for this structure: > > C1C2=CC(=C(C=C2C3C1(COC4=C3C=CC(=C4O)O)O)O)O > > Altering either the winding or the reference atoms, the resulting structures > are identical: > > Oc1cc2C[C@]3([C@H](c2cc1O)c1ccc(c(c1OC3)O)O)O error.smi > Oc1cc2C[C@@]3([C@H](c2cc1O)c1ccc(c(c1OC3)O)O)O working.smi > > When generating the 3D structure of 'error.smi', there's a warning (using > either obabel or Python v.2.3.2): > > $ obabel -ismi error.smi -omol2 --gen3D 1> /dev/null > > *** Open Babel Warning in CorrectStereoAtoms > Could not correct 1 stereocenter(s) in this molecule () > with Atom Ids as follows: 5 > > and the 3D structure generated is identical to the one generated using the > opposite chirality ('working.smi'). I thought it was a misuse of the winding > that generated the wrong SMILES, but it's not the case. > > I've tested generating 2D structures using -opng and results show that they > are indeed valid SMILES and shown with the proper wedging (see attached). > At this point I suspect an issue with the builder when generating 3D > structures. > This is only one example of many that I have. When processing a library of > ~700 compounds, I get this error for about 30 of them. > > Not sure if this is a bug, so I'll wait for confirmation before opening a > new report. > Let me know if you need more examples, I'll be glad to send them. > > Thanks a lot for the support, > > S > > > > > > On 02/17/2015 12:22 PM, Noel O'Boyle wrote: >> >> The config object represents the usual way chemists communicate >> stereochemistry in a diagram; looking either from/towards a particular >> atom, atoms X, Y and Z are arranged clockwise/anticlockwise. >> >> Your code is correctly inverting the stereo. If you invert the >> 'winding', and keep everything else the same, then you get the >> opposite chirality. (Another way is if you swap two of the refs, and >> keep everything else the same, then you get the opposite chirality.) >> >> The docs are at >> >> http://openbabel.org/api/2.3/structOpenBabel_1_1OBTetrahedralStereo_1_1Config.shtml >> >> - Noel >> >> On 17 February 2015 at 19:13, Stefano Forli <fo...@scripps.edu> wrote: >>> >>> Noel, >>> thanks for the clarification. >>> It makes sense now, but it means that I'm using the wrong tool for what I >>> want to do. >>> >>> In a previous discussion[1] I was suggested to use this code to alter the >>> chirality of a tetrahedral stereocenter, since >>> OBTetrahedralStereo.Invert() >>> doesn't seem to be available in Python. >>> >>> What would you recommend to identify a chiral center configuration and >>> invert it in Python? >>> >>> Thanks, >>> >>> S >>> >>> >>> >>> [1] http://sourceforge.net/p/openbabel/mailman/message/32475236/ >>> >>> >>> On 02/17/2015 01:50 AM, Noel O'Boyle wrote: >>>> >>>> >>>> Hi, >>>> >>>> Hope you don't mind but... >>>> >>>> 1. Should GetId() not GetIdx()-1 >>>> 2. Should be "HasTetrahedralStereo(idx)" >>>> >>>> Regarding the main question, the config objects are correct, but the >>>> stereo definition consist of three parts (see the API docs): view, >>>> winding and refs. You were just looking at the winding. The refs are >>>> in a different order in each case. >>>> >>>> Regards, >>>> - Noel >>>> >>>> >>>> On 17 February 2015 at 00:53, Stefano Forli <fo...@scripps.edu> wrote: >>>>> >>>>> >>>>> Hi, >>>>> >>>>> I can't understand the way in which chiral winding is handled by >>>>> OpenBabel. >>>>> I wrote a small test script in Python (attached) to try to clarify the >>>>> concept. The output is: >>>>> >>>>> ClC(I)Br -> WINDING [1->2] -> ClC(I)Br >>>>> Cl[C@H](I)Br -> WINDING [1->2] -> Cl[C@@H](I)Br >>>>> Cl[C@@H](I)Br -> WINDING [1->2] -> Cl[C@H](I)Br >>>>> >>>>> The winding is always perceived as 1, and this is wrong by definition >>>>> (right?) >>>>> Setting the winding to 2 generates the other enantiomer, independently >>>>> from >>>>> the starting point. >>>>> Both atom.IsClockwise() and atom.IsAntiClockwise() return False, >>>>> showing >>>>> that chirality is not perceived (uncomment the last line to test it). >>>>> Is this expected, or there is a way to perceive it properly? >>>>> Thanks, >>>>> >>>>> S >>>>> >>>>> >>>>> -- >>>>> Stefano Forli, PhD >>>>> >>>>> Staff Scientist >>>>> Molecular Graphics Laboratory >>>>> Dept. of Integrative Structural >>>>> and Computational Biology, MB-112F >>>>> The Scripps Research Institute >>>>> 10550 North Torrey Pines Road >>>>> La Jolla, CA 92037-1000, USA. >>>>> >>>>> tel: +1 (858)784-2055 >>>>> fax: +1 (858)784-2860 >>>>> email: fo...@scripps.edu >>>>> http://www.scripps.edu/~forli/ >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>>> from Actuate! Instantly Supercharge Your Business Reports and >>>>> Dashboards >>>>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>>>> more >>>>> Get technology previously reserved for billion-dollar corporations, >>>>> FREE >>>>> >>>>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> OpenBabel-discuss mailing list >>>>> OpenBabel-discuss@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >>>>> >>> >>> -- >>> Stefano Forli, PhD >>> >>> Staff Scientist >>> Molecular Graphics Laboratory >>> Dept. of Integrative Structural >>> and Computational Biology, MB-112F >>> The Scripps Research Institute >>> 10550 North Torrey Pines Road >>> La Jolla, CA 92037-1000, USA. >>> >>> tel: +1 (858)784-2055 >>> fax: +1 (858)784-2860 >>> email: fo...@scripps.edu >>> http://www.scripps.edu/~forli/ > > > -- > Stefano Forli, PhD > > Staff Scientist > Molecular Graphics Laboratory > Dept. of Integrative Structural > and Computational Biology, MB-112F > The Scripps Research Institute > 10550 North Torrey Pines Road > La Jolla, CA 92037-1000, USA. > > tel: +1 (858)784-2055 > fax: +1 (858)784-2860 > email: fo...@scripps.edu > http://www.scripps.edu/~forli/ ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss