comp_u1_mon_tda

Topological Data Analysis of Monopoles in U(1) Lattice Gauge Theory

https://github.com/xavier-crean/comp_u1_mon_tda

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Topological Data Analysis of Monopoles in U(1) Lattice Gauge Theory

Basic Info
  • Host: GitHub
  • Owner: xavier-crean
  • License: gpl-3.0
  • Language: C
  • Default Branch: main
  • Size: 224 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created about 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

Topological Data Analysis of Monopoles in U(1) Lattice Gauge Theory — Monte Carlo and Analysis Code Release

Contents

Overview

This repository accompanies the paper Topological Data Analysis of Monopoles in U(1) Lattice Gauge Theory. It contains code for

  1. generating U(1) lattice gauge field configurations via Monte Carlo simulation,
  2. computing observables from lattice configurations,
  3. producing plots and results included in the paper.

A directory tree is included at the bottom of this file.

Alongside this repository, there exists an accompanying data release where Step 1 and Step 2 in the pipeline have been pre-computed. Therefore, to reproduce analysis from the paper using the data release, the user is referred to Step 3 (setup instructions are included below).

Using Binder, a Docker container has been constructed for reproduction of results from the paper (without the need to install Python or dependencies) and can be accessed online (see below).

Code to generate lattice configuration data (Step 1)

The code to generate U(1) lattice gauge field configurations, which is largely written in C, forms part of a wider package for simulating lattice gauge field theories. It must be configured, built and run using a Linux distribution. The software is stored in src/data/ and contains its own

Using this code, one may reproduce the ensemble averages quoted in the paper. Note that for bit-for-bit reproducibility one must set a fixed random seed and run using the same distribution each time.

Code to process and analyse configuration data (Step 2 & Step 3)

The code to perform analysis of lattice gauge field configurations is written in Python. See Section 2.2 and Section 3 in the paper. It consists of two steps:

  • Step 2: Raw lattice configuration data is processed by the scripts in directory src/observables/. Collectively, this may take several hours to compute. For reproducibility, our processed data is included in the data release and, once extracted, is stored in directory data/observables/.
  • Step 3: Plots and results from the paper may be reproduced by running the script src/analysis/analysis.py which takes about an hour to run. This will generate cached data, stored in cached_data/, for quicker re-runs.

N.B. Pre-computed cached data has also been provided in the data release; with cached data, src/analysis/analysis.py takes about one minute to run.

In this section of the pipeline, data files are stored in the HDF5 format.


Setup

Requirements

The code has been tested with Python 3.10.

Dependencies are documented in environment.yml and are most easily managed via a Conda environment.

The commands below refer to a Linux or compatible environment and need to be run from the root directory of the repository.

Installation

  • Download the repository
  • Create a new Conda environment with the necessary dependencies using

    conda env create -f environment.yml (Alternatively, create a Python environment with the listed packages.)

Data Release

  • Download the data.tar.gz from the accompanying data release and extract into the root directory of the repository using

    tar -xf data.tar.gz
    
  • To use pre-computed cached data files, for fast reproduction of the results in the paper, download cached_data.tar.gz from the data release and extract into the root directory of the repository using

    tar -xf cached_data.tar.gz
    

Binder

Using mybinder.org, a Docker container with necessary dependencies has been constructed for reproduction of the results in the paper. Note that the data release must be uploaded and extracted into the root directory (see data release setup).

Binder


Processing the raw lattice configuration data (Step 2)

The directory src/observables/ contains two python scripts and a python module:

  • src/observables/action.py for computing the total action of a lattice configuration; it takes four command line arguments: lattice size L, $\beta$ value (to 4d.p.), number of samples and number of sweeps between measurement. E.g.,

    python src/observables/action.py 6 0.9000 200 350000 The output is saved into directory data/observables/action/L.L.L.L/ in .h5 format.

  • src/observables/persistence_diagram.py for computing the zeroth and first order homology of monopole current networks of a lattice configuration; it takes five command line arguments: lattice size L, $\beta$ (to 4d.p.), number of samples, number of sweeps between measurement and number of parallel computations. E.g.,

    python src/observables/persistence_diagram.py 6 0.9000 200 350000 2 The output is saved into directory data/observables/pd/L.L.L.L/ in .h5 format.

  • src/observables/configurations.py a module used to parse lattice configurations from raw configuration data files.


