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/

------------------------------------------------------------------------------
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

Reply via email to