diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index d82eaf7..1f6b426 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-28T01:12:17","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-12-04T12:20:32","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 b5bbf7b..0fa3550 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{TopChargeType,Smearing,BiasType,Weights,FileType}

Container for bias potential and metadata.

Bias(p::ParameterSet, U::Gaugefield; instance=0)

Create a Bias that holds general parameters of bias enhanced sampling, like the kind of CV, its smearing and filenames 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 <: AbstractBias

Metadynamics bias-enhanced sampler from https://arxiv.org/abs/cond-mat/0208352 .

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

Biased Sampling Methods

MetaQCD.BiasModule.BiasType
Bias{TopChargeType,Smearing,BiasType,Weights,FileType}

Container for bias potential and metadata.

Bias(p::ParameterSet, U::Gaugefield; instance=0)

Create a Bias that holds general parameters of bias enhanced sampling, like the kind of CV, its smearing and filenames 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 <: AbstractBias

Metadynamics bias-enhanced sampler from https://arxiv.org/abs/cond-mat/0208352 .

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 <: AbstractBias

OPES bias-enhanced sampler from https://arxiv.org/abs/1909.07250 .

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 <: AbstractBias

OPES bias-enhanced sampler from https://arxiv.org/abs/1909.07250 .

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 <: AbstractBias

Bias-enhanced sampler that uses the parametrization from https://arxiv.org/pdf/2212.11665 up to first order.

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 <: AbstractBias

Bias-enhanced sampler that uses the parametrization from https://arxiv.org/pdf/2212.11665 up to first order.

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 e872780..9fd5f82 100644 --- a/dev/dirac/index.html +++ b/dev/dirac/index.html @@ -1,9 +1,9 @@ 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.

Instead of explicitly creating the Dirac operator, one can also create the corresponding fermion action, with similar syntax. Some extra parameters that can be specified are the number of flavors, RHMC-related parameters such as the spectral bounds and approximation order & precision and solver-related parameters such as the tolerance and the maximum number of solver iterations

MetaQCD.DiracOperators.WilsonDiracOperatorType
WilsonDiracOperator(::AbstractField, mass; bc_str="antiperiodic", r=1, csw=0)
-WilsonDiracOperator(D::WilsonDiracOperator, U::Gaugefield)

Create a free Wilson Dirac Operator with mass mass and Wilson parameter r.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield 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
  • BC: Boundary Condition in time direction
source
MetaQCD.DiracOperators.StaggeredDiracOperatorType
StaggeredDiracOperator(f::AbstractField, mass; bc_str="antiperiodic")
-StaggeredDiracOperator(D::StaggeredDiracOperator, U::Gaugefield)

Create a free Staggered Dirac Operator with mass mass.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

If csw ≠ 0, a clover term is included.

This object cannot be directly 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • BC: Boundary Condition in time direction
source
MetaQCD.DiracOperators.StaggeredEOPreDiracOperatorType
StaggeredEOPreDiracOperator(f::AbstractField, mass; bc_str="antiperiodic")
+WilsonDiracOperator(D::WilsonDiracOperator, U::Gaugefield)

Create a free Wilson Dirac Operator with mass mass and Wilson parameter r.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield 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
  • BC: Boundary Condition in time direction
source
MetaQCD.DiracOperators.StaggeredDiracOperatorType
StaggeredDiracOperator(f::AbstractField, mass; bc_str="antiperiodic")
+StaggeredDiracOperator(D::StaggeredDiracOperator, U::Gaugefield)

Create a free Staggered Dirac Operator with mass mass.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

If csw ≠ 0, a clover term is included.

This object cannot be directly 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • BC: Boundary Condition in time direction
source
MetaQCD.DiracOperators.StaggeredEOPreDiracOperatorType
StaggeredEOPreDiracOperator(f::AbstractField, mass; bc_str="antiperiodic")
 StaggeredEOPreDiracOperator(
     D::Union{StaggeredDiracOperator,StaggeredEOPreDiracOperator},
     U::Gaugefield
-)

Create a free even-odd preconditioned Staggered Dirac Operator with mass mass.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

If csw ≠ 0, a clover term is included.

This object cannot be directly 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • BC: Boundary Condition in time direction
source
MetaQCD.DiracOperators.StaggeredHoelblingDiracOperatorType
StaggeredHoelblingDiracOperator{MT}(f::AbstractField, mass; bc_str="antiperiodic")
-StaggeredHoelblingDiracOperator(D::StaggeredHoelblingDiracOperator, U::Gaugefield)

Create a free Hölbling mass split Staggered Dirac Operator (arXiv:1009.5362) with mass mass. The type-parameter MT determines the kind of operator that is used:

  • MT = 1234: M12 + M34
  • MT = 1324: M13 + M24
  • MT = 1342: M13 + M42

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

This object cannot be directly 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(U)

Type Parameters:

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

Create a free even-odd preconditioned Staggered Dirac Operator with mass mass.

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

If csw ≠ 0, a clover term is included.

This object cannot be directly 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(U)

Type Parameters:

source
MetaQCD.DiracOperators.StaggeredHoelblingDiracOperatorType
StaggeredHoelblingDiracOperator{MT}(f::AbstractField, mass; bc_str="antiperiodic")
+StaggeredHoelblingDiracOperator(D::StaggeredHoelblingDiracOperator, U::Gaugefield)

Create a free Hölbling mass split Staggered Dirac Operator (arXiv:1009.5362) with mass mass. The type-parameter MT determines the kind of operator that is used:

  • MT = 1234: M12 + M34
  • MT = 1324: M13 + M24
  • MT = 1342: M13 + M42

bc_str can either be "periodic" or "antiperiodic" and specifies the boundary condition in the time direction.

This object cannot be directly 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(U)

