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

Fix speed issues with LangevinIntegrator by removing unnecessary constraint steps #460

Open
jchodera opened this issue Feb 18, 2020 · 2 comments

Comments

@jchodera
Copy link
Member

@peastman suggests we remove some extra constraint calls to speed up LangevinIntegrator:

cc: openmm/openmm#2532 (comment)

@maxentile : Would there be any issues if we did this (if we're not measuring work)?

@maxentile
Copy link
Member

@maxentile : Would there be any issues if we did this (if we're not measuring work)?

I don't think so! To be risk-averse, we erred on the side of including redundant constraint calls by having each R,V,O substep definition be responsible for applying all the constraints it needed, when we were expecting to use this implementation with arbitrary splitting strings. This leads to cases where a substep applies a constraint that was just applied by the previous substep. For any given splitting, we can remove the redundant constraint calls without changing the method's behavior.

@peastman
Copy link

You might want to take a look at http://jianliugroup.pku.edu.cn/paper/paper/constraint.pdf. They exhaustively test all possible ways of applying constraints to both the velocity verlet and leapfrog versions of this integrator. For each of them they find there's a few versions that work badly and a lot of versions that work about equally well. The code in the comment linked above corresponds to algorithm 13 in the first column of table 1. That's one of the ones that works reasonably well, but the one they actually recommend is algorithm 9. It would be worth trying that as well:

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

No branches or pull requests

3 participants