diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 836cef9..691aaf8 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-08-12T00:04:09","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-08-12T00:09:51","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/biased_sampling/index.html b/dev/biased_sampling/index.html index 3573f14..4a63a56 100644 --- a/dev/biased_sampling/index.html +++ b/dev/biased_sampling/index.html @@ -1,8 +1,8 @@ -Biased Sampling Methods · MetaQCD.jl

Biased Sampling Methods

MetaQCD.BiasModule.BiasType
Bias(p::ParameterSet, U::Gaugefield; instance=1)

Container that holds general parameters of bias enhanced sampling, like the kind of CV, its smearing and filenames/-pointers relevant to the bias. Also holds the specific kind of bias (Metadynamics, OPES or Parametric for now).
The instance keyword is used in case of PT-MetaD and multiple walkers to assign the correct usebias to each stream.

source
MetaQCD.BiasModule.MetadynamicsType
Metadynamics(; symmetric=true, stride=1, cvlims=(-6, 6), biasfactor=Inf,
+Biased Sampling Methods · MetaQCD.jl

Biased Sampling Methods

MetaQCD.BiasModule.BiasType
Bias(p::ParameterSet, U::Gaugefield; instance=1)

Container that holds general parameters of bias enhanced sampling, like the kind of CV, its smearing and filenames/-pointers relevant to the bias. Also holds the specific kind of bias (Metadynamics, OPES or Parametric for now).
The instance keyword is used in case of PT-MetaD and multiple walkers to assign the correct usebias to each stream.

source
MetaQCD.BiasModule.MetadynamicsType
Metadynamics(; symmetric=true, stride=1, cvlims=(-6, 6), biasfactor=Inf,
               bin_width=0.1, weight=0.01, penalty_weight=1000)
-Metadynamics(p::ParameterSet; instance=1)

Create an instance of a Metadynamics bias using the inputs or the parameters given in p.

Specifiable parameters

symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration
stride::Int64 = 1 - Number of iterations between updates; must be >0
cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
biasfactor::Float64 = Inf - Biasfactor for well-tempered Metadynamics; must be >1
bin_width::Float64 = 0.1 - Width of bins in histogram; must be >0
weight::Float64 = 0.01 - (Starting) Height of added Gaussians; must be positive
penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive

source
MetaQCD.BiasModule.OPESType
OPES(; symmetric=true, stride=1, cvlims=(-6, 6), barrier=30,
+Metadynamics(p::ParameterSet; instance=1)

Create an instance of a Metadynamics bias using the inputs or the parameters given in p.

Specifiable parameters

symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration
stride::Int64 = 1 - Number of iterations between updates; must be >0
cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
biasfactor::Float64 = Inf - Biasfactor for well-tempered Metadynamics; must be >1
bin_width::Float64 = 0.1 - Width of bins in histogram; must be >0
weight::Float64 = 0.01 - (Starting) Height of added Gaussians; must be positive
penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive

source
MetaQCD.BiasModule.OPESType
OPES(; symmetric=true, stride=1, cvlims=(-6, 6), barrier=30,
      biasfactor=Inf, σ₀=0.1, σ_min=1e-6, fixed_σ=true, opes_epsilon=0.0,
      no_Z=false, threshold=1.0, cutoff=0.0)
-OPES(p::ParameterSet; instance=1)

Create an instance of a OPES bias using the parameters given in p.

Specifiable parameters

symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration
stride::Int64 = 1 - Number of iterations between updates; must be >0
cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
barrier::Float64 = 30 - Estimate of height of action barriers
biasfactor::Float64 = Inf - Biasfactor for well-tempered OPES; must be >1
σ₀::Float64 = 0.1 - (Starting) width of kernels; must be >0
σ_min::Float64 = 1e-6 - Minimum width of kernels; must be >0
fixed_σ::Bool = true - If true, width if kernels decreases iteratively
ϵ::Float64 = exp(-barrier/(1-1/biasfactor)) - Determines maximum height of bias; must be >0
no_Z::Bool = false - If false normalization factor Z is dynamically adjusted
threshold::Float64 = 1.0 - Threshold distance for kernel merging; must be >0
cutoff::Float64 = sqrt(2barrier/(1-1/biasfactor)) - Cutoff value for kernels; must be >0
penalty::Float64 = exp(-0.5cutoff²) - Penalty for being outside kernel cutoff; must be >0

source
MetaQCD.BiasModule.ParametricType
Parametric(cvlims, penalty_weight, Q, A, Z)
-Parametric(p::ParameterSet; instance=1)

Create an instance of a static Parametric bias using the inputs or the parameters given in p.

Specifiable parameters

cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive
Q::Float64 = 0 - Quadratic term in the bias
A::Float64 = 0 - Amplitude of the cosine term in the bias
Z::Float64 = 0 - Frequency of the cosine term in the bias

source
+OPES(p::ParameterSet; instance=1)

Create an instance of a OPES bias using the parameters given in p.

Specifiable parameters

symmetric::Bool = true - If true, the bias is built symmetrically by updating for both cv and -cv at every update-iteration
stride::Int64 = 1 - Number of iterations between updates; must be >0
cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
barrier::Float64 = 30 - Estimate of height of action barriers
biasfactor::Float64 = Inf - Biasfactor for well-tempered OPES; must be >1
σ₀::Float64 = 0.1 - (Starting) width of kernels; must be >0
σ_min::Float64 = 1e-6 - Minimum width of kernels; must be >0
fixed_σ::Bool = true - If true, width if kernels decreases iteratively
ϵ::Float64 = exp(-barrier/(1-1/biasfactor)) - Determines maximum height of bias; must be >0
no_Z::Bool = false - If false normalization factor Z is dynamically adjusted
threshold::Float64 = 1.0 - Threshold distance for kernel merging; must be >0
cutoff::Float64 = sqrt(2barrier/(1-1/biasfactor)) - Cutoff value for kernels; must be >0
penalty::Float64 = exp(-0.5cutoff²) - Penalty for being outside kernel cutoff; must be >0

source
MetaQCD.BiasModule.ParametricType
Parametric(cvlims, penalty_weight, Q, A, Z)
+Parametric(p::ParameterSet; instance=1)

Create an instance of a static Parametric bias using the inputs or the parameters given in p.

Specifiable parameters

cvlims::NTuple{2, Float64} = (-6, 6) - Minimum and maximum of the explorable cv-space; must be ordered
penalty_weight::Float64 = 1000 - Penalty when cv is outside of cvlims; must be positive
Q::Float64 = 0 - Quadratic term in the bias
A::Float64 = 0 - Amplitude of the cosine term in the bias
Z::Float64 = 0 - Frequency of the cosine term in the bias

source
diff --git a/dev/dirac/index.html b/dev/dirac/index.html index b5f6b38..9b1ccee 100644 --- a/dev/dirac/index.html +++ b/dev/dirac/index.html @@ -1,8 +1,8 @@ Dirac Operators · MetaQCD.jl

Dirac Operators

Dirac operators are structs that hold a reference to the gauge background U, a temporary fermion field in case one wants to use the doubly flavoured Hermitian variant, the bare mass and a Boolean indicating whether there are antiperiodic boundary conditions in the time direction (yes, only periodic and antiperiodic BCs are supported so far).

To create a Dirac operator, the constructors below are used. One thing to note is that dirac operators can be constructed using any Abstractfield and so the gauge background is always set to nothing on construction. In order to then add a gauge background you must use the dirac operator as a functor on a Gaugefield, like D_U = D_free(U). This does not overwrite the U in D_free but creates a new dirac operator, that references the same temporary fermion fields as the parent and does therefore not introduce any new allocations of fields.

MetaQCD.DiracOperators.WilsonDiracOperatorType
WilsonDiracOperator(::Abstractfield, mass; anti_periodic=true, r=1, csw=0)
-WilsonDiracOperator(D::WilsonDiracOperator, U::Gaugefield)

Create a free Wilson Dirac Operator with mass mass and Wilson parameter r. If anti_periodic is true the fermion fields are anti periodic in the time direction. If csw ≠ 0, a clover term is included. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Wilson Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Fermionfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • C: Boolean declaring whether the operator is clover improved or not
source
MetaQCD.DiracOperators.StaggeredDiracOperatorType
StaggeredDiracOperator(::Abstractfield, mass; anti_periodic=true)
-StaggeredDiracOperator(D::StaggeredDiracOperator, U::Gaugefield)

Create a free Staggered Dirac Operator with mass mass. If anti_periodic is true the fermion fields are anti periodic in the time direction. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Staggered Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Fermionfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
source
MetaQCD.DiracOperators.StaggeredEOPreDiracOperatorType
StaggeredEOPreDiracOperator(::Abstractfield, mass; anti_periodic=true)
+WilsonDiracOperator(D::WilsonDiracOperator, U::Gaugefield)

Create a free Wilson Dirac Operator with mass mass and Wilson parameter r. If anti_periodic is true the fermion fields are anti periodic in the time direction. If csw ≠ 0, a clover term is included. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Wilson Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Fermionfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • C: Boolean declaring whether the operator is clover improved or not
source
MetaQCD.DiracOperators.StaggeredDiracOperatorType
StaggeredDiracOperator(::Abstractfield, mass; anti_periodic=true)
+StaggeredDiracOperator(D::StaggeredDiracOperator, U::Gaugefield)

Create a free Staggered Dirac Operator with mass mass. If anti_periodic is true the fermion fields are anti periodic in the time direction. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Staggered Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Fermionfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
source
MetaQCD.DiracOperators.StaggeredEOPreDiracOperatorType
StaggeredEOPreDiracOperator(::Abstractfield, mass; anti_periodic=true)
 StaggeredEOPreDiracOperator(
     D::Union{StaggeredDiracOperator,StaggeredEOPreDiracOperator},
     U::Gaugefield
-)

Create a free even-odd preconditioned Staggered Dirac Operator with mass mass. If anti_periodic is true the fermion fields are anti periodic in the time direction. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Staggered Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Fermionfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
source
+)

Create a free even-odd preconditioned Staggered Dirac Operator with mass mass. If anti_periodic is true the fermion fields are anti periodic in the time direction. This object cannot be applied to a fermion vector, since it lacks a gauge background. A Staggered Dirac operator with gauge background is created by applying it to a Gaugefield U like D_gauge = D_free(U)

Type Parameters:

source diff --git a/dev/fermion_actions/index.html b/dev/fermion_actions/index.html index 7750e86..d26a5d3 100644 --- a/dev/fermion_actions/index.html +++ b/dev/fermion_actions/index.html @@ -1,2 +1,2 @@ -- · MetaQCD.jl

<!– # Fermion Actions –> <!––> <!– Instead of explicitly creating the Dirac operator, one can also create the corresponding –> <!– fermion action, with similar syntax: –> <!––> <!– @docs --> <!-- WilsonFermionAction --> <!-- –> <!––> <!– @docs --> <!-- StaggeredFermionAction --> <!-- –> <!––> <!– @docs --> <!-- StaggeredEOPreFermionAction --> <!-- –>

+- · MetaQCD.jl

<!– # Fermion Actions –> <!––> <!– Instead of explicitly creating the Dirac operator, one can also create the corresponding –> <!– fermion action, with similar syntax: –> <!––> <!– @docs --> <!-- WilsonFermionAction --> <!-- –> <!––> <!– @docs --> <!-- StaggeredFermionAction --> <!-- –> <!––> <!– @docs --> <!-- StaggeredEOPreFermionAction --> <!-- –>

diff --git a/dev/gaugefields/index.html b/dev/gaugefields/index.html index e4e2fba..3ac1876 100644 --- a/dev/gaugefields/index.html +++ b/dev/gaugefields/index.html @@ -6,8 +6,8 @@ beta = 6.0 U = Gaugefield{backend,prec,action}(Ns, Ns, Ns, Nt, beta) # all links are set to 0

and set the initial conditions with identity_gauges!(U) (cold) or random_gauges!(U) (hot).

Gaugefields, Colorfields and Expfields are structs that contain a main Array U, which is a 5-dimensional array of statically sized 3x3 complex matrices, i.e., SMatrix objects from StaticArrays.jl (where arrays are stored as Tuples under the hood).

The fact that the elements are statically sized immutable arrays means that, for one, there are no allocations when performing linear algebra operations with them and secondly that we always just override the matrices in the arrays instead of mutating them. This yields enormous benefits in terms of less headaches during development and lets us define custom linear algebra routines for SMatrices and SVectors.

The different backends are handled by Kernelabstractions.jl.

We might use more memory efficient storage schemes for SU(3) or su(3) elements in the future.

Fermion fields or spinors or whatever you want to call them are stored in 4-dimensional arrays of n_color * n_dirac complex valued SVectors. The reason for chosing 4 instead of 5 dimensions is that this enabled us to write routines that take care of all dirac components at the same time, which should be more efficient.

When using even-odd preconditioned dirac operators, the fermion fields get wrapped in a struct called EvenOdd such that we can overload all functions on that type. Our convention is to define the fields on the even sites. While we haven't tested whether the following is actually more performant, we map all even sites to the first half of the array to have contiguous memory accesses. The function eo_site does exactly this mapping.

Fermionfields are created in the same way as Gaugefields with the gauge action type parameter being replaced by the number of Dirac indices. For Fermionfields we have the ones! and gaussian_pseudofermions! methods to init them.

MetaQCD.Fields.GaugefieldType
Gaugefield{BACKEND,T,GA}(NX, NY, NZ, NT, β)
 Gaugefield(U::Gaugefield)
-Gaugefield(parameters::ParameterSet)

Creates a Gaugefield on BACKEND, i.e. an array of link-variables (SU3 matrices with T precision) of size 4 × NX × NY × NZ × NT with coupling parameter β and gauge action GA or a zero-initialized copy of U

Supported backends

CPU
CUDABackend
ROCBackend

Supported gauge actions

WilsonGaugeAction
SymanzikTreeGaugeAction (Lüscher-Weisz)
IwasakiGaugeAction
DBW2GaugeAction

source
MetaQCD.Fields.FermionfieldType
Fermionfield{BACKEND,T,ND}(NX, NY, NZ, NT)
+Gaugefield(parameters::ParameterSet)

Creates a Gaugefield on BACKEND, i.e. an array of link-variables (SU3 matrices with T precision) of size 4 × NX × NY × NZ × NT with coupling parameter β and gauge action GA or a zero-initialized copy of U

Supported backends

CPU
CUDABackend
ROCBackend

Supported gauge actions

WilsonGaugeAction
SymanzikTreeGaugeAction (Lüscher-Weisz)
IwasakiGaugeAction
DBW2GaugeAction

source
MetaQCD.Fields.FermionfieldType
Fermionfield{BACKEND,T,ND}(NX, NY, NZ, NT)
 Fermionfield(ψ::Fermionfield)
-Fermionfield(f::Abstractfield, staggered)

Creates a Fermionfield on BACKEND, i.e. an array of link-variables (NC×ND complex vectors with T precision) of size NX × NY × NZ × NT or a zero-initialized copy of ψ. If staggered=true, the number of Dirac degrees of freedom (ND) is reduced to 1 instead of 4.

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.ColorfieldType
Colorfield{BACKEND,T}(NX, NY, NZ, NT)
-Colorfield(u::Abstractfield)

Creates a Colorfield on BACKEND, i.e. an array of 3-by-3 T-precision matrices of size 4 × NX × NY × NZ × NT or a zero-initialized Colorfield of the same size as u

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.ExpfieldType
Expfield{BACKEND,T}(NX, NY, NZ, NT)
-Expfield(u::Abstractfield)

Creates a Expfield on BACKEND, i.e. an array of T-precison exp_iQ_su3 objects of size 4 × NX × NY × NZ × NT or of the same size as u. The objects hold the Q-matrices and all the exponential parameters needed for stout-force recursion

Supported backends

CPU
CUDABackend
ROCBackend

source
+Fermionfield(f::Abstractfield, staggered)

Creates a Fermionfield on BACKEND, i.e. an array of link-variables (NC×ND complex vectors with T precision) of size NX × NY × NZ × NT or a zero-initialized copy of ψ. If staggered=true, the number of Dirac degrees of freedom (ND) is reduced to 1 instead of 4.

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.ColorfieldType
Colorfield{BACKEND,T}(NX, NY, NZ, NT)
+Colorfield(u::Abstractfield)

Creates a Colorfield on BACKEND, i.e. an array of 3-by-3 T-precision matrices of size 4 × NX × NY × NZ × NT or a zero-initialized Colorfield of the same size as u

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.ExpfieldType
Expfield{BACKEND,T}(NX, NY, NZ, NT)
+Expfield(u::Abstractfield)

Creates a Expfield on BACKEND, i.e. an array of T-precison exp_iQ_su3 objects of size 4 × NX × NY × NZ × NT or of the same size as u. The objects hold the Q-matrices and all the exponential parameters needed for stout-force recursion

Supported backends

CPU
CUDABackend
ROCBackend

source
diff --git a/dev/index.html b/dev/index.html index 47159d1..ba2fdf7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ MetaQCD.jl: Metadynamics in Lattice QCD · MetaQCD.jl

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 fermions with and without clover improvement
  • Staggered fermions
  • Even-odd preconditioner
  • RHMC to simulate odd number of flavours
  • Support for CUDA and ROCm(not tested) backends

Installation

First make sure you have a 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.

The package is not in the general registry. So you will have to either

  • Add the package to your Julia environment (not recommended) via:
julia> ] add https://github.com/GianlucaFuwa/MetaQCD.jl