Type Parameters:

  • B: Backend (CPU / CUDA / ROCm)
  • T: Floating point precision
  • TF: Type of the Spinorfield used to store intermediate results when using the Hermitian version of the operator
  • TG: Type of the underlying Gaugefield
  • BC: Boundary Condition in time direction
source
diff --git a/dev/fermion_actions/index.html b/dev/fermion_actions/index.html index 53cb6d4..458092f 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. Some extra parameters that can be specified are the –> <!– number of flavors, RHMC-related parameters such as the spectral bounds and approximation –> <!– order & precision and solver-related parameters such as the tolerance and the maximum –> <!– number of solver iterations –> <!––> <!– @autodocs --> <!-- WilsonFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredEOPreFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredHoelblingFermionAction --> <!-- –>

+- · MetaQCD.jl

<!– # Fermion Actions –> <!––> <!– Instead of explicitly creating the Dirac operator, one can also create the corresponding –> <!– fermion action, with similar syntax. Some extra parameters that can be specified are the –> <!– number of flavors, RHMC-related parameters such as the spectral bounds and approximation –> <!– order & precision and solver-related parameters such as the tolerance and the maximum –> <!– number of solver iterations –> <!––> <!– @autodocs --> <!-- WilsonFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredEOPreFermionAction --> <!-- –> <!––> <!– @autodocs --> <!-- StaggeredHoelblingFermionAction --> <!-- –>

diff --git a/dev/gaugefields/index.html b/dev/gaugefields/index.html index 84f3b12..5f8f8e4 100644 --- a/dev/gaugefields/index.html +++ b/dev/gaugefields/index.html @@ -8,12 +8,12 @@ AbstractField{Backend,FloatType,IsDistributed,ArrayType}

5-dimensional dense array of statically sized 3x3 matrices contatining associated meta-data.

Gaugefield{Backend,FloatType,GaugeAction}(NX, NY, NZ, NT, β)
 Gaugefield{Backend,FloatType,GaugeAction}(NX, NY, NZ, NT, β, numprocs_cart, halo_width)
 Gaugefield(U::Gaugefield)
-Gaugefield(parameters::ParameterSet)

Creates a Gaugefield on Backend, i.e. an array of link-variables (SU3 matrices with FloatType precision) of size 4 × NX × NY × NZ × NT with coupling parameter β and gauge action GaugeAction 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.ColorfieldType
Colorfield{Backend,FloatType,IsDistributed,ArrayType} <:
+Gaugefield(parameters::ParameterSet)

Creates a Gaugefield on Backend, i.e. an array of link-variables (SU3 matrices with FloatType precision) of size 4 × NX × NY × NZ × NT with coupling parameter β and gauge action GaugeAction 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.ColorfieldType
Colorfield{Backend,FloatType,IsDistributed,ArrayType} <:
 AbstractField{Backend,FloatType,IsDistributed,ArrayType}

5-dimensional dense array of statically sized 3x3 matrices contatining associated meta-data.

Colorfield{Backend,FloatType}(NX, NY, NZ, NT)
 Colorfield{Backend,FloatType}(NX, NY, NZ, NT, numprocs_cart, halo_width)
-Colorfield(u::AbstractField)

Creates a Colorfield on Backend, i.e. an array of 3-by-3 FloatType-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,FloatType,IsDistributed,ArrayType} <:
+Colorfield(u::AbstractField)

Creates a Colorfield on Backend, i.e. an array of 3-by-3 FloatType-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,FloatType,IsDistributed,ArrayType} <:
 AbstractField{Backend,FloatType,IsDistributed,ArrayType}

5-dimensional dense array of exp_iQ_su3 objects contatining associated meta-data. The objects hold the Q-matrices and all the exponential parameters needed for stout-force recursion.

Expfield{Backend,FloatType}(NX, NY, NZ, NT)
 Expfield{Backend,FloatType}(NX, NY, NZ, NT, numprocs_cart, halo_width)
-Expfield(u::AbstractField)

Creates a Expfield on Backend, i.e. an array of FloatType-precison exp_iQ_su3 objects of size 4 × NX × NY × NZ × NT or of the same size as u.

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.SpinorfieldType
Spinorfield{Backend,FloatType,NumDirac}(NX, NY, NZ, NT)
+Expfield(u::AbstractField)

Creates a Expfield on Backend, i.e. an array of FloatType-precison exp_iQ_su3 objects of size 4 × NX × NY × NZ × NT or of the same size as u.

Supported backends

CPU
CUDABackend
ROCBackend

source
MetaQCD.Fields.SpinorfieldType
Spinorfield{Backend,FloatType,NumDirac}(NX, NY, NZ, NT)
 Spinorfield(ψ::Spinorfield)
-Spinorfield(f::AbstractField; staggered=false)

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

Supported backends

CPU
CUDABackend
ROCBackend

source
+Spinorfield(f::AbstractField; staggered=false)

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

Supported backends

CPU
CUDABackend
ROCBackend

source diff --git a/dev/index.html b/dev/index.html index 25fe05f..ac22a82 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:

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

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.

+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.

diff --git a/dev/observables/index.html b/dev/observables/index.html index b75d974..033084e 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 54538fe..57c9ad3 100644 --- a/dev/parameters/index.html +++ b/dev/parameters/index.html @@ -124,4 +124,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 93f47cd..b3d7360 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 70b3b71..6d3c02f 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.jl -mode=sim 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 (still experimental), just append its name to the command:

julia --threads=auto metaqcd.jl -mode=sim -backend=cuda parameters.toml

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.jl -mode=build 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 910a5c6..ffec930 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(P::PauliMatrix, x::SVector)

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(P::PauliMatrix, x::SVector)

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 33bc25f..d872fd8 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)