vibespin.scripts.ising package
Submodules
scripts.ising.coarsening_analysis module
Supplementary coarsening analysis for the 2D Ising model.
Precomputes three data sets used by the Correlation_and_Coarsening notebook:
Quench-depth sensitivity: Multiple quench temperatures, multi-seed median R_xi(t) at each, confirming that the growth exponent n = 1/2 is independent of quench depth while the prefactor depends on temperature.
Equilibrium crossover: Coarsening R_xi(t) trajectory on a small lattice long enough to saturate at the equilibrium correlation length xi_eq, demonstrating the bridge between non-equilibrium coarsening and equilibrium structure.
Stochastic ensemble: Multiple independent seeds at one quench temperature, storing per-seed traces to visualize run-to-run variability and the ensemble median + IQR.
scripts.ising.correlation_comparison module
Comparison of spin-spin correlation functions for the 2D Ising model. Analyzes correlation behavior in ferromagnetic, critical, and paramagnetic phases.
- scripts.ising.correlation_comparison.simulate_correlation(params: tuple[float, int, int, int, int]) tuple[ndarray, ndarray][source]
Worker function: simulate and return the averaged correlation function at temperature T.
- Parameters:
params (Tuple of (T, L, steps, eq_steps, sample_interval).)
- Return type:
A tuple of (r, G_r) - radial distances and averaged correlations.
scripts.ising.correlation_divergence module
Analysis of correlation length divergence in the 2D Ising model. Extracts the critical exponent nu by fitting correlation lengths near Tc.
- scripts.ising.correlation_divergence.get_correlation_length(params: tuple[float, int, int, int, int]) tuple[float, float][source]
Simulate and extract correlation length xi for a given temperature.
- Parameters:
params (Tuple of (T, L, steps, eq_steps, sample_interval).)
- Return type:
A tuple of (T, xi).
scripts.ising.diag_eq_traces module
Diagnostic tool for visualizing two-start equilibration traces.
This script runs simultaneous random-start and ordered-start simulations of the 2D Ising model at multiple representative temperatures (deep ordered, critical, and paramagnetic). It identifies seeds that lead to metastable stuck states at low temperatures and generates a multi-panel visualization of the magnetization trajectories.
Results are saved to results/ising/diagnostic_eq_traces_L<size>.png.
- scripts.ising.diag_eq_traces.PALETTE: dict[str, str] = {'convergence': '#888888', 'ordered': '#D65F5F', 'random': '#4878CF'}
Color palette for traces.
- scripts.ising.diag_eq_traces.TC_ISING: float = np.float64(2.269185314213022)
Exact Onsager critical temperature for the 2D nearest-neighbour Ising model.
- scripts.ising.diag_eq_traces.collect_trace(*, size: int, temp: float, seed: int, init_state: str, n_chunks: int, chunk_size: int) ndarray[source]
Run a simulation and collect the magnetization trace.
- Parameters:
size (int) – Linear lattice size L.
temp (float) – Temperature T.
seed (int) – RNG seed.
init_state (str) – Initial state (‘random’ or ‘ordered’).
n_chunks (int) – Number of measurement chunks.
chunk_size (int) – Sweeps per chunk.
- Returns:
Array of magnetization values at each sweep.
- Return type:
np.ndarray
scripts.ising.measure_z module
Measure the dynamical critical exponent z for Metropolis and Wolff algorithms.
This script runs simulations of the 2D Ising model at the critical temperature Tc for various lattice sizes L. It calculates the integrated autocorrelation time tau_int and fits tau_int ~ L^z to extract the dynamic exponent z.
Results are saved to results/ising/dynamic_exponent_z.npz.
- scripts.ising.measure_z.TC_ISING: float = np.float64(2.269185314213022)
Exact Onsager critical temperature for the 2D nearest-neighbour Ising model.
scripts.ising.ordering_evolution module
Domain ordering evolution visualisation for the 2D Ising model.
Quenches from a disordered state to T < T_c and records the spin configuration at multiple time steps, plotting spin configurations, structure factors, and radially averaged correlation functions G(r).
scripts.ising.ordering_kinetics module
Ordering kinetics analysis for the 2D Ising model.
Starting from a disordered state, quenches to T < T_c and tracks the growth of domain size R(t) and the evolution of domain boundaries.
scripts.ising.temperature_sweep module
Standardized temperature sweep for the 2D Ising model. Calculates and plots magnetization, energy, susceptibility, and specific heat.
scripts.ising.wolff_efficiency module
Wolff cluster algorithm efficiency demonstration for the 2D Ising model.
Compares integrated autocorrelation time (tau_int), independent samples per second (ISS), mean cluster size fraction, and susceptibility between the Metropolis checkerboard and Wolff cluster algorithms across a temperature range centred on the critical point T_c ~= 2.269.
Results are saved to results/ising/wolff_efficiency.npz for notebook
re-use and results/ising/wolff_efficiency.png as a 4-panel figure.
- scripts.ising.wolff_efficiency.TC_ISING: float = np.float64(2.269185314213022)
Exact Onsager critical temperature for the 2D nearest-neighbour Ising model.
- scripts.ising.wolff_efficiency.main() None[source]
Execute the Wolff efficiency comparison sweep and save figure and data.
Runs
_measure_efficiency_pointin parallel across the requested temperature range, then writes a 4-panel PNG and an.npzdata file to--output-dir. The.npzis consumed byWolff_Efficiency.ipynbto avoid re-running the sweep.