Skip to content
/ DGApy Public

DGApy is a python toolbox for the Matsubara Green's function formalism of correlated electrons on a lattice.

License

Notifications You must be signed in to change notification settings

PaulWorm/DGApy

Repository files navigation

made-with-python linting: pylint Maintenance License: MIT Documentation Status DOI

drawing DGApy

Table of content

Description

DGApy is a python package that implements tools for the Matsubara Green's function formalism of correlated electrons on a lattice. Based on the implemented frameworks, the dynamical vertex approximation (DGA) for the Hubbard model, a Feynman diagrammatic extension of dynamical mean field theory (DMFT), can be calculated.

DGApy supports:

  • All primitive lattices
  • General tight-binding models
  • DGA calculations for the Hubbard model
  • Solving the linearized Eliashberg equation to obtain superconducting eigenvalues
  • Calculation of the optical conductivity, including ladder-like vertex corrections
  • Analytic continuation of Matsubara Green's functions and physical susceptibilities to the real axis

A detailed description of the underlying theory and applications to nickelate and cuprate superconductors can be found in my PhD thesis.

Relevant and related literature:

In case you use this code, please cite it. Please also consider citing my thesis and the relevant papers. A bibtex file (dga_bib. md) containing all the references is included in the root directory for your convenience.

Publications using DGApy

DGApy has already been successfully used in several scientific publications:

Installation

Before installation fetch the repository via

git clone git@github.com:PaulWorm/DGApy.git

We recomment to use anaconda for managing your python environments. To create a new conda environment use

conda create --name dga_py python=3.9

Activate the environment:

conda activate dga_py 

Before installation of the code install mpi4py using the conda environment:

conda install -c conda-forge mpi4py mpich

which provides the MPICH MPI implementation and the python package mpi4py. Then go into the dga folder and install the code:

cd ./dga
. install.sh

This provides the python package dga and several command line interfaces. A detailed description of them is provided below and in the tutorial "04RunningTheCode.md".

Usage

Python package

To use the dga python package, import it via

import dga.<submodule name>

The package is split into several modules. Here we list the most common ones:

  • matsubara_frequencies (mf): handle Matsubara frequencies and frequency transformations
  • brillouin_zone (bz): handle the Brillouin zone, mapping into the irreducible BZ and mapping to k-paths
  • wannier: handle the tight-binding Hamiltonian and fourier transformation from real to reciprocal space
  • two_point (twop): classes for the one-particle Green's function and self-energy
  • local_four_point (lfp): handle local (impurity) four-poin functions
  • four_point (fp): handle non-local (ladder) four-point functions
  • analytic_continuation (ac): perform the numeric analytic continuation
  • eliashberg_equation (eq): power iteration eigenvalue solver for the linearized Eliashberg equation
  • optics: calculate the optical conductivity

It is recommended to complete the tutorial, contained in the "tutorial" folder, to get a first impression on how the modules can be used.

Command line interfaces

With this python package also a command line interface (cli) is provided. Contrary to the different modules, which are intended to be used as a toolbox, the cli implements the dynamical vertex approximation for the Hubbard model.

dga_dc

Create the default config file for dga_main in the current folder.

dga_main

To run a dga calculation perform the following steps:

  • Prepare a config file
  • Prepare the DMFT input files
  • Run the dga_main cli

For the DMFT input file structure currently two input formats are supported.

type: "w2dyn"

Either the output of the w2dynamics code.

  • '1p-data.hdf5': converged dmft solution
  • 'g4iw_sym.hdf5': symmetrized output (cli: sym1b) of the measurement of the two-particle Green's function for the same anderson impurity model as obtained from the DMFT cycle; it is advised to use the same chemical potential (mu) as in the '1p-data. hdf5' file and not perform a new mu search.

type: "default"

If you are not using w2dynamics and you do not want to implement a parser to your impurity solver a generic input format is also supported, which uses a single numpy file:

  • fname_1p: 'dmft_input.npy': numpy dictionary with the following entries:
    • 'giw': one-particle Green's function
    • 'siw': self-energy
    • 'n': occupation
    • 'mu_dmft': chemical potential
    • 'beta': inverse temperature
    • 'u': on-site Hubbard interaction
    • 'g4iw_dens': density-channel (upup + updown) two-particle Green's function; (w,v,vp) layout
    • 'g4iw_magn': magnetic-channel (upup - updown) two-particle Green's function; (w,v,vp) layout

dga_test

Run the test suite in the terminal. This will run the unit tests and linting.

Testing:

Unit testing

To run the unit tests, run

dga_test 

This will run unit tests and linting which are also included in the gitlab CI.

End-to-end testing

Several tests use datasets generated with w2dynamics. They input files are contained in the default input structure in the "tests" folder.

Documentation

A standard documentation is still under construction. For now the tutorial in the " tutorial" folder is the best source for learning how to use the code.

About

This package has been developed by Paul Worm. If you have any questions feel free to contact me via e-mail.

I would like to thank Simone Di Cataldo and Juraj Krisnik for testing the Code and providing valuable feedback.

About

DGApy is a python toolbox for the Matsubara Green's function formalism of correlated electrons on a lattice.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published