TRIQS/triqs_modest 3.3.0
Modular Electronic Structure Toolkit
|
#include <triqs_modest/embedding.hpp>
The embedding class.
The embedding class encodes the mapping between impurities and the correlated space \( \mathcal{C} \) (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) | |
Construct an embedding object. | |
template<typename Mesh > | |
std::vector< std::pair< block_gf< Mesh, matrix_valued >, block_matrix_t > > | make_zero_imp_self_energies (Mesh const &mesh) |
Zero initialize impurity self-energies. | |
Accessors | |
imp_block_t | operator[] (long alpha, long sigma) const |
Bracket accessor: \( \psi[\alpha,\sigma] \). | |
nda::array< imp_block_t, 2 > | get_psi () const |
The mapping table \( \psi \). | |
long | n_alpha () const |
Number of blocks in \( \alpha \) for the \( \Sigma_{\text{embed}} \). | |
long | n_sigma () const |
Number of blocks in \( \sigma \) for the \( \Sigma_{\text{embed}} \). | |
long | n_gamma (long imp_idx) const |
Number of blocks in \( \gamma \) for the \( \Sigma_{\text{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 \( \Sigma_{\text{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 \( \psi \). | |
embedding | replace (long imp_idx_to_remove, long imp_idx_to_replace_with) const |
Replaces one impurity in the embedding table \( \psi \). | |
embedding | flip_spin (long alpha) const |
Flip the spins ( \( \sigma \)) for block \( \alpha \). | |
embedding | flip_spin (std::vector< long > alphas) const |
Flip the spins ( \( \sigma \)) for all \( [\alpha] \). | |
embedding | split (long imp_idx, std::function< bool(long)> p) const |
Split impurity imp_idx . | |
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 (TRIQS/ModEST). | |
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 (TRIQS/ModEST). | |
block2_matrix_t | embed (std::vector< block_matrix_t > const &Sigma_imp_static_vec) const |
Embed block matrices (TRIQS/ModEST). | |
template<typename Mesh > | |
std::vector< block_gf< Mesh, matrix_valued > > | extract (block2_gf< Mesh, matrix_valued > const &g_loc) const |
Extract single-particle quantities (TRIQS/ModEST). | |
std::vector< block_matrix_t > | extract (block2_matrix_t const &matrix_C) const |
Extract matrices (TRIQS/ModEST). | |
CoQui Ops | |
Embedding methods which operate on a given object X where X ∈ (nda::array<dcomplex, 4>, nda::array<dcomplex, 5>, etc.) These methods are used to extract and embed quantities in the CoQui format. | |
std::vector< nda::array< dcomplex, 3 > > | embed_1p (std::vector< std::vector< nda::array< dcomplex, 3 > > > const &Sigma_imp_vec) const |
Embed single-particle quantities (CoQui). | |
nda::array< dcomplex, 5 > | embed_2p (std::vector< nda::array< dcomplex, 5 > > const &pi_imp_vec) const |
Embed two-particle quantities (CoQui). | |
nda::array< dcomplex, 4 > | embed_tensor (std::vector< nda::array< dcomplex, 4 > > const &U_tensor_vec) const |
Embed tensors (CoQui). | |
std::vector< std::vector< nda::array< dcomplex, 3 > > > | extract_1p (nda::array< dcomplex, 4 > const &g_loc) const |
Extract single-particle quantities (CoQui). | |
std::vector< nda::array< dcomplex, 5 > > | extract_2p (nda::array< dcomplex, 5 > const &Pi_loc) const |
Extract two-particle quantities (CoQui). | |
std::vector< nda::array< dcomplex, 4 > > | extract_tensor (nda::array< dcomplex, 4 > const &U_tensor) const |
Extract tensors (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) |
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 | ||
) |
Construct an embedding object.
sigma_embed_decomposition | Decomposition (list of block sizes) for \( \Sigma_{\text{embed}} \): \([ \alpha ] = \) block size. Note that the decompositions are given for \( \alpha \), \( \gamma \) index, and are independent of \( \sigma \). |
imp_decompositions | List of decomposition of solvers: [n_imp][ \( \gamma \)] = block size. |
psi | The mapping \( \psi[\alpha,\sigma]\) -> n_imp, \( \gamma \), \( \tau \). |
sigma_names | Names for the values of the \( \sigma \) index (e.g., "up", "down"). |
Definition at line 18 of file embedding.cpp.
std::string triqs::modest::embedding::description | ( | bool | verbosity = false | ) | const |
Summarize the embedding object.
Definition at line 132 of file embedding.cpp.
embedding triqs::modest::embedding::drop | ( | long | imp_idx | ) | const |
Remove an impurity from the embedding table \( \psi \).
Remove the impurity imp_idx
, map the corresponding \( \alpha \) blocks to -1 (i.e. no longer connected to an impurity) and relabel the other impurities with a number > imp_idx
.
imp_idx | Index of the impurity to remove from the table \( \psi \). |
Definition at line 235 of file embedding.cpp.
|
inline |
Embed single-particle quantities (TRIQS/ModEST).
Embed impurity solver self-energies into an embedded self-energy.
Sigma_imp_vec | A list of impurity self-energies. |
Definition at line 265 of file embedding.hpp.
|
inline |
Embed single-particle quantities (TRIQS/ModEST).
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 292 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 (TRIQS/ModEST).
Definition at line 307 of file embedding.cpp.
std::vector< nda::array< dcomplex, 3 > > triqs::modest::embedding::embed_1p | ( | std::vector< std::vector< nda::array< dcomplex, 3 > > > const & | Sigma_imp_vec | ) | const |
Embed single-particle quantities (CoQui).
Definition at line 407 of file embedding.cpp.
nda::array< dcomplex, 5 > triqs::modest::embedding::embed_2p | ( | std::vector< nda::array< dcomplex, 5 > > const & | pi_imp_vec | ) | const |
Embed two-particle quantities (CoQui).
Definition at line 450 of file embedding.cpp.
nda::array< dcomplex, 4 > triqs::modest::embedding::embed_tensor | ( | std::vector< nda::array< dcomplex, 4 > > const & | U_tensor_vec | ) | const |
Embed tensors (CoQui).
Definition at line 363 of file embedding.cpp.
|
inline |
Extract single-particle quantities (TRIQS/ModEST).
Mesh | The mesh type triqs::mesh::{dlr_imfreq, imfreq}. |
g_loc | Block2Gf of gloc in \( M \times M \) space. |
Definition at line 312 of file embedding.hpp.
std::vector< block_matrix_t > triqs::modest::embedding::extract | ( | block2_matrix_t const & | matrix_C | ) | const |
Extract matrices (TRIQS/ModEST).
Definition at line 322 of file embedding.cpp.
std::vector< std::vector< nda::array< dcomplex, 3 > > > triqs::modest::embedding::extract_1p | ( | nda::array< dcomplex, 4 > const & | g_loc | ) | const |
Extract single-particle quantities (CoQui).
Definition at line 383 of file embedding.cpp.
std::vector< nda::array< dcomplex, 5 > > triqs::modest::embedding::extract_2p | ( | nda::array< dcomplex, 5 > const & | Pi_loc | ) | const |
Extract two-particle quantities (CoQui).
Definition at line 434 of file embedding.cpp.
std::vector< nda::array< dcomplex, 4 > > triqs::modest::embedding::extract_tensor | ( | nda::array< dcomplex, 4 > const & | U_tensor | ) | const |
Extract tensors (CoQui).
Definition at line 346 of file embedding.cpp.
embedding triqs::modest::embedding::flip_spin | ( | long | alpha | ) | const |
Flip the spins ( \( \sigma \)) for block \( \alpha \).
For block \( \alpha \) transforms \( (\sigma,\sigma') \to (\tau, \tau') \) to \( (\sigma, \sigma') \to (\tau', \tau)\).
alpha | The index of the alpha block to flip the spins. |
Definition at line 218 of file embedding.cpp.
embedding triqs::modest::embedding::flip_spin | ( | std::vector< long > | alphas | ) | const |
Flip the spins ( \( \sigma \)) for all \( [\alpha] \).
For block \( \alpha \) transforms \( (\sigma,\sigma') \to (\tau, \tau') \) to \( (\sigma, \sigma') \to (\tau', \tau)\).
alphas | A list of alpha blocks to flip the spins. |
Definition at line 227 of file embedding.cpp.
|
inline |
The mapping table \( \psi \).
Definition at line 111 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 206 of file embedding.cpp.
|
inline |
The impurity decomposition.
Definition at line 129 of file embedding.hpp.
|
inline |
Zero initialize impurity self-energies.
Definition at line 223 of file embedding.hpp.
|
inline |
Number of blocks in \( \alpha \) for the \( \Sigma_{\text{embed}} \).
Definition at line 114 of file embedding.hpp.
|
inline |
Number of blocks in \( \gamma \) for the \( \Sigma_{\text{imp}} \) [imp_idx].
Definition at line 120 of file embedding.hpp.
|
inline |
Number of impurities.
Definition at line 123 of file embedding.hpp.
|
inline |
Number of blocks in \( \sigma \) for the \( \Sigma_{\text{embed}} \).
Definition at line 117 of file embedding.hpp.
|
default |
|
inline |
Bracket accessor: \( \psi[\alpha,\sigma] \).
Definition at line 107 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 \( \psi \).
Replaces the impurity solver corresponding to imp_idx_to_remove
with the impurity solver at imp_idx_to_replace_with
and updates the underlying table \( \psi \).
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_remove . |
Definition at line 249 of file embedding.cpp.
gf_struct2_t triqs::modest::embedding::sigma_embed_block_shape | ( | ) | const |
Gf block structure for \( \Sigma_{\text{embed}} \).
Definition at line 198 of file embedding.cpp.
|
inline |
The names of the sigma indices.
Definition at line 126 of file embedding.hpp.
embedding triqs::modest::embedding::split | ( | long | imp_idx, |
std::function< bool(long)> | p | ||
) | const |
Split impurity imp_idx
.
Predicate p (long block_idx) -> 0 or 1.
Definition at line 263 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 298 of file embedding.cpp.
|
friend |
|
friend |
|
friend |
Definition at line 191 of file embedding.cpp.