or (recommended)

  1. Clone this repository 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, make sure you not only have CUDA.jl (v4.4.2) or AMDGPU.jl installed, but also a fairly recent version of the CUDA Toolkit or ROCm.

+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, make sure you not only have CUDA.jl (v4.4.2) or AMDGPU.jl installed, but also a fairly recent version of the CUDA Toolkit or ROCm.

diff --git a/dev/observables/index.html b/dev/observables/index.html index 4a4e58e..1f208d8 100644 --- a/dev/observables/index.html +++ b/dev/observables/index.html @@ -1,2 +1,2 @@ -- · MetaQCD.jl

<!– # Measure Observables –>

+- · MetaQCD.jl

<!– # Measure Observables –>

diff --git a/dev/parameters/index.html b/dev/parameters/index.html index 1424629..d8788a3 100644 --- a/dev/parameters/index.html +++ b/dev/parameters/index.html @@ -120,4 +120,4 @@ Base.@kwdef mutable struct MeasurementParameters measurement_method::Vector{Dict} = Dict[] -end +end diff --git a/dev/updates/index.html b/dev/updates/index.html index 7b91ded..c48303f 100644 --- a/dev/updates/index.html +++ b/dev/updates/index.html @@ -21,4 +21,4 @@ heavy_flavours = 0, bias_enabled = false, logdir = "", -)

