Simulating hard spheres in two dimensions using event driven molecular dynamics and visualizing rotational symmetry using psi-6.
uvx --from hardspheres-2d hardspheres2d --help
git clone https://github.com/eschmidt42/hardspheres-2d.git
cd hardspheres-2d
uv sync
For the installation of uv see here.
Note: this project uses Rust 1.82. So you may need to install the rust toolchain.
To run the event driven molecular dynamics simulation from your command line within the project check out
uv run hardspheres2d --help
Alternatively, the notebook ./melting-hard-sphere-hexagons.ipynb contains all the steps to set up and run event driven molecular dynamcis on your machine. As well as some sanity checks to better understand what is going on.
To visualize the dynamics you may want to install ovito. The base version is sufficient.
During your rust edits you want to update your build artefacts so you can use them from python / a notebook. For you can use
make update
