Monte Carlo simulation of Generalized Canonical Ensemble for Ising Model
Project description
Gceising is a Monte Carlo simulation toolkit of the Generalized Canonical Ensemble of 2D Ising Model.
The programming of this project involves tasks in three aspects: Time consuming jobs, Numerical calculation and Data virtualization. To improve the performance of time consuming job, we code it in C++ and then bind it via swig as a python module, which can be used by other modules. Python has many advanced data structures, from which it is so free to do scientific jobs such as numerical calculation. Though Matplotlib python package, we also can easily deal with data virtualization. If we use pyQT, UI design is amazing.
Gceisng bases on C++, Swig, Numpy, Matplotlib and PyQt4.
Install
This package depends on Numpy, Matplotlib, and PyQt4 (swig are optional if you need modify the *.i files). Once you have fulfilled these dependencies you can install the package with the usual command:
$ python setup.py install
if you INSTALL ON WINDOWS, you can use mingw32 or MS VC++ as C++ compiler. For installation of PyQt4 on Windows, PyQt4 binary package (build-in with qt and sip) is strongly recommended instead of source packages. PyQt4 download link http://www.riverbankcomputing.co.uk/software/pyqt/download.
Usage
There are various ways to use gceising. The simplest is add inline code as argument to the Python interpreter:
$ python -c "from gceising import qIsing;qIsing.main()"
This will create a GUI window which you can operate. Or execute python qIsing.py after _Ising.so or _Ising.pyd is built.
It is also possible to manually call qIsing.py inside Python code:
>>> from gceising import qIsing >>> qIsing.main()
- Note:
Ising.py in gceising package can be freely extended as need like qIsing.py.
You can also find a video demo of gceising on youtube.
Bugs
The source code has been successfully tested on Linux and Windows with Python 2.5 and Python 2.6 respectively. Bugs on Mac OS are unknown.
Misc
Author: Alwin Tsui <alwintsui@gmail.com> ;
Theoretical Physics advisor: Xin Zhou <xinzhou71@gmail.com> at Asia Pacific Center for Theoretical Physics (APCTP).
Feedback
Comments, suggestions and patches are welcome and appreciated. They can be sent to alwintsui@gmail.com.
License
GPLv3+ License, (C) 2011 Alwin Tsui.
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.