TRIQS/triqs_modest 3.3.0
Modular Electronic Structure Toolkit
Loading...
Searching...
No Matches
double_counting.hpp
Go to the documentation of this file.
1// Copyright (c) 2025--present, The Simons Foundation
2// This file is part of TRIQS/modest and is licensed under the terms of GPLv3 or later.
3// SPDX-License-Identifier: GPL-3.0-or-later
4// See LICENSE in the root of this distribution for details.
5
6#pragma once
7#include <nda/nda.hpp>
8#include "utils/defs.hpp"
9#include "triqs/gfs.hpp"
10#include "local_space.hpp"
11
12using namespace triqs::gfs;
13
14namespace triqs::modest {
15
28 std::pair<double, double> dc_formulas(std::string const method, double const N_tot, double const N_sigma, long const n_orb, double const U,
29 double const J);
30
39 class dc_solver {
40
41 private:
42 // spin kind
43 spin_kind_e _spin_kind;
44 // number of spins (derived from spin_kind)
45 long n_sigma;
46 // double counting method to use
47 std::string method;
48 // U term used in the double counting formulas
49 double U_int;
50 // J term used in the double counting formulas
51 double J_hund;
52
59 nda::array<nda::matrix<dcomplex>, 2> get_density_matrix_from_gf(block_gf<imfreq, matrix_valued> const &gimp);
60
61 public:
70 dc_solver(spin_kind_e spin_kind, std::string method, double U_int, double J_hund);
71
79 std::vector<nda::matrix<dcomplex>> dc_self_energy(block_gf<imfreq, matrix_valued> const &gimp);
80
88 double dc_energy(block_gf<imfreq, matrix_valued> const &gimp);
89
96 std::vector<nda::matrix<dcomplex>> dc_self_energy(nda::array<nda::matrix<dcomplex>, 2> const &density_matrix);
97
104 double dc_energy(nda::array<nda::matrix<dcomplex>, 2> const &density_matrix);
105 };
106
107} // namespace triqs::modest
Double counting "solver".
double dc_energy(block_gf< imfreq, matrix_valued > const &gimp)
Compute the double counting correction to the energy from a Green's function.
std::vector< nda::matrix< dcomplex > > dc_self_energy(block_gf< imfreq, matrix_valued > const &gimp)
Compute the double-counting self-energy from a Green's function.
std::pair< double, double > dc_formulas(std::string const method, double const N_tot, double const N_sigma, long const n_orb, double const U, double const J)
double counting formulas parameterized by density, U, and J
spin_kind_e
Kind of σ index.