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/
import pybel
ob = pybel.ob
smi1 = 'ClC(I)Br'
smi2 = 'Cl[C@H](I)Br'
smi3 = 'Cl[C@@H](I)Br'
for smi in [smi1, smi2, smi3]:
mol = pybel.readstring('smi', smi).OBMol
print smi.strip(),
facade = ob.OBStereoFacade(mol)
for a in ob.OBMolAtomIter(mol):
idx = a.GetIdx()-1
if a.IsChiral():
ts = facade.GetTetrahedralStereo(idx)
config = ts.GetConfig()
w1 = config.winding
if w1 == 1: # clockwise
config.winding = 2
else: # anticlockwise
config.winding = 1
ts.SetConfig(config)
print "-> WINDING [%d->%d] -> %s" % (w1, config.winding,
pybel.Molecule(mol).__str__().strip())
#print "[ cw: %d ; anti-cw: %d ]" % ( a.IsClockwise(), a.IsAntiClockwise() )
------------------------------------------------------------------------------
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