Hybrid Monte Carlo with Fourier Acceleration simulation package for the N=2 Principal Chiral model.
Project description
SU(2) x SU(2)
This python package offers efficient simulation and data analysis routines for the SU(2) x SU(2) Principal Chiral model. The key feature offered is the integration of Fourier Acceleration into the Hybrid Monte Carlo algorithm which leads to a significant reduction in the degree of critical slowing down.
Currently the simulation is only supported for a two dimensional cubic lattice.
Installation
To install SU2xSU2
using pip
run:
pip install SU2xSU2
The dependencies of the package are detailed in 'requirements.txt'. To install these download the file and run
pip install -r requirements.txt
Its is recommended to work in a virtual environment.
Documentation
Read the docs here.
Example
A basic example showing how to set up a simulation using Fourier accelerated HMC to measure the wall-to-wall correlation function. Further examples can be found here.
from SU2xSU2.SU2xSU2 import SU2xSU2
# define model and lattice parameters
model_paras = {'L':40, 'a':1, 'ell':5, 'eps':1/5, 'beta':0.6}
model = SU2xSU2(**model_paras)
# define simulation parameters and measurements
sim_paras = {'M':500, 'thin_freq':1, 'burnin_frac':0.5, 'accel':True, 'measurements':[model.ww_correlation_func], 'chain_paths':['corfunc_chain.npy']}
model.run_HMC(**sim_paras)
Licence
SU2xSU2
is free software made available under the MIT License. For details see the LICENSE
file.
To DO
- change name of function that integrates the beta function (state that 1/beta expansion of integrand is used)
- add tests
- once package is published and can be installed
- check if example in README works
- check if example.py works
- data storage: Check that paths are relative to the to current working directory
- plotting
- get latex error when plotting within analysis.py
- no apparent option to add errorbar format '.' in style sheet
- include mplstyle file in stylelib/ to be used globally. Currently, the file needs to be copied manually into the directory. Possible approaches:
- https://github.com/garrettj403/SciencePlots/blob/master/scienceplots/__init__.py using https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/style/core.py
- https://matplotlib.org/stable/tutorials/introductory/customizing.html#distributing-styles
- https://stackoverflow.com/a/52997575
- https://stackoverflow.com/questions/35851201/how-can-i-share-matplotlib-style
- generalize simulation and data analysis to d-dimensional cubic lattice
Project details
Release history Release notifications | RSS feed
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 su2xsu2-1.0.tar.gz
.
File metadata
- Download URL: su2xsu2-1.0.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cccaa289e54e2009fa79310798733a5d1981867711b973fca35ce3a6d90a224 |
|
MD5 | de876a30f16d74ccb1b66fd1bfac1aa9 |
|
BLAKE2b-256 | 9c850806126ef7ba12b102cce0a55fd6883b97850d267903afa193e27f2e242f |
File details
Details for the file su2xsu2-1.0-py3-none-any.whl
.
File metadata
- Download URL: su2xsu2-1.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7381713ad6fae6118afaf7453ae96dc64bcbd91c2f872ad3b316b81a1a3d4e12 |
|
MD5 | 2d52bc463a124fe24175e03097c20d82 |
|
BLAKE2b-256 | 71c7459cef4b723d733b3d51a1ac9bc717061869ad3bd8d41bb6f84f8b3b22b6 |