Create an HMC object, that can be used as an update algorithm.

Arguments

on the trajectories, unless logdir = ""

right number of fermion fields

force recursion when using a bias.

Supported Integrators

Supported Fermion Actions

source
MetaQCD.Updates.MetropolisType
Metropolis(U::Gaugefield{B,T,A,GA}, eo, ϵ, numhits, target_acc, or_alg, numorelax) where {B,T,A,GA}

Create a Metropolis object.

Arguments

  • U::Gaugefield{B,T,A,GA}: Gauge field object.
  • eo: Even-odd preconditioning.
  • ϵ: Step size for the update.
  • numhits: Number of Metropolis hits.
  • target_acc: Target acceptance rate.
  • or_alg: Overrelaxation algorithm.
  • numorelax: Number of overrelaxation sweeps.

Returns

A Metropolis object with the specified parameters. The gauge action GA of the field U determines the iterator used. For the plaquette or Wilson action it uses a Checkerboard iterator and for rectangular actions it partitions the lattice into four sublattices.

source
MetaQCD.Updates.HeatbathType
Heatbath(U::Gaugefield{B,T,A,GA}, MAXIT, numheatbath, or_alg, numorelax) where {B,T,A,GA}

Create a Heatbath` object.

Arguments

  • U: The gauge field on which the update is performed.
  • MAXIT: The maximum iteration count in the Heatbath update.
  • numheatbath: The number of Heatbath sweeps.
  • or_alg: The overrelaxation algorithm used.
  • numorelax: The number of overrelaxation sweeps.

Returns

A Heatbath object with the specified parameters. The gauge action GA of the field U determines the iterator used. For the plaquette or Wilson action it uses a Checkerboard iterator and for rectangular actions it partitions the lattice into four sublattices.

source
MetaQCD.Updates.OverrelaxationType
Overrelaxation(algorithm)

Create an Overrelaxation object, that can be used within a Metropolis or Heatbath update step.

Supported Algorithms

  • "subgroups": Cabibbo-Marinari SU(2) subgroup embedding scheme
  • "kenney_laub": Kenney-Laub projection onto SU(3)
source
+)

Create an HMC object, that can be used as an update algorithm.

Arguments

on the trajectories, unless logdir = ""

right number of fermion fields

force recursion when using a bias.

Supported Integrators

Supported Fermion Actions

source
MetaQCD.Updates.MetropolisType
Metropolis(U::Gaugefield{B,T,A,GA}, eo, ϵ, numhits, target_acc, or_alg, numorelax) where {B,T,A,GA}

Create a Metropolis object.

Arguments

  • U::Gaugefield{B,T,A,GA}: Gauge field object.
  • eo: Even-odd preconditioning.
  • ϵ: Step size for the update.
  • numhits: Number of Metropolis hits.
  • target_acc: Target acceptance rate.
  • or_alg: Overrelaxation algorithm.
  • numorelax: Number of overrelaxation sweeps.

Returns

A Metropolis object with the specified parameters. The gauge action GA of the field U determines the iterator used. For the plaquette or Wilson action it uses a Checkerboard iterator and for rectangular actions it partitions the lattice into four sublattices.

source
MetaQCD.Updates.HeatbathType
Heatbath(U::Gaugefield{B,T,A,GA}, MAXIT, numheatbath, or_alg, numorelax) where {B,T,A,GA}

Create a Heatbath` object.

