spin-sim
Pure-Rust Ising model Monte Carlo on periodic hypercubic lattices.
Algorithms
- Single-spin flips (Metropolis, Gibbs)
- Swendsen-Wang cluster updates
- Wolff single-cluster updates
- Parallel tempering (replica exchange)
- Overlap cluster moves (Houdayer / Jörg / CMR) for spin glasses
Replicas are parallelized over threads with rayon.
Usage
use *;
use ;
let lattice = new;
let temps = vec!;
let n_replicas = 2;
// Random ±1 couplings (bimodal spin glass)
let couplings: =
.map
.collect;
let mut real = new;
let config = SimConfig ;
use AtomicBool;
let interrupted = new;
let result = run_sweep_loop.unwrap;
println!;
Python
For a batteries-included Python interface, see peapods.