Skip to content

UynajGI/mcmc_statphys

Repository files navigation

mcmc_statphys

Documentation Status

A Python package of Monte Carlo simulation algorithms for some statistical physics models (in particular, the Ising model and its variants).

Features

A simple Ising model simulation.

>>> import mcmc_statphys as mcsp
>>> model = mcsp.model.Ising(12) # 12x12 Ising model
>>> algorithm = mcsp.algorithm.Metropolis(model) # Metropolis algorithm
>>> uid = algorithm.equil_sample(T=1, max_iter=1000) # sample until equilibrium
>>> fig = mcsp.draw.Plot(algorithm)
>>> fig.curve(uid=uid, comlumn='energy') # plot the energy curve

Install

the latest version of mcmc_statphys:

$ pip install mcmc_statphys

upgrade to the latest version:

$ pip install --upgrade mcmc_statphys

Bugs

Please report any bugs that you find here. Or, even better, fork the repository on GitHub and create a pull request (PR). We welcome all changes, big or small, and we will help you make the PR if you are new to git (just ask on the issue and/or see CONTRIBUTING).

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.