Arguments

  • U: The gauge field on which the update is performed.
  • MAXIT: The maximum iteration count in the Heatbath update.
  • numheatbath: The number of Heatbath sweeps.
  • or_alg: The overrelaxation algorithm used.
  • numorelax: The number of overrelaxation sweeps.

Returns

A Heatbath object with the specified parameters. The gauge action GA of the field U determines the iterator used. For the plaquette or Wilson action it uses a Checkerboard iterator and for rectangular actions it partitions the lattice into four sublattices.

source
MetaQCD.Updates.OverrelaxationType
Overrelaxation(algorithm)

Create an Overrelaxation object, that can be used within a Metropolis or Heatbath update step.

Supported Algorithms

  • "subgroups": Cabibbo-Marinari SU(2) subgroup embedding scheme
  • "kenney_laub": Kenney-Laub projection onto SU(3)
source
diff --git a/dev/usage/index.html b/dev/usage/index.html index 5d1be6a..2d40c96 100644 --- a/dev/usage/index.html +++ b/dev/usage/index.html @@ -1,4 +1,4 @@ Usage · MetaQCD.jl

Usage

If you just want to perform a simulation with some parameters, then

  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

Logs, measurements and the lot are all written to files in the ensembles directory under the specified directory name. If no directory name is provided, one is generated based on time the simulation was started at.

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)
+biaspotential(bias) diff --git a/dev/utils/index.html b/dev/utils/index.html index cfb1bde..71de516 100644 --- a/dev/utils/index.html +++ b/dev/utils/index.html @@ -1,4 +1,4 @@ -Utility Functions · MetaQCD.jl

