Skip to content

Simulation of the Potts model for a university course in Monte Carlo simulations

License

Notifications You must be signed in to change notification settings

manolo-lolo/potts-model-monte-carlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Potts model Monte Carlo simulation

Simulation of the Potts model for a university course in Monte Carlo simulations

Preview

alt text

Install dependencies

You need need Python3 with Tkinter and PIP. On Ubuntu 18.04, you can get them by typing (with sudo rights):

apt install python3 python3-tk python3-pip python3-dev 

Create a virtual environment to install the packages dependencies and Poetry dependency manager:

python3 -m venv potts-venv
source potts-venv/bin/activate
pip install poetry

Then use Poetry to install the necessary Python dependencies (via virtualenv and pip):

poetry install

Run GUI of Potts simulation

With the virtual environment still activated (source potts-venv/bin/activate), call

python main.py

TODO

  • Speed up metropolis algorithm

Further ideas

  • Add changeable boundary conditions
  • Make parameters (e. g. magnetization coefficient) changeable in GUI
  • Add simulation mode to loop e. g. over different temperatures
  • Add more statistics to the GUI, e. g. distribution of spin values

About

Simulation of the Potts model for a university course in Monte Carlo simulations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published