TRIQS/triqs_modest 3.3.0
Brillouin zone summation
|
#include <triqs_modest/embedding.hpp>
The embedding class.
The embeddding class encodes the mapping between impurities and the correlated space 𝓒 (cf. ModEST implementation notes). In particular, it maps the individual "blocks" within an impurity self-energy to a block and spin of the embedded self-energy function, which can then be upfolded (downfolded) to obtain the lattice self-energy and the local Green's function.
Definition at line 29 of file embedding.hpp.
Public Member Functions | |
embedding (std::vector< long > sigma_embed_decomposition, std::vector< std::vector< long > > imp_decompositions, nda::array< imp_block_t, 2 > psi, std::vector< std::string > sigma_names) | |
Default constructor. | |
template<typename Mesh > | |
std::vector< std::pair< block_gf< Mesh, matrix_valued >, block_matrix_t > > | make_zero_imp_self_energies (Mesh const &mesh) |
Accessors | |
imp_block_t | operator[] (long alpha, long sigma) const |
bracket accessor: [α, σ] -> the corresponding impurity block (n_imp, γ, τ) | |
nda::array< imp_block_t, 2 > | get_psi () const |
the mapping table ψ | |
long | n_alpha () const |
Number of blocks in α for the Σ_embed. | |
long | n_sigma () const |
Number of blocks in σ for the Σ_embed. | |
long | n_gamma (long imp_idx) const |
Number of blocks in γ for the Σ_imp[imp_idx]. | |
long | n_impurities () const |
Number of impurities. | |
std::vector< std::string > | sigma_names () const |
The names of the sigma indices. | |
std::vector< long > | imp_decomposition (long imp_idx) const |
The impurity decomposition. | |
C2PY_IGNORE gf_struct2_t | sigma_embed_block_shape () const |
Gf block structure for Σ_embed. | |
std::vector< gf_struct_t > | imp_block_shape () const |
Gf block structure for the impurity solvers. | |
std::string | description (bool verbosity=false) const |
Summarize the embedding object. | |
Unary Ops | |
Embedding methods which operate on itself and return a new Embedding object. | |
bool | operator== (embedding const &other) const =default |
embedding | drop (long imp_idx) const |
Remove an impurity from the embedding table ψ | |
embedding | replace (long imp_idx_to_remove, long imp_idx_to_replace_with) const |
Replaces one impurity in the embedding table ψ. | |
embedding | flip_spin (long alpha) const |
Flip the spins (σ) for block α. | |
embedding | flip_spin (std::vector< long > alphas) const |
Flip the spins (σ) for all [α]. | |
embedding | split (long imp_idx, std::function< bool(long)> p) const |
Predicate p (long block_idx) -> 0 or 1. | |
embedding | split (long imp_idx, std::vector< long > const &block_list) const |
Split impurity imp_idx based on block_list. | |
embedding | split (long imp_idx, std::initializer_list< const char * > x)=delete |
Complex Ops | |
Embedding methods which operate on a given object X where X ∈ (block2gf, block_gf, block_matrix, etc.) | |
template<typename Mesh > | |
block2_gf< Mesh, matrix_valued > | embed (std::vector< block_gf< Mesh, matrix_valued > > const &Sigma_imp_vec) const |
embed single-particle quantities | |
template<typename Mesh > | |
std::pair< block2_gf< Mesh, matrix_valued >, block2_matrix_t > | embed (std::vector< block_gf< Mesh, matrix_valued > > const &Sigma_imp_vec, std::vector< block_matrix_t > const &Sigma_imp_static_vec) const |
embed single-particle quantities | |
block2_matrix_t | embed (std::vector< block_matrix_t > const &Sigma_imp_static_vec) const |
embed block matrices | |
nda::array< nda::array< dcomplex, 3 >, 2 > | embed (std::vector< std::vector< nda::array< dcomplex, 3 > > > const &Sigma_imp_vec) const |
embed single-particle quantities (coqui) | |
std::vector< nda::array< dcomplex, 5 > > | embed (std::vector< nda::array< dcomplex, 5 > > const &pi_imp_vec) const |
embed two-particle quantities (coqui) | |
template<typename Mesh > | |
std::vector< block_gf< Mesh, matrix_valued > > | extract (block2_gf< Mesh, matrix_valued > const &g_loc) const |
embed tensors | |
std::vector< block_matrix_t > | extract (block2_matrix_t const &matrix_C) const |
extract matrices | |
std::vector< std::vector< nda::array< dcomplex, 3 > > > | extract (nda::array< dcomplex, 4 > const &g_loc) const |
extract single-particle quantities (CoQui) | |
std::vector< nda::array< dcomplex, 5 > > | extract (nda::array< dcomplex, 5 > const &Pi_loc) const |
extract two-particle quantities (CoQui) | |
Friends | |
void | h5_read (h5::group g, std::string const &name, embedding &x) |
void | h5_write (h5::group g, std::string const &name, embedding const &x) |
h5 read/write | |
std::ostream & | operator<< (std::ostream &out, embedding const &E) |
stream | |
triqs::modest::embedding::embedding | ( | std::vector< long > | sigma_embed_decomposition, |
std::vector< std::vector< long > > | imp_decompositions, | ||
nda::array< imp_block_t, 2 > | psi, | ||
std::vector< std::string > | sigma_names | ||
) |
Default constructor.
Constructor
sigma_embed_decomposition | Decomposition (list of block sizes) for Σ_embed: [α] = block size |
imp_decompositions | List of decomposition of solvers: [n_imp][γ] = block size |
psi | The mapping ψ[α,σ] -> n_imp, γ, τ |
sigma_names | Names for the values of the σ index (e.g., "up", "down") |
Definition at line 16 of file embedding.cpp.
std::string triqs::modest::embedding::description | ( | bool | verbosity = false | ) | const |
Summarize the embedding object.
Definition at line 98 of file embedding.cpp.
embedding triqs::modest::embedding::drop | ( | long | imp_idx | ) | const |
Remove an impurity from the embedding table ψ
Remove the impurity imp_idx, maps the corresponding α blocks to -1 (i.e. no longer connected to an impurity) and relabel the other impurities with number > imp_idx.
imp_idx | Index of the impurity to remove from the table ψ |
Definition at line 200 of file embedding.cpp.
block2_gf< Mesh, matrix_valued > triqs::modest::embedding::embed | ( | std::vector< block_gf< Mesh, matrix_valued > > const & | Sigma_imp_vec | ) | const |
embed single-particle quantities
Embed impurity solver self-energies into an embedded self-energy.
\Sigma_{embed}^{ασ} = \Sigma_{imp}^{ψ(α,σ)} ψ(α,σ) -> (n_imp, γ, τ)
Sigma_imp_vec | a list of impurity self-energies |
Definition at line 315 of file embedding.hpp.
std::pair< block2_gf< Mesh, matrix_valued >, block2_matrix_t > triqs::modest::embedding::embed | ( | std::vector< block_gf< Mesh, matrix_valued > > const & | Sigma_imp_vec, |
std::vector< block_matrix_t > const & | Sigma_imp_static_vec | ||
) | const |
embed single-particle quantities
Embed the impurity self-energy decomposed as a list of dynamic and a list of static parts.
Mesh | The type of mesh |
Sigma_imp_vec | A list of dynamic impurity self-energies |
Sigma_imp_static_vec | A list of static impurity self-energies |
Definition at line 340 of file embedding.hpp.
block2_matrix_t triqs::modest::embedding::embed | ( | std::vector< block_matrix_t > const & | Sigma_imp_static_vec | ) | const |
embed block matrices
Definition at line 272 of file embedding.cpp.
std::vector< nda::array< dcomplex, 5 > > triqs::modest::embedding::embed | ( | std::vector< nda::array< dcomplex, 5 > > const & | pi_imp_vec | ) | const |
embed two-particle quantities (coqui)
Definition at line 362 of file embedding.cpp.
nda::array< nda::array< dcomplex, 3 >, 2 > triqs::modest::embedding::embed | ( | std::vector< std::vector< nda::array< dcomplex, 3 > > > const & | Sigma_imp_vec | ) | const |
embed single-particle quantities (coqui)
Definition at line 335 of file embedding.cpp.
std::vector< block_gf< Mesh, matrix_valued > > triqs::modest::embedding::extract | ( | block2_gf< Mesh, matrix_valued > const & | g | ) | const |
embed tensors
Extract the impurity Green's function.
extract single-particle quantities (ModEST)
Mesh | The mesh type triqs::mesh::{dlr_imfreq, imfreq} |
g | Block2Gf of gloc in MxM space |
Definition at line 357 of file embedding.hpp.
std::vector< block_matrix_t > triqs::modest::embedding::extract | ( | block2_matrix_t const & | matrix_C | ) | const |
extract matrices
Definition at line 286 of file embedding.cpp.
std::vector< std::vector< nda::array< dcomplex, 3 > > > triqs::modest::embedding::extract | ( | nda::array< dcomplex, 4 > const & | g_loc | ) | const |
extract single-particle quantities (CoQui)
Definition at line 311 of file embedding.cpp.
std::vector< nda::array< dcomplex, 5 > > triqs::modest::embedding::extract | ( | nda::array< dcomplex, 5 > const & | Pi_loc | ) | const |
extract two-particle quantities (CoQui)
Definition at line 346 of file embedding.cpp.
embedding triqs::modest::embedding::flip_spin | ( | long | alpha | ) | const |
Flip the spins (σ) for block α.
For block α transforms (σ,σ') -> (τ, τ') to (σ, σ') -> (τ', τ).
alpha | the index of the alpha block to flip the spins. |
Definition at line 184 of file embedding.cpp.
embedding triqs::modest::embedding::flip_spin | ( | std::vector< long > | alphas | ) | const |
Flip the spins (σ) for all [α].
For block α transforms (σ,σ') -> (τ, τ') to (σ, σ') -> (τ', τ).
alphas | a list of alpha blocks to flip the spins. |
Definition at line 192 of file embedding.cpp.
|
inline |
the mapping table ψ
Definition at line 103 of file embedding.hpp.
std::vector< gf_struct_t > triqs::modest::embedding::imp_block_shape | ( | ) | const |
Gf block structure for the impurity solvers.
Definition at line 172 of file embedding.cpp.
|
inline |
The impurity decomposition.
Definition at line 121 of file embedding.hpp.
|
inline |
Definition at line 206 of file embedding.hpp.
|
inline |
Number of blocks in α for the Σ_embed.
Definition at line 106 of file embedding.hpp.
|
inline |
Number of blocks in γ for the Σ_imp[imp_idx].
Definition at line 112 of file embedding.hpp.
|
inline |
Number of impurities.
Definition at line 115 of file embedding.hpp.
|
inline |
Number of blocks in σ for the Σ_embed.
Definition at line 109 of file embedding.hpp.
|
default |
|
inline |
bracket accessor: [α, σ] -> the corresponding impurity block (n_imp, γ, τ)
Definition at line 99 of file embedding.hpp.
embedding triqs::modest::embedding::replace | ( | long | imp_idx_to_remove, |
long | imp_idx_to_replace_with | ||
) | const |
Replaces one impurity in the embedding table ψ.
Replaces the impurity solver corresponding to imp_idx_to with the impurity solver at imp_idx_from and updates the underlying table ψ.
imp_idx_to_remove | the index of the impurity solver to be replaced. |
imp_idx_to_replace_with | the index of the impurity solver that will replace imp_idx_to. |
Definition at line 214 of file embedding.cpp.
gf_struct2_t triqs::modest::embedding::sigma_embed_block_shape | ( | ) | const |
Gf block structure for Σ_embed.
Definition at line 164 of file embedding.cpp.
|
inline |
The names of the sigma indices.
Definition at line 118 of file embedding.hpp.
embedding triqs::modest::embedding::split | ( | long | imp_idx, |
std::function< bool(long)> | p | ||
) | const |
Predicate p (long block_idx) -> 0 or 1.
Definition at line 228 of file embedding.cpp.
|
delete |
embedding triqs::modest::embedding::split | ( | long | imp_idx, |
std::vector< long > const & | block_list | ||
) | const |
Split impurity imp_idx based on block_list.
For impurity imp_idx, split part of its blocks into a new impurity. The blocks that were split off remain mapped to their original alpha blocks with the updated imp_idx.
imp_idx | Impurity number |
block_list | A list of blocks of imp_idx to split off. |
Definition at line 263 of file embedding.cpp.
|
friend |
|
friend |
|
friend |
stream
Definition at line 157 of file embedding.cpp.