Learn R Programming

isingLenzMC: Monte Carlo for Classical Ising Model

Description

Classical Ising Model is a land mark system in statistical physics. The model explains the physics of spin glasses and magnetic materials, and cooperative phenomenon in general, for example phase transitions and neural networks. This package provides utilities to simulate one dimensional Ising Model with Metropolis and Glauber Monte Carlo with single flip dynamics in periodic boundary conditions. Utility functions for exact solutions are provided. Such as transfer matrix for 1D. Example use cases are as follows: Measuring effective ergodicity and power-laws in so called functional-diffusion.

Scientific Output

The package is used in the following peer-reviewed works:

See Bibtex entries at CITATION.

We provide replicating results from the papers under examples directory.

Dev Scratch Notes

  • Building and checks
R CMD build --compact-vignettes=both isingLenzMC
R CMD check --as-cran  isingLenzMC_<version>.tar.gz

License

This project and all contributions are licensed under :

  • All non-code
  • Code under

Copy Link

Version

Install

install.packages('isingLenzMC')

Monthly Downloads

273

Version

0.3.1

License

GPL (>= 3)

Maintainer

Mehmet Suzen

Last Published

February 26th, 2026

Functions in isingLenzMC (0.3.1)

transitionProbability1D_R

Compute transition probability using Boltzmann distribution.
transferMatrix

Compute theoretical transfer matrix
transitionProbability1D

Compute transition probability using Boltzmann distribution.
lattice1DenergyNN

Nearest-Neighbour energy in periodic boundary conditions in 1D
lattice1DenergyNN_R

Nearest-Neighbour energy in periodic boundary conditions in 1D
flipConfig1D_R

Given Flip a site randomly
flipConfig1D

Given Flip a site randomly
sumVec

Sum given vector
totalEnergy1D_R

Total energy in periodic boundary conditions in 1D
sumVec_R

Sum given vector
totalEnergy1D

Total energy in periodic boundary conditions in 1D
genUniform

Get uniformly a spin state
genConfig1D_R

Generate one dimensional spin sites randomly
isStep1D

Carry one step Metropolis Monte Carlo on 1D ising model
isPerform1D

Perform metropolis MC on 1D Ising model
flipConfig1Dmany

Flip a single site randomly many times
genConfig1D

Generate one dimensional spin sites randomly