Skip to content
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

Speed up coordgen, especially for very slow molecules #38

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

d-b-w
Copy link
Collaborator

@d-b-w d-b-w commented Sep 23, 2019

Improve coordgen performance: #39

When detecting clashes, do a rough binning of atoms. If both
atoms for one bond are above both atoms of the other bond, they
can't be a clash. This saves clash calculations for things that
are obviously not clashes. It has an impact on big structures
that are partially templated. (overall 15% speedup, but 40%
improvement for the worst molecules in the test case.

coordgen is still slower than RDkit's native coordinate
generation, though.

Also adds a simple test that the coordinates generated don't
have crazy bond lengths. This would have caught my earlier
misunderstanding.

Copy link
Collaborator

@ricrogz ricrogz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a couple of requests for more braces :)

sketcherMinimizerClashInteraction.h Show resolved Hide resolved
sketcherMinimizerClashInteraction.h Show resolved Hide resolved
@d-b-w
Copy link
Collaborator Author

d-b-w commented Sep 30, 2019

oh, bummer. It looks like the sketcherMinimizerClashInteraction objects are reused, sometimes not even with the same atoms. Caching the distance in the sketcherMinimizerClashInteraction leads to incorrect results, though fewer problems than I would have expected for the cost.

I'll back out that part of the change.

This improves build stability by reducing the scope of rebuilds
required when a header changes.
@d-b-w d-b-w force-pushed the dbn_performance branch 2 times, most recently from 30cef9b to 0004435 Compare September 30, 2019 21:30
@d-b-w
Copy link
Collaborator Author

d-b-w commented Sep 30, 2019

I pulled out the refactorings I was doing to try to understand things into a separate set of commits. This is now only the performance improvement, a test, and a change to remove some unused headers to speed up my rebuilds.

@ricrogz
Copy link
Collaborator

ricrogz commented Sep 30, 2019

@d-b-w, the CI builds failed, apparently, because of an unused variable (travis) and some constexprs (appveyor).

@d-b-w
Copy link
Collaborator Author

d-b-w commented Oct 1, 2019

Thanks, @ricrogz . I see 'em.

When detecting clashes, do a rough binning of atoms. If both
atoms for one bond are above both atoms of the other bond, they
can't be a clash. This saves clash calculations for things that
are obviously not clashes. It has an impact on big structures
that are partially templated. (overall 15% speedup, but 40%
improvement for the worst molecules in the test case.

Also adds a simplistic test that the coordinates generated don't
have crazy bond lengths.
@d-b-w d-b-w changed the title Speed up coordgen by about 2x, expecially for very slow molecules Speed up coordgen, especially for very slow molecules Oct 2, 2019
@d-b-w d-b-w merged commit 76fd227 into schrodinger:master Oct 2, 2019
@d-b-w d-b-w deleted the dbn_performance branch October 4, 2019 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants