Noel,
this is great! I've been following the stereochemistry issue for a while in the mailing list and you addressed pretty much all the key aspects.

One thing that seems to be missing is the discussion on how to invert chirality. In the past I've tried writing code to enumerate all possible enantiomers of molecules with unspecified chiral centers or to explicitly invert the defined ones.

An issue found while digging into that was that OBAtom.HasChiralitySpecified(), and facade.GetTetrahedralStereo(idx).IsSpecified() were giving conflicting results.

It's been a while since I tested it, but the code was this:
====================
import pybel
ob = pybel.ob
mols = [ 'OCC1OC(O)C(O)C(O)C1O',
        'OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O']
for smi in mols:
      print "\nMOL->", smi
      m = pybel.readstring('smi', smi).OBMol
      m.FindChiralCenters()
      facade = ob.OBStereoFacade(m)
      for a in ob.OBMolAtomIter(m):
          if a.IsChiral():
              idx = a.GetIdx()
              print "ATOM", a.GetIdx(), a.IsChiral(),
                        a.HasChiralitySpecified(),
              print facade.GetTetrahedralStereo(idx-1).IsSpecified()
=======================

It would be interesting to test it with the latest development code and see if there are still issues.

Thas

On 2020-02-05 14:51, Geoffrey Hutchison wrote:
Yes, Naruki and I were running into confusion when using these classes for the distance geometry implementation.

The key challenge is that we'd want to save the expected stereo configuration around atoms and bonds - and then when generating 3D coordinates, test to see if the generated configurations match the expected ones.

I think we can probably go through the code and examine, but if you have suggestions on how to save the expected configs for future comparison, that would be great.

-Geoff


On Feb 5, 2020, at 4:30 PM, Noel O'Boyle <baoille...@gmail.com <mailto:baoille...@gmail.com>> wrote:

Hi there,

I've been very slowly pulling together some docs on using the API for stereo. I remember someone on the list a few months back discussing difficulties with this part of the library - if anyone has any particular examples they'd like me to discuss, this would be a good time to mention them.

Progress so far:
https://github.com/baoilleach/documentation/blob/stereo/Stereochemistry/stereo.rst

Regards,
- Noel
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net 
<mailto:OpenBabel-Devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/openbabel-devel



_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


--

 Stefano Forli, PhD

 Assistant Professor
 Center for Computational Structural Biology

 Dept. of Integrative Structural
 and Computational Biology, MB-112A
 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/



_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to