Performing the analysis (Step 3)

The python script src/analysis/analysis.py which

  • makes directories cached_data/, reports/ and reports/figures/ (if they don't exist already),
  • computes the average action observable and the Betti number observables, then saves figures in .pdf format into reports/figures/,
  • and outputs results from a finite-size scaling analysis into reports/
    • in .csv format (with header)
    • and in .tex format (for a LaTeX table).

The script is run using

  python src/analysis/analysis.py

Cached data files

Intermediary files, for caching and running the code quickly second time round, are stored in the directory cached_data/. To use the files in cached_data.tar.gz (from the data release), it is important to ensure the original random seeds are used (as found in src/analysis/analysis.py). With the cached data files, src/analysis/analysis.py takes less than a minute to run; without them, it takes about an hour.

N.B. if cached_data.tar.gz is extracted into the root, then src/analysis/analysis.py will read from this directory. If you are trying to reproduce the analysis using data.tar.gz, you will need to delete or rename the directory cached_data/.


Project organisation

├── LICENSE
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── observables    <- Action and persistence diagrams saved in .h5 format.
|   └── configurations <- Lattice gauge field configuration data stored in conf.dat in IDLG-like format.
│
├── cached_data        <- Intermediary cached data files in .h5 format for faster reproduction of results.
├── reports            <- Generated tables used in the paper as .csv and .tex.
│   └── figures        <- Generated figures used in the paper as .pdf.
│
├── environment.yml    <- The requirements file for reproducing the Conda environment.
│                         
└── src                <- Source code for this project.
    │
    ├── data           <- Source code written in C for generating U(1) lattice gauge field 
    |                     configurations via Monte Carlo Markov Chain simulation.
    │
    ├── observables    <- Python scripts to compute action and Betti numbers from configurations
    |   |                 (via a trivial cubical filtration)
    │   ├── action.py
    │   ├── configuration.py
    │   └── persistence_diagram.py   
    │
    └── analysis       <- Python script to plot observables against beta, perform finite-size 
        |                 scaling analysis and generate tables used in the paper.                    
        └── analysis.py

Owner

  • Name: Xavier Crean
  • Login: xavier-crean
  • Kind: user

Citation (CITATION.cff)

title: >-
  Topological Data Analysis of Monopoles in U(1) Lattice
  Gauge Theory
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Xavier
    family-names: Crean
    email: 2237451@swansea.ac.uk
    orcid: 'https://orcid.org/0009-0007-8620-6243'
    affiliation: Swansea University
  - given-names: Jeffrey
    orcid: 'https://orcid.org/0000-0003-4252-0058'
    family-names: Giansiracusa
    email: jeffrey.giansiracusa@durham.ac.uk
    affiliation: Durham University
  - given-names: Biagio
    family-names: Lucini
    email: b.lucini@swansea.ac.uk
    affiliation: Swansea University
    orcid: 'https://orcid.org/0000-0001-8974-8266'
identifiers:
  - type: doi
    value: 10.5281/zenodo.10806185
    description: >-
      X. Crean, J. Giansiracusa and B. Lucini, Topological
      Data Analysis of Monopoles in U(1) Lattice Gauge
      Theory—Monte Carlo and analysis code release
repository-code: 'https://github.com/xavier-crean/comp_u1_mon_tda.git'
abstract: >-
  This repository accompanies the paper X. Crean, J.
  Giansiracusa and B. Lucini, Topological Data Analysis of
  Monopoles in U(1) Lattice Gauge Theory. It contains code
  for generating U(1) lattice gauge field configurations via
  Monte Carlo simulation and subsequent Topological Data
  Analysis to produce plots and results included in the
  paper.
keywords:
  - Lattice
  - Topological Data Analysis (TDA)
  - Monopole
license: GPL-3.0

GitHub Events

Total
Last Year