Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tchaumeny/rustising
Ising model simulator in Rust
https://github.com/tchaumeny/rustising
Last synced: 9 days ago
JSON representation
Ising model simulator in Rust
- Host: GitHub
- URL: https://github.com/tchaumeny/rustising
- Owner: tchaumeny
- Created: 2024-10-19T08:31:44.000Z (28 days ago)
- Default Branch: master
- Last Pushed: 2024-10-24T19:22:18.000Z (22 days ago)
- Last Synced: 2024-10-26T05:39:20.569Z (21 days ago)
- Language: Rust
- Size: 1.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A simple [Ising model](https://en.wikipedia.org/wiki/Ising_model) simulator written in Rust
This project lets you simulate the d-dimensional Ising model in two modes:
- **mcmc**: Computes an approximation of the energy and magnetization distributions using an MCMC cluster algorithm as described in . In 2D, it also plots the resulting lattice.
- **exact** (small lattices only): Iterates over all possible states using a [Gray code](https://en.wikipedia.org/wiki/Gray_code) algorithm and plots the exact energy and magnetization distributions.### Installation
* Download a prebuilt binary from the [releases](https://github.com/tchaumeny/RustIsing/releases) section.
* Or, build from sources using Cargo ([see documentation](https://doc.rust-lang.org/cargo/guide/working-on-an-existing-project.html)).### Examples
##### 2500x2500 lattice at critical temperature
ising --beta 0.4407 -n 2500 mcmc --iter 1000
![Lattice](./examples/2d/mcmc/d-2-b-0-4407-n-2500-it-1000-spins-lattice.png)
##### Magnetization on a 10x10x10 lattice just below critical temperature
ising -d 3 --beta 0.24 -n 10 mcmc -i 50000
![Lattice](./examples/3d/d-3-b-0-24-n-10-magnetization-probabilities.png)
See [here](./examples/) for more examples, use `ising --help`, `ising mcmc --help`, `ising exact --help` for help.