Metadata-Version: 2.4
Name: pyising
Version: 0.1.3
Summary: Python bindings for the Ising2D C++ simulation
Home-page: https://github.com/mmaleki2/pyising
Author: Morteza Maleki
Author-email: maleki.morteza92@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pybind11>=2.5.0
Requires-Dist: mpi4py
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scipy
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

[![Upload Python Package](https://github.com/mmaleki92/pyising/actions/workflows/python-publish.yml/badge.svg)](https://github.com/mmaleki92/pyising/actions/workflows/python-publish.yml)

# PyIsing

PyIsing is a Python library for simulating the Ising model using C++ bindings via pybind11. It includes implementations of the Wolff and Metropolis Monte Carlo algorithms for efficient simulation of spin systems.

## Features
- Fast C++ core: Uses pybind11 to leverage high-performance C++ computations.
- Wolff Algorithm: Implements cluster updates for efficient decorrelation.
- Metropolis Algorithm: Standard single-spin update method.
- Flexible Parameters: Supports different lattice sizes, temperatures.

## installation
```bash
pip install pyising
```

for buliding from scratch

```bash
pythin setup.py install
```
## usage
```python
import pyising

temps = np.linspace(1, 4, 50)

L = 64
results = pyising.run_parallel_metropolis(temps, L, N_steps=N_steps,
                                          equ_N=equ_N,
                                          snapshot_interval=snapshot_interval,
                                          seed_base=seed_base,
                                          output_dir=output_dir,
                                          use_wolff=use_wolff,
                                          save_all_configs=save_all_configs
                                          )

```


# References
I built the code based on the following code, added the python binding and made it modular after refining the structure.
https://github.com/VictorSeven/IsingModel
