Code to calculate various gluonic quantities in lattice QCD. These include quantities such as various Wilson loops or
Note you may need to set the stacksize to larger (unlimited is easiest) to use this code
| Method | Implementation Status | Notes |
|---|---|---|
| Generic 'path' based Wilson line | ✓ | Returns the multiplication along the path from a starting point |
| Plaquette (spatial, temporal, total) | ✓ | |
| Polyakov Loop | ✓ | hard coded only |
| Clover Fmunu | ✓ ✗ | Function exists but is not currently used anywhere |
| 5-loop improved Fmunu | ✓ | hep-lat/0203008 |
| B^2 Calculation | ✓ | Currently using 5-loop Fmunu |
| Wmunu | ✓ ✗ | Deprecated functions to do nMuxnNu Wilson loops. Does not use generic path |
| Gluon Propagator | ✗ | Work in progress - POSTPONED. |
| uzerobar | ✓ | Calculates u_0 using Landau gauge and plaquette definitions |
| stout-link smearing | ✓ | Stout smear (Morningstar & Peardon, 10.1103/PhysRevD.69.054501) gauge links. Spatial link smearing only |
|
|
✓ | Heatbath algorithm to generate quenched |
Note that Generic path based Wilson line and the generic path plaquette.
The supported formats are openqcd and an ILDG-like binary format. This is the ILDG binary data format in big endian. The cssm format stores some metadata, and then only the first two rows of the cssm format assumes big endian.
| Format | Read | Write |
|---|---|---|
| openqcd | ✓ | ✓ |
| ildg-bin | ✓ | ✗ |
| cssm | ✓ | ✗ |
The internal representation of a (3, 3, 4, NT, NS, NS, NS).
The cssm format stores some metadata, the real part of the whole cssm format assumes big endian.
The HKLS (Hands-Kim-Lawlor-Skullerud) supports the compact format used by su2hmc.
The NRQ2CD format is (ip5d2,2,2,4,0:1) where ip5d2 is $NX \times NY \times NZ \times NT / 2` where 0 means odd sites and 1 is even sites with NX iterating fastest.
| Format | Read | Write |
|---|---|---|
| HKLS | ✓ | ✓ |
| cssm | ✗ | ✓ |
| NRQ2CD | ✓ | ✓ |
The internal representation of a (2, 2, 4, NT, NS, NS, NS).
Run a program using a command like the below. Here magnetic is the name of the app, we set the compiler to ifx, add the -qopenmp flag, specify the 'release' default flags of fpm, and us the mag.toml input file.
fpm run magnetic --compiler ifx --flag "-qopenmp" --profile release -- mag.toml
If using the intel compiler (ifx) you can enable openMP style parallelism with do-concurrent using the "-qopenmp" flag as well as ensuring that LOCALITYSUPPORT is defined in the fpm.toml file. gfortran<15 does not fully support the 2018 Fortran standard and so you need to remove the LOCALITYSUPPORT macro. Parallelisation may still work with gfortran using the flag -ftree-parallelize-loops=N but is less likely to perform well. Alternatively use the 'OMP' macro to activate openMP parallelism instead. The openMP parallelism is limited to genPlaquette measurements.
[preprocess]
[preprocess.cpp]
suffixes = ["F90"]
macros=['SETGITHASH=Yes', 'LOCALITYSUPPORT=1']
| Program | purpose | args |
|---|---|---|
| magnetic | Calculates the magnetic portion of Fmunu | mag.toml |
| ILDG_to_OQCD | Convert a gauge field ILDG-bin in big endian to openqcd | inputFile outputFile NT NS |
| CSSM_to_OQCD | Convert a gauge field cssm to openqcd | inputFile outputFile NT NS |
| OQCD_to_ILDG | Convert a gauge field openqcd to ILDG-bin in big endian | inputFile outputFile NT NS |
| SU2_HKLS_to_CSSM | Convert a |
inputFile outputFile NT NS |
| SU2_HKLS_to_NRQ2CD | Convert a |
inputFile outputFile NT NS |
| OQCD_stoutSmear | Stout smear (spatial) an openqcd gauge field and print average unsmeared and smeared plaquette values | inputFile rho nSweeps NT NS |
| SU3_heatbath | Generate |
|
| SU2_heatbath | Generate |
In the python folder we also supply a f2py and meson based system that will enable use of (some of) the functionality in python. This can be installed from the python folder using
pip install -e . --no-build-isolation
or via a conda environment file like:
name: snakeTesting
channels:
- conda-forge
dependencies:
- conda-forge::python=3.12.9
- conda-forge::fpm # Fortran package manager
- conda-forge::meson-python # For building fortran for use in python
- conda-forge::ninja
- conda-forge::pip
- conda-forge::numpy
- pip:
- ../../libs/FLUE_Lat/python
where the repository has been cloned inside the ../../libs directory (this can also be done with git submodule).
Available routines are:
IO Routines:
write[ILDG/OQCD](filename, U, NS, NT)
read[ILDG/OQCD/CSSM](filename, NS, NT)
plaquette routines:
plaq(U)/splaq(U)/tplaq(U) returns the average of all plaquettes, space-space plaquettes and space-time plaquettes respectively.
'gauge' routines:
stoutSmearLinks(U, rho, nweeps) returns a new copy of the gaugefield which has been stout-linked smeared (spatial links).
The IO routines return a numpy array of type double precision complex, of shape (NT, NS, NS, NS, 4, 3, 3). Note this is not the same as the Fortran, the translation is done in c_wrapper/FLUE_c.f90. This is so that it matches i.e. lyncs_io.
This f2py and meson build approach is inspired by fortran_meson_py by Salvador Brandolin with thanks to the Fortran-Lang Discourse
Some of the functionality has tests in the test folder using the testdata reference data. Run the tests using fpm test
The tests were predominatly generated using Microsoft Copilot (GPT 5.5). Refinements to the heatbath code also used Microsoft Copilot.
