JuliaMolSim / Molly.jl

Molecular simulation in Julia
Other
371 stars 51 forks source link

[WIP] OverdampedLangevin simulator and PotentialFunction interaction #150

Closed axsk closed 8 months ago

axsk commented 9 months ago

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

This is still work in progress.

codecov[bot] commented 9 months ago

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 ```diff @@ 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](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim) | Coverage Δ | | |---|---|---| | [src/Molly.jl](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL01vbGx5Lmps) | `100.00% <ø> (ø)` | | | [src/energy.jl](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL2VuZXJneS5qbA==) | `64.84% <ø> (ø)` | | | [src/force.jl](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL2ZvcmNlLmps) | `65.30% <ø> (ø)` | | | [src/types.jl](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL3R5cGVzLmps) | `72.37% <100.00%> (-0.08%)` | :arrow_down: | | [src/simulators.jl](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL3NpbXVsYXRvcnMuamw=) | `96.10% <90.47%> (-0.33%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/JuliaMolSim/Molly.jl/pull/150/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

axsk commented 8 months ago

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 commented 8 months ago

Great, thanks.