Examples of Monte Carlo simulations in Physics using Metropolis algorithm:
- Ideal two state model
- Ising 2D model (interacting spins in absence of external magnetic field)
The two_state_snapshots python file performs a simulation at a given T The two_state python file explores many simulations at different T and plots the evloution of Energy, Heat capacity, etc as a function of T
A general description of the Metropolis Algorithm can be found in LibreText here