Wrap HOOMD Force Computes as collective variables#7
Open
jglaser wants to merge 1 commit intoSSAGESproject:masterfrom
Open
Wrap HOOMD Force Computes as collective variables#7jglaser wants to merge 1 commit intoSSAGESproject:masterfrom
jglaser wants to merge 1 commit intoSSAGESproject:masterfrom
Conversation
- compiles, untested - also update to HOOMD 2.4
Author
|
Obviously, a GPU kernel to multiply the particle forces and reduce the CV will have to be implemented as well. |
Contributor
|
@mquevill @sesevgen Hi! I talked a bit with @jglaser while he was conceptualizing this. It'd be great to chat with you and/or any interested SSAGES devs about this idea. It seems like it could offer a reasonable extension of existing behavior that is highly performant (on the GPU, no host-device copies needed). Jens has written some advanced sampling methods for HOOMD before, and this would pave the way to run those through SSAGES instead of having our own plugins/libraries for every advanced sampling method. Maybe we can set up a call? Let me know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am opening this PR to solicit input at an early design stage and track progress. The PR aims to eliminate the need to go through snapshots and expensive device/host copies for computing CVs on the GPU, by allowing them to be computed inside the engine and also the forces to be accumulated there.
The minimal information needed to bias a system in a CV is a constant scaling factor applied to all forces, and the value of the CV itself. The new
CollectiveVariable::ApplyBiasmethod takes care of this. The new collective variableHOOMDCVis able to take a user-defined HOOMDmd.forceobject and wrap it's C++-side implementation into a SSAGES CV.At this point, the changes only compile, and are most likely not doing anything sensible. Most important missing bit is to call the
HalfStepHookbefore HOOMD'scomputeNetForce(), in addition to afterwards (which is currently the case), so as to be able to bias the force before accumulation.When that is done, the snapshot copying can be optimized out entirely dependent on whether all active CVs have the
modifiesParticleForces()flag set.