This is a Haskell implementation of the Verlet-Velocity algorithm in a molecular dynamics framework for my blog post.
Use Ghcup to install GHC, cabal-install, Stack and haskell-language-server from here
Additional Installation for Windows:
- Download the freeglut windows development libraries from here
- Add freeglut/bin/x64/ to your executable path.
cd <path-to-MolecularDynamics-folder>
stack install
nix-build release.nix
Change the main
function in src/Main.hs
according to the following section names
and run the example via:
stack run
main :: IO ()
main = mainNewton
main :: IO ()
main = mainNewtonBounce
main :: IO ()
main = mainVerlet
main :: IO ()
main = mainVerletSquare
main :: IO ()
main = mainVerletRandom
Have a look at the docs for the API documentation.
Generate the Haddock documentation with:
stack exec -- haddock --html src/Main.hs --hyperlinked-source --odir=docs