Skip to main content

Hard Spheres in 2d

Simulating hard spheres in two dimensions using event driven molecular dynamics and visualizing rotational symmetry using psi-6.

Melting hexagon of hard spheres

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.

Note: this project uses Rust 1.82. So you may need to install the rust toolchain.

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. 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

Metadata

Release files for hardspheres-2d 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hardspheres-2d 0.1.4
File Size Uploaded
hardspheres_2d-0.1.4.tar.gz 3.2 MB Details

Release files / hardspheres_2d-0.1.4.tar.gz

Download URL hardspheres_2d-0.1.4.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4bbccfe8a4817314b8dd39d559b7711aaaa1b04e7e9836100263f59737c5c564
BLAKE2b-256 checksum
How to use checksums
5649039e5017a3de19fe032d513681cc1696fecb1bb7cc7bb7f7461e09494d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.9

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page