Utility Functions

MetaQCD.Utils.ckronMethod
ckron(a, b)
-ckron(A, B)

Return the complex Kronecker(outer) product of vectors a and b, i.e. a ⊗ b†, or of two matrices A and B, i.e. A ⊗ B.

source
MetaQCD.Utils.cmvmul_blockMethod
cmvmul_block(A₊, A₋, x)

Return the matrix-vector product of the block diagonal matrix containing A₊ and A₋ and the vector x

source
MetaQCD.Utils.cmvmul_spin_projMethod
cmvmul_spin_proj(A, x, ::Val{ρ}, ::Val{is_adjoint}=Val(false))

Return A * (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. x is assumed to be a 4xN component complex vector. The third argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix. If is_adjoint is true, A† is used instead of A.

source
MetaQCD.Utils.cnorm2Method
cnorm2(A::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the 2-norm of the complex NxN matrix M

source
MetaQCD.Utils.cvmmul_dMethod
cvmmul_d(x, A)

Return the vector-matrix product of x and the adjoint of A. x is implicitly assumed to be a column vector and therefore the adjoint of x is used

source
MetaQCD.Utils.exp_iQMethod
exp_iQ(Q::SU{3,9,T}) where {T}
-exp_iQ(e::exp_iQ_su3{T}) where {T}

Compute the exponential of a traceless Hermitian 3x3 matrix Q or return the exp_iQ field of the exp_iQ_su3{T}-object e.
From Morningstar & Peardon (2008) arXiv:hep-lat/0311018v1

source
MetaQCD.Utils.exp_iQ_coeffsMethod
exp_iQ_coeffs(Q::SU{3,9,T}) where {T}

Return a exp_iQ_su3 object that contains the exponential of Q and all parameters obtained in the Cayley-Hamilton algorithm that are needed for Stout force recursion.

source
MetaQCD.Utils.gen_SU2_matrixMethod

genSU2matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(2) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.gen_SU3_matrixMethod

genSU3matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(3) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.kenney_laubMethod

kenney_laub(M::SMatrix{3,3,Complex{T},9}) where {T}

Compute the SU(3) matrix closest to M using the Kenney-Laub algorithm.

source
MetaQCD.Utils.moveMethod
move(s::SiteCoords, μ, steps, lim)

Move a site s in the direction μ by steps steps with periodic boundary conditions. The maximum extent of the lattice in the direction μ is lim.

source
MetaQCD.Utils.multrMethod
multr(A::SMatrix{N,N,Complex{T},N²}, B::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the trace of the product of two complex NxN matrices A and B of precision T.

source
MetaQCD.Utils.spin_projMethod
spin_proj(x, ::Val{ρ})

Return (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. and x is a 4xN component complex vector. The second argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix.

source
MetaQCD.Utils.spintraceMethod
spintrace(a, b)

Return the complex Kronecker(outer) product of vectors a and b, summing over dirac indices, i.e. ∑ ᵨ aᵨ ⊗ bᵨ†

source
MetaQCD.Utils.switch_sidesMethod
switch_sides(site::CartesianIndex, NX, NY, NZ, NT, NV)

Return the cartesian index equivalent to site but with opposite parity. E.g., switch_sides((1, 1, 1, 1), 4, 4, 4, 4, 256) = (1, 1, 1, 3) and reverse

source
MetaQCD.Utils.σμν_spin_mulMethod
σμν_spin_mul(x, ::Val{μ}, ::Val{ν})

Return σμν * x where σμν = i/2 * [γμ, γν] with the gamma matrices in the Chiral basis and x is a 4xN component complex vector. The latter two arguments are μ and ν wrapped in a Val and must be within the range [1,4] with μ < ν

source
+Utility Functions · MetaQCD.jl

Utility Functions

MetaQCD.Utils.ckronMethod
ckron(a, b)
+ckron(A, B)

Return the complex Kronecker(outer) product of vectors a and b, i.e. a ⊗ b†, or of two matrices A and B, i.e. A ⊗ B.

source
MetaQCD.Utils.cmvmul_blockMethod
cmvmul_block(A₊, A₋, x)

Return the matrix-vector product of the block diagonal matrix containing A₊ and A₋ and the vector x

source
MetaQCD.Utils.cmvmul_spin_projMethod
cmvmul_spin_proj(A, x, ::Val{ρ}, ::Val{is_adjoint}=Val(false))

Return A * (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. x is assumed to be a 4xN component complex vector. The third argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix. If is_adjoint is true, A† is used instead of A.

source
MetaQCD.Utils.cnorm2Method
cnorm2(A::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the 2-norm of the complex NxN matrix M

source
MetaQCD.Utils.cvmmul_dMethod
cvmmul_d(x, A)

Return the vector-matrix product of x and the adjoint of A. x is implicitly assumed to be a column vector and therefore the adjoint of x is used

source
MetaQCD.Utils.exp_iQMethod
exp_iQ(Q::SU{3,9,T}) where {T}
+exp_iQ(e::exp_iQ_su3{T}) where {T}

Compute the exponential of a traceless Hermitian 3x3 matrix Q or return the exp_iQ field of the exp_iQ_su3{T}-object e.
From Morningstar & Peardon (2008) arXiv:hep-lat/0311018v1

source
MetaQCD.Utils.exp_iQ_coeffsMethod
exp_iQ_coeffs(Q::SU{3,9,T}) where {T}

Return a exp_iQ_su3 object that contains the exponential of Q and all parameters obtained in the Cayley-Hamilton algorithm that are needed for Stout force recursion.

source
MetaQCD.Utils.gen_SU2_matrixMethod

genSU2matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(2) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.gen_SU3_matrixMethod

genSU3matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(3) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.kenney_laubMethod

kenney_laub(M::SMatrix{3,3,Complex{T},9}) where {T}

Compute the SU(3) matrix closest to M using the Kenney-Laub algorithm.

source
MetaQCD.Utils.moveMethod
move(s::SiteCoords, μ, steps, lim)

Move a site s in the direction μ by steps steps with periodic boundary conditions. The maximum extent of the lattice in the direction μ is lim.

source
MetaQCD.Utils.multrMethod
multr(A::SMatrix{N,N,Complex{T},N²}, B::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the trace of the product of two complex NxN matrices A and B of precision T.

source
MetaQCD.Utils.spin_projMethod
spin_proj(x, ::Val{ρ})

Return (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. and x is a 4xN component complex vector. The second argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix.

source
MetaQCD.Utils.spintraceMethod
spintrace(a, b)

Return the complex Kronecker(outer) product of vectors a and b, summing over dirac indices, i.e. ∑ ᵨ aᵨ ⊗ bᵨ†

source
MetaQCD.Utils.switch_sidesMethod
switch_sides(site::CartesianIndex, NX, NY, NZ, NT, NV)

Return the cartesian index equivalent to site but with opposite parity. E.g., switch_sides((1, 1, 1, 1), 4, 4, 4, 4, 256) = (1, 1, 1, 3) and reverse

source
MetaQCD.Utils.σμν_spin_mulMethod
σμν_spin_mul(x, ::Val{μ}, ::Val{ν})

Return σμν * x where σμν = i/2 * [γμ, γν] with the gamma matrices in the Chiral basis and x is a 4xN component complex vector. The latter two arguments are μ and ν wrapped in a Val and must be within the range [1,4] with μ < ν

source
diff --git a/dev/viz/index.html b/dev/viz/index.html index 14bdce9..7149733 100644 --- a/dev/viz/index.html +++ b/dev/viz/index.html @@ -1,4 +1,4 @@ Visualization · MetaQCD.jl

Visualization

We include the ability to visualize your data. For that, you have pass the the directory under "ensembles" that contains your measurements, creating a MetaMeasuremnts object holding all the measurements in Dict where the keys are symbols denoting the observable.

ens = "my_ensemble"
 measurements = MetaMeasurements(ens)

Now we can plot a timeseries of any observables at flow time tf measured on the ensemble via the timeseries method:

timeseries(measurements, :myobservable, tf=0)

For hadron correlators there is a special function hadroncorrelator that plots the mean values of all time slices (without statistical uncertainties). Just specify the hadron whose correlator you want to see:

hadroncorrelator(measurements, :pion; logscale=true, calc_meff=false, tf=0.0)

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)
+biaspotential(bias)