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
TestSystems for Double Well in WCA Fluid #389
TestSystems for Double Well in WCA Fluid #389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Let me add another commit with docs and changelog update ;-) Also, regarding tests: There are a few other things that I would usually test, but I don't see the appropriate place to do that within the OpenMMTools test suite. In particular, some of setups are equivalent under certain circumstances (0 dimers is the same as chain length 0 or 1, and also the same as the WCAFluid; 1 dimer is the same as chain of length 2 atoms). I would usually add a test that the topologies are equivalent for these. Also, I'd usually add tests to check that the expected errors get raised. Any recommended way/location to add these extra tests? [These already participate in default tests for testsystems (potential energy, topology, properties)] |
Thanks! I appreciate.
I think an extra test function(s) in |
Thanks for contributing this! |
I think this is ready now! I added a few simple tests, and also added this to the docs and to the release notes. The existing WCAFluid test system made it easy to implement these 2 generalizations, which I needed for some projects I'm working on. (The rest of this comment is just FYI stuff related to how my current funding source will take credit for funding me while I wrote this PR) The work in this PR will be part of an E-CAM module. As such, a description of it will eventually be included in the list of classical MD software modules that E-CAM has produced, and will be delivered as part of a document to be made publicly available. The in-progress documentation about this particular E-CAM module can be seen on the E-CAM modules GitLab repository. None of this requires any further work from the OpenMMTools development team. This is just how E-CAM accounts for its contributions to various software projects. My work in this PR has been supported by the European Union's Horizon 2020 research and innovation programme, grant agreement No 676531 (project E-CAM). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This PR adds (two generalizations of) a test system that has been frequently used in rare events. I'm calling these$h (1 - ((r - r_0 - w) / w)^2)^2$ . This is a symmetric potential with a minimum at $(r_0, 0)$ , a maximum at $(r_0+w, h)$ , and a second minimum at $(r_0 + 2w, 0)$ . The widely-used test system adds this interaction between 2 atoms, so there is one dimer in the WCA fluid.
DoubleWellDimer_WCAFluid
andDoubleWellChain_WCAFluid
. In both cases, we start with the existingWCAFluid
test system, and add bonded interactions of the formFor the
DoubleWellDimer_WCAFluid
, the system will create bonds between pairs of atoms, so the bonds are created between atom 0 and 1, atom 2 and 3, etc., resulting in multiple separated dimers, each dimer connected by the double-well potential. This is similar to what was done in Swenson and Bolhuis, JCP 2014. The standard example isndimers=1
.For the
DoubleWellChain_WCAFluid
, the system will create a chain of bonds of the desired length, so bonds are created between atom 0 and 1, atom 1 and 2, etc. Fornchained=1
, this is just the WCA fluid; fornchained=2
, this is identical to theDoubleWellDimer_WCAFluid
withndimers=1
, and fornchained=3
this is the same as the potential used in Rogal and Bolhuis, JCP 2008.The clever bit in the implementation is to recognize that the same algorithm works for both; the only difference is in which atom pairs are selected to have the custom bond force added to them.