Code written for the 8. task of Model Analysis 1 in the year 2023/24.
  • Python 67.3%
  • TeX 31%
  • Shell 1.7%
Find a file
2024-08-01 01:10:58 +02:00
IsingModel feat: 🚀 upload .pdf 2024-08-01 01:10:58 +02:00
Latex feat: 🚀 upload .pdf 2024-08-01 01:10:58 +02:00
MolecularChain feat: add test code for 2D implementation of Metropolis 2023-12-02 03:35:40 +01:00
MolecularChain2 feat: prepare for magnetic field data gather 2024-07-30 18:08:26 +02:00
.gitignore chore: 🙈 update .gitignore to exclude all .h5 2024-07-31 22:39:12 +02:00
accidental-veriznica.png feat: 🎨 add accidental chain link plot 2024-07-27 22:40:53 +02:00
accidental2.png feat: 🎨 fix and prettify images 2024-07-27 23:37:48 +02:00
curly-boi-Beta10.png feat: 🎨 fix and prettify images 2024-07-27 23:37:48 +02:00
fixed-init-multiple.png feat: 🎨 finish plot for multiple fixed init runs 2024-07-25 13:07:10 +02:00
fixed-init.png feat: 🎨 fix and prettify images 2024-07-27 23:37:48 +02:00
hosts feat: 📦 add final energy data for histogram 2023-12-02 01:35:16 +00:00
ma-style.mplstyle feat: 🎨 upload some test plots 2024-07-28 17:22:26 +02:00
mod108_instructions.pdf init: 🎉 initial commit 2023-11-28 00:15:25 +01:00
mod108_MarkoUrbanc.pdf feat: 🚀 upload .pdf 2024-08-01 01:10:58 +02:00
mod108_scan.pdf init: 🎉 initial commit 2023-11-28 00:15:25 +01:00
README.md feat: prepare for parameter gridscan 2024-07-25 13:22:15 +02:00
requirements.txt feat: 🎨 work on gridscan plot 2024-07-25 16:22:20 +02:00

Metropolis-Hastings Algorithm

mod108 task for Model Analysis I course at UL FMF.

Notes

You can enable mpl Interactive plots on Linux by exporting the following environment variable:

export MPLBACKEND=qtagg

or in fish which is what I use as my shell:

set -x MPLBACKEND qtagg

These two lines can be added to either ~/.bashrc or ~/.config/fish/config.fish to make the change permanent. I've also included two scripts for running multiple runs of a simulation for both bash and fish.

Running the scripts for data gathering

Used like so:

  ./MolecularChain2/Code/run-T-aR-gridscan.fish $(which python) ./MolecularChain2/Code/T_range.lst ./MolecularChain2/Code/aR_range.lst 

where $(which python) is the path to the python interpreter in the .venv. The T_range.lst and aR_range.lst are the files containing the ranges of the parameters to scan over. The script will generate a file ./MolecularChain2/Results/par-gridscan-T-annealR.h5 with the results of the simulation.