https://github.com/eschmidt42/hardspheres-2d
Simulating hard spheres in two dimensions using event driven molecular dynamics and visualizing rotational symmetry using psi-6.
https://github.com/eschmidt42/hardspheres-2d
2d hard-spheres physics python rust symmetry uv
Last synced: 2 months ago
JSON representation
Simulating hard spheres in two dimensions using event driven molecular dynamics and visualizing rotational symmetry using psi-6.
- Host: GitHub
- URL: https://github.com/eschmidt42/hardspheres-2d
- Owner: eschmidt42
- License: mit
- Created: 2025-03-20T12:25:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T10:19:45.000Z (over 1 year ago)
- Last Synced: 2025-10-30T08:51:01.497Z (8 months ago)
- Topics: 2d, hard-spheres, physics, python, rust, symmetry, uv
- Language: Jupyter Notebook
- Homepage:
- Size: 3.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hard Spheres in 2d
> Simulating hard spheres in two dimensions using event driven molecular dynamics and visualizing rotational symmetry using psi-6.

## Quickstart
uvx --from hardspheres-2d hardspheres2d --help
## Setup to develop
git clone https://github.com/eschmidt42/hardspheres-2d.git
cd hardspheres-2d
uv sync
For the installation of uv see [here](https://docs.astral.sh/uv/getting-started/installation/).
Note: this project uses Rust 1.82. So you may need to [install the rust toolchain](https://www.rust-lang.org/tools/install).
## How to use
### Command Line
To run the event driven molecular dynamics simulation from your command line within the project check out
uv run hardspheres2d --help
### Notebook
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](https://www.ovito.org). The base version is sufficient.
## Developing
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