Marcel-Rodekamp / NSL

Nanosystem Simulation Library (NSL) implements statistical simulations for systems on the nanoscale
Other
2 stars 0 forks source link

Feature/proposal machine #121

Closed Marcel-Rodekamp closed 1 year ago

Marcel-Rodekamp commented 1 year ago

Implementation of HMC

Implemented all the features for the HMC, this includes:

New Features:

Bug Fixes:

Any corrections?

luutom commented 1 year ago

Why can't I find the comment where Evan asks me if I agree about the factor of 2? I want to answer positively to his comment, but I can't find it!

evanberkowitz commented 1 year ago

It's in the third conversation under my request for changes. (We marked it as resolved as Marcel agreed.)

evanberkowitz commented 1 year ago

example_MCMC compiles and runs successfully for me. Happy to merge now if you're happy too.

evanberkowitz commented 1 year ago

Actually I had a puzzle. Given

> ./example_MCMC
Setting up a Hubbard-Gauge action with beta=1, Nt=4, U=1 on a ring with 2 sites.
Setting up a leapfrog integrator with trajectory length 1 and 10 MD steps.
Thermalizing 100 steps...
Generating   10000 steps...
Acceptance Rate: 38.58%
Burn In took   : 0.0735221 s
Production took: 61.8404 s

why did production take 1000 times longer when it was only 100 times as many steps. The point is that production was saving only every saveFreq. 16af752b53ce4dc6ff9960f7a49b372e97ad739f makes that obvious by printing the save frequency. Now the user sees

> ./example_MCMC
Setting up a Hubbard-Gauge action with beta=1, Nt=4, U=1 on a ring with 2 sites.
Setting up a leapfrog integrator with trajectory length 1 and 10 MD steps.
Thermalizing 100 steps...
Generating   10000 steps, saving every 10...
Acceptance Rate: 38.72%
Burn In took   : 0.0807525 s
Production took: 61.8946 s