Skip to content

MCMC Simulations of 4D SU(3) Yang-Mills theory using variations of Metadynamics

License

Notifications You must be signed in to change notification settings

GianlucaFuwa/MetaQCD.jl

Repository files navigation

Global Docs Aqua QA

MetaQCD.jl

Inspired by the LatticeQCD.jl package by Akio Tomiya et al.

Features:

  • Simulations of 4D-SU(3) Yang-Mills (Pure Gauge) theory
  • Simulations of full lattice QCD with arbitrary number of flavours (Staggered, Wilson-Clover)
  • Metadynamics
  • PT-MetaD
  • Several update algorithms (HMC, Metropolis, Heatbath, Overrelaxation)
  • Several symplectic integrators for HMC (Leapfrog, OMF2, OMF4)
  • Gradient flow with variable integrators (Euler, RK2, RK3, RK3W7)
  • Improved Gauge actions (Symanzik tree, Iwasaki, DBW2)
  • Improved Topological charge definitions (clover, rectangle clover-improved)
  • Wilson(-Clover) fermions
  • Staggered fermions
  • Even-odd preconditioner for Wilson(-Clover)
  • Even-odd preconditioner for Staggered
  • Mass-splitting preconditioner / Hasenbusch trick
  • RHMC to simulate odd number of flavours
  • Support for CUDA and ROCm backends
  • Multi-device simulations using MPI

Installation:

First make sure you have Julia version 1.9.x or 1.10.x installed. You can use juliaup for that or just install the release from the Julia website.

Then:

  1. Clone the latest release onto your machine.
  2. Open Julia in the directory which you cloned the repo into, with the project specific environment. This can either be done by starting Julia with the command line argument "--project" or by activating the environment within an opened Julia instance via the package manager:
using Pkg
Pkg.activate(".")

Or you can switch to package manager mode by typing "]" and then do

pkg> activate .
  1. Instantiate the project to install all the dependencies using the package manager:
Pkg.instantiate()

or

pkg> instantiate

If you want to use a GPU (not yet fully ready), make sure you not only have CUDA.jl or AMDGPU.jl installed, but also a fairly recent version of the CUDA Toolkit or ROCm.

Quick Start:

  1. Set parameters using one of the templates in template folder
  2. From shell, do:
julia --threads=auto metaqcd_sim.jl parameters.toml

or

  1. Start Julia (with project):
julia --threads=auto --project=/path/to/dir/containing/MetaQCD.jl
  1. Import MetaQCD package:
using MetaQCD
  1. Begin Simulation with prepared parameter file "parameters.toml":
run_sim("parameters.toml")

To use another backend, just append its name to the command:

julia --threads=auto metaqcd_sim.jl parameters.toml cuda

Build a Bias:

  1. Set parameters using the "parameters_build.toml" example in template folder
  2. From shell, do:
julia --threads=auto metaqcd_build.jl parameters.toml

or

  1. Start Julia (with project):
julia --threads=auto --project=/path/to/dir/containing/MetaQCD.jl
  1. Import MetaQCD package:
using MetaQCD
  1. Begin build with prepared parameter file "parameters.toml":
build_bias("parameters.toml")

Visualization:

We include the ability to visualize your data. For that, you just have to pass the directory where your ensemble lives:

pkg> measurements = MetaMeasurements("my_ensemble")
pkg> timeseries(measurements, :my_observable)

You can also create a holder of a bias potential and plot it. MetaQCD.jl creates the bias files with an extension that gives their type (.metad or .opes), but if you changed the extension you have to provide the bias type as a symbol under the kwarg which:

bias = MetaBias(myfile, which=:mytype)
biaspotential(bias)

About

MCMC Simulations of 4D SU(3) Yang-Mills theory using variations of Metadynamics

Resources

License

Stars

Watchers

Forks

Languages