vibespin.scripts.clock package
Submodules
scripts.clock.compare_discrete_vs_continuous module
Side-by-side temperature sweep: continuous clock (XY + anisotropy) vs discrete clock.
- scripts.clock.compare_discrete_vs_continuous.main() None[source]
Run the continuous-vs-discrete clock comparison and save the figure.
- scripts.clock.compare_discrete_vs_continuous.sweep_model(*, model_cls: type, temperatures: ndarray, L: int, q: int, eq_probe_steps: int, eq_max_steps: int, meas_steps: int, base_seed: int, extra_kwargs: dict, stuck_below: float | None = None) tuple[list[float], list[float], list[float], list[float]][source]
Sweep one clock-model variant over a temperature grid.
For each temperature, runs two-start convergence equilibration and then measures thermodynamic observables on the start it certifies. A point whose two starts do not converge within
eq_max_stepsis stored as NaN.- Parameters:
model_cls (type) – Simulation class (
ClockSimulationorDiscreteClockSimulation).temperatures (np.ndarray) – Temperature grid to sweep.
L (int) – Linear lattice size.
q (int) – Number of clock states.
eq_probe_steps (int) – Chunk size for convergence-equilibration probes.
eq_max_steps (int) – Hard cap on equilibration steps per point.
meas_steps (int) – Measurement steps per point.
base_seed (int) – Base RNG seed; each temperature point seeds its random start with
base_seed + point_indexso points are reproducible yet distinct, and its ordered start with a derived partner seed.extra_kwargs (dict) – Extra constructor arguments (e.g.
{'A': aniso}).stuck_below (float or None) – Temperature below which a random start stranded in a domain state is accepted and the ordered start measured (stuck detection on). None disables stuck detection at every temperature.
- Returns:
Lists of per-temperature (avg_m, avg_e, susceptibility, specific heat).
- Return type:
tuple[list[float], list[float], list[float], list[float]]
scripts.clock.correlation_comparison module
Comparison of spin-spin correlation functions G(r) for the q-state Clock model. Analyzes correlation behavior in ordered, quasi-ordered, and disordered phases.
The q=6 clock model has two Kosterlitz-Thouless transitions at T1 ≈ 0.68 and T2 ≈ 0.92 (Challa and Landau 1986; Tomita and Okabe 2002 obtain 0.7014 and 0.9008), yielding three distinct correlation regimes: long-range order below T1, algebraic (quasi-long-range) order between T1 and T2, and exponential decay above T2.
scripts.clock.ordering_evolution module
Phase ordering evolution visualisation for the 2D q-state Clock model.
Quenches from a disordered state to T < T_c and records the spin configuration at multiple time steps, plotting phase configurations, vorticity maps, and radially averaged correlation functions G(r).
scripts.clock.ordering_kinetics module
Ordering kinetics analysis for the 2D q-state Clock model.
Quenches from a disordered state to T < T_c and records length scale growth and vortex density decay over time.
scripts.clock.temperature_sweep module
Standardized temperature sweep for the 2D Clock model. Calculates magnetization, energy, susceptibility, and specific heat, and produces a thermodynamics figure plus a companion diagnostics figure.
The sweep runs the discrete clock model by default; --continuous selects
planar spins with the anisotropy -A cos(q theta) instead.
scripts.clock.wolff_efficiency module
Wolff cluster algorithm efficiency demonstration for the 2D clock model.
The clock counterpart of the Ising and XY comparisons. The temperature window brackets both crossovers of the q=6 model, the lower one out of the ordered phase and the upper one out of the quasi-ordered phase into the disordered one.
The comparison runs on the discrete clock model. Its Wolff update reflects
clusters about the q mirror axes of the clock, which maps allowed states onto
allowed states and satisfies detailed balance for the full discrete
Hamiltonian, so both algorithms sample the same model. The continuous
ClockSimulation cannot serve here: its cluster update ignores the
anisotropy and is only valid at A = 0, where the model is plain XY.
Results are saved to results/clock/wolff_efficiency.npz for notebook re-use
and results/clock/wolff_efficiency.png as a four-panel figure.