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.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.
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.4.0] - 2023-05-20
Added
Add imshow in draw
Add animate in draw
Fixed
Fix: Wolff and Anneal uid does not return
[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-1.0.0.tar.gz
.
File metadata
- Download URL: mcmc_statphys-1.0.0.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc8af32326560b08f0ae0e359fdaecf0c5d94bf4e5a88d680da2b65a9261f235 |
|
MD5 | 75eed8455a2c9ab9f0668a0baba81c58 |
|
BLAKE2b-256 | b2995fb9e05c8e9c325899013753c2f5fd2353fb9308f1ec8fa3e9b36df6976c |
File details
Details for the file mcmc_statphys-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: mcmc_statphys-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 50.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86673664ad372bb775de678c8b9a7c9b6e99d5e172c558cd8aed97e1f72e81e6 |
|
MD5 | 168c8516bceeaf2efcbc9b4d7f6f983b |
|
BLAKE2b-256 | 9efd9b4e6ae5786e5d47bae98c9a43dfead517042d62c19835db3823b01185c8 |