New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix distance geometry stereo issues #2158
Conversation
3. This was already the default behaviour for cis/trans stereochemistry.
* Fix handling of implicit stereo references * Fix Calculate13Angle to work for triple bonds * Use new Gen3DStereoHelper class
* Fix issue with implicit stereo refs (L2236+L2260) * Use torsion angles (fixes issue with non-planar geometry)
(Some disabled to ensure the test runs fast enough)
I'll have to think carefully about the unit cell cases - and probably derive some test cases for them. |
@timvdm - if we un-comment the smiles at the end of |
Yes, but it will take longer for the test to run (more than 1 minute on my machine). I'm not sure if this is an issue? The other tests run quickly so I didn't want to add a test which takes much longer. |
@ghutchis Here are some more details regarding the testing I have been doing. I'm running the same smi-sdf-can roundtrip test from There is only a minor cosmetic issue which should be fixed I think. For some structures, the number of iterations in
The full roundtrip still produces the correct geometry since we now have an additional loop in Gen3D. However, seeing this message is confusing if the whole process actually worked. Ideally,
For the 17670 molecules, there were only 7 such cases. These are listed below together with the number of times OBDistanceGeometry failed.
In any case, it might be a good idea to have a minimum number of iterations to handle these small molecules. |
I would probably suggest 3 for now. Clearly I should have added a bool return value for the method - and I'm happy to add to the ABI for the v3.1 release. Otherwise, I think the patch looks great - and clearly handling ~17k molecules with limited issues is a profound step forward. |
- Increase number of iterations - Improve error handling
I continued testing to almost 31k molecules. There were several molecules for which the number of iterations was not enough. I have increased this and improved the error handling as discussed above. I'm now running the test again with these changes and will report the results later. |
Let me know when you've completed - I think we're good to merge. |
This branch contains the commits to fix the distance geometry stereo bugs.
@ghutchis: Could you verify the usage of OBUnitCell in CisTransFrom3D (src/stereo/perception.cpp)? I have based the code on OBMol::GetTorsion but I do not much experience with the class.