Molly.jl icon indicating copy to clipboard operation
Molly.jl copied to clipboard

REMD generalization and H-REMD

Open JaydevSR opened this issue 3 years ago • 2 comments

This PR adds a generalization to the REMD simulator defined before and based on that implements a H-REMD simulator.

JaydevSR avatar Aug 14 '22 07:08 JaydevSR

Any suggestions on test simulation for H-REMD?

Edit❗ Is there a way to add softness to the Lennard-Jones and electrostatic potentials in Molly? If so, I can try the something similar to what is given in https://doi.org/10.1063/1.2888998

JaydevSR avatar Aug 14 '22 07:08 JaydevSR

Codecov Report

Merging #86 (b13bd9a) into master (25cf7d2) will decrease coverage by 0.03%. The diff coverage is 85.10%.

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   83.90%   83.87%   -0.04%     
==========================================
  Files          32       32              
  Lines        3735     3795      +60     
==========================================
+ Hits         3134     3183      +49     
- Misses        601      612      +11     
Impacted Files Coverage Δ
src/types.jl 73.36% <68.18%> (-1.50%) :arrow_down:
src/simulators.jl 95.34% <90.27%> (-0.77%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 14 '22 08:08 codecov[bot]

I noticed some bugs here and there so I am making it a draft pr for now.

JaydevSR avatar Aug 15 '22 06:08 JaydevSR

Looks good so far. Regarding testing, I guess it depends whether we have the interactions available to run a typical H-REMD simulation. In that case we could test the behaviour matches what is expected. If a suitable example can't be found or takes too long to run, we could just check for an expected number of exchanges like for T-REMD. However this kind of algorithm does lend itself to subtle bugs so ideally we would have a relevant test.

About adding softness to the LJ/Coulomb potentials, this could be done but I think they should be new interactions to keep the current implementations simple and fast.

jgreener64 avatar Aug 15 '22 15:08 jgreener64

I am writing some simulation test right now using the softcore potentials. To add some unit test akin to TemperatureREMD, I am checking the mean of the temperatures to fall within a certain range. Can I write similar tests on Total/Potential energy (i.e. are those expected to follow some trend based on the reaction coordinate say the $\lambda$ value of softcore potentials?

JaydevSR avatar Aug 23 '22 15:08 JaydevSR

As I understand it the soft core potentials are supposed to reduce the height of energy barriers. I'm not sure how the global values of the energy are supposed to differ on average; maybe look at plots of energy v distance (https://juliamolsim.github.io/Molly.jl/stable/examples/#Variations-of-the-Morse-potential) and potential energy of the system over time.

You would expect to see closer minimum pair distances and less hard "bouncing" with a softer core, if you can think of a way to test for that.

jgreener64 avatar Aug 23 '22 16:08 jgreener64

I was not able to think of any other tests for H-REMD that are not too complicated to implement, so for now only testing for exchange efficiency and temperatures. I have added a TODO comment just in case we can add something in the future.

Any more changes or addition required?

JaydevSR avatar Aug 26 '22 07:08 JaydevSR

Looks good to me :tada:

jgreener64 avatar Aug 26 '22 16:08 jgreener64

@jgreener64 Now, I was wondering what can I do next. I can try adding more unit test and add some improvements to the docs. And also I can add some REMD simulator that is not too complicated (considering the time frame of the GSoC project). Something like hybrid temperature and Hamiltonian scheme (which will only require changing a few lines in the T-REMD exchange function) if this sort of simulator is required. As the current interface is very general it should be straightforward to add new REMD simulator to the library in the future and for users to define their own REMD schemes.

JaydevSR avatar Aug 27 '22 07:08 JaydevSR