Hi Geoff,

On Wed, Apr 1, 2020 at 5:59 PM Geoffrey Hutchison <geoff.hutchi...@gmail.com>
wrote:

> 3) Handling of unpsecified stereochemistry in SMILES-SDF roundtrip test
>
> Using the SDF file format for the rountrip tests is also problematic.
> Although we correctly write out unspecified atom stereo parities, these are
> ignored (by default) when reading …
>
> *Does this sound reasonable? If so, I'll implement this. This is currently
> holding me back from being able to test on larger datasets.*
>
>
> Yes, I can imagine other cases where a 3D SD file exists but may have
> unspecified stereo - it should likely be the default. This is a useful
> feature for validation purposes (i.e., we generated a 3D geometry but it's
> an unspecified stereo center).
>

For cis/trans, it seems this was already the default. I've implemented this
for tetrahedral stereo centers and it works as expected.


> I currently have a patch for this which makes a copy of the molecule. This
> could be made more efficient but in the short term, it would already be an
> improvement.
>
> …
>
> In any case, finding a solution to 3 will help to robustly test a more
> efficient version of this fix. Also, the CheckStereoContraints could be
> made more efficient, but I'd like to focus on making it work correctly
> first.
>
>
>
> The main reason for implementing the distance geometry method was as a
> fallback for the fragment-based builder (i.e., where the stereo can't be
> corrected, a fragment doesn't exist, etc.) - it does not need to be fast
> since the fragment builder is fast. It does need to be correct, which has
> been the problem with the existing gen3d use.
>
> In short, your analysis seems solid and I'd happily review any patches to
> these issues for a 3.0.1 release.
>

I'll probably have a patch ready early next week.

I also ran into some other bugs which I fixed:
* Distance geometry with triple bonds was not working (bug in
Calculate13Angle: acos only defined in range [-1, 1])
* Issue with CisTransFrom3D: Was not working well for geometries that are
not perfectly planar.

With these fixes in place, the results seem promising. The SDF roundtrip
test has been running for several hours now without any failures.

Tim


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

Reply via email to