A library project of Monte Carlo simulation algorithms for some statistical physics models (in particular, the Ising model and its variants).
Project description
mcmc_statphys
A Python package of Monte Carlo simulation algorithms for some statistical physics models (in particular, the Ising model and its variants).
Free software: MIT license
Documentation: https://mcmc-statphys.readthedocs.io.
Features
A simple Ising model simulation.
>>> import mcmc_statphys as mcsp
>>> model = mcsp.model.Ising(12) # 12x12 Ising model
>>> algorithm = mcsp.method.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
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.
History
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
[Unreleased]
[0.3.0] - 2023-05-18
Added
Add cv in analysis to calculate the cv
Add spin2svd in analysis
Add uid2svd in analysis
[0.2.1] - 2023-05-17
Fixed
Fix the bug of saving _get_per_magnetization in _save_data in algorithm
Added
Add moudle analysis to analyze the data
Add moudle draw to draw the figures
Add method setspin in model
Add tqmd to show the progress bar
Doc
Add documentation to README
Add documentation to Usages
Changed
Change the methods in the analysis module: removed the Sample and ParameterSample classes, added Metropolis, Wolff, Anneal classes and several methods
[0.1.2] - 2023-05-15
Security
Add function annotations to all functions
Add type hints to all functions
Add type hints to all variables
Change mcmc_statphys.py to method.py
Doc
Add documentation to README
[0.1.1] - 2023-05-14
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mcmc_statphys-0.3.0.tar.gz
.
File metadata
- Download URL: mcmc_statphys-0.3.0.tar.gz
- Upload date:
- Size: 47.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.9.6 requests/2.30.0 setuptools/67.7.2 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40860e2a6a3937328145aab35708329eb6f31462670c205c0fd1097670d77860 |
|
MD5 | 89a6038badbac2700b3f505be6ab2306 |
|
BLAKE2b-256 | bd158f4e4cce833488bd92c04f73a43e4f3924ebdf65261b3d9667fc4e74c2a8 |
File details
Details for the file mcmc_statphys-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: mcmc_statphys-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.9.6 requests/2.30.0 setuptools/67.7.2 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b61550eac6c038c1a3677f09cb76cbd273b90e253703b7962793c01769c75382 |
|
MD5 | 82917135cb03bfa530dd150cf2046f7a |
|
BLAKE2b-256 | 534a22016ca4bef37b89d987bdda039750ab0faa6328371aa49e229357c89864 |