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

[WIP] OverdampedLangevin simulator and PotentialFunction interaction #150

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

axsk
Copy link
Contributor

@axsk axsk commented Sep 28, 2023

I would really like to have these functions (And eventually a GirsanovOverdampedLangevin simulator).

This is still work in progress.

src/interactions/potential.jl Outdated Show resolved Hide resolved
@axsk axsk changed the title WIP: OverdampedLangevin simulator and PotentialFunction interaction [WIP] OverdampedLangevin simulator and PotentialFunction interaction Sep 28, 2023
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (715c075) 72.37% compared to head (b8b0796) 72.38%.
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #150      +/-   ##
==========================================
+ Coverage   72.37%   72.38%   +0.01%     
==========================================
  Files          35       35              
  Lines        5212     5232      +20     
==========================================
+ Hits         3772     3787      +15     
- Misses       1440     1445       +5     
Files Coverage Δ
src/Molly.jl 100.00% <ø> (ø)
src/energy.jl 64.84% <ø> (ø)
src/force.jl 65.30% <ø> (ø)
src/types.jl 72.37% <100.00%> (-0.08%) ⬇️
src/simulators.jl 96.10% <90.47%> (-0.33%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jgreener64 jgreener64 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, I'm not sure the potential function stuff is worth putting in the main Molly codebase though.

Would be good to add OverdampedLangevin as a simulator in the "Langevin splitting" test set, or maybe there is a better way to test some property resulting from an overdamped Langevin simulation.

There was a discussion about how different atomic masses affect the time step, is this implementation consistent with the conclusions of that discussion?

src/simulators.jl Outdated Show resolved Hide resolved
"""
OverdampedLangevin(; <keyword arguments>)

Simulates the overdamped Langevin equation using the Euler-Maruyama method.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a canonical paper to reference here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Euler Maruyama scheme is pretty standard, even Wikipedia forgoes the reference..
Considering the limit underdamped Langevin $\rightarrow$ overdamped Langevin and the resulting unit considerations I would point to the "Free energy computations" book by Lelievre, Rousset and Stoltz, but its merely hinted at there..

@axsk
Copy link
Contributor Author

axsk commented Oct 9, 2023

Looks good, I'm not sure the potential function stuff is worth putting in the main Molly codebase though.

I removed that part

Would be good to add OverdampedLangevin as a simulator in the "Langevin splitting" test set, or maybe there is a better way to test some property resulting from an overdamped Langevin simulation.

It is actually simulating another dynamics then (underdamped) Langevin. The two would conincide only in the limit friction $\rightarrow \infty$
I added a line to the Lennard-Jones test case to at least see that it runs without error.

There was a discussion about how different atomic masses affect the time step, is this implementation consistent with the conclusions of that discussion?

This is now consistent with these considerations. The units are accounted for by taking the (finite) friction into account.

@jgreener64
Copy link
Collaborator

Great, thanks.

@jgreener64 jgreener64 merged commit 54d3e6d into JuliaMolSim:master Oct 9, 2023
7 checks passed
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