TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
Lattice tools (experimental)

Detailed Description

Fourier polynomials, tight-binding Hamiltonians, superlattices, Wannier90 loaders and Brillouin-zone integration.

These tools represent lattice functions \( f(\mathbf{k}) = \sum_\mathbf{R} f(\mathbf{R}) e^{2 \pi i \mathbf{k} \cdot \mathbf{R}} \) as Fourier polynomials and build tight-binding Hamiltonians on top of them. They provide band-structure calculations, folding onto a superlattice, loading of Wannier90 *_tb.dat / *_hr.dat files, and the computation of the non-interacting local Green's function via Brillouin-zone integration.

Namespaces

namespace  triqs::experimental::lattice::placeholders
 CLEF placeholders for the momentum and frequency arguments of integrable expressions.

Classes

struct  triqs::experimental::lattice::adaptive_options
 Options controlling the adaptive Brillouin-zone integration. More...
struct  triqs::experimental::lattice::bz_int_options
 Options controlling the combined PTR and adaptive Brillouin-zone integration. More...
class  triqs::experimental::lattice::fourier_polynomial< coeff_dim, kdim >
 Owning container for a Fourier-series representation of a lattice function. More...
class  triqs::experimental::lattice::superlattice
 Representation of a superlattice built on top of an underlying Bravais lattice. More...
class  triqs::experimental::lattice::tb_hk
 Tight-binding Hamiltonian \( H(\mathbf{k}) \) on a 3D lattice. More...

Typedefs

using triqs::experimental::lattice::hopping_list_t = std::vector<nda::array<dcomplex, 2>>
 A list of hopping (overlap) matrices \( t(\mathbf{R}) \), one per lattice vector.
using triqs::experimental::lattice::position_op_list_t = std::vector<nda::array<dcomplex, 3>>
 A list of position-operator matrices in the real-space Wannier basis, one per lattice vector.
using triqs::experimental::lattice::r_vector_list_t = std::vector<std::array<long, 3>>
 A list of real-space lattice vectors \( \mathbf{R} \), in crystal (lattice) coordinates.
using triqs::experimental::lattice::w90_hr_data_t = std::tuple<r_vector_list_t, hopping_list_t>
 Data read from a Wannier90 *_hr.dat file: lattice vectors and hopping matrices.
using triqs::experimental::lattice::w90_tb_data_t = std::tuple<r_vector_list_t, hopping_list_t, position_op_list_t, nda::matrix<double>>
 Data read from a Wannier90 *_tb.dat file: lattice vectors, hopping matrices, position operators and UC vectors.

Functions

template<typename Mesh>
double triqs::experimental::lattice::find_chemical_potential (double const target_density, tb_hk const &H_k, gfs::block_gf< Mesh, gfs::matrix_valued > const &Sigma, bz_int_options const &opt, std::string method="dichotomy", double precision=1.e-5, bool verbosity=false)
 Find the chemical potential that yields a target density for a block self-energy.
template<typename Mesh>
double triqs::experimental::lattice::find_chemical_potential (double const target_density, tb_hk const &H_k, gfs::gf< Mesh, gfs::matrix_valued > const &Sigma, bz_int_options const &opt, std::string method="dichotomy", double precision=1.e-5, bool verbosity=false)
 Find the chemical potential that yields a target density for a single-block self-energy.
template<int kdim>
fourier_polynomial< 2, kdim > triqs::experimental::lattice::fold (superlattice const &sl, fourier_polynomial< 2, kdim > const &fp)
 Fold a Fourier polynomial defined on a lattice onto a superlattice.
tb_hk triqs::experimental::lattice::fold (superlattice const &sl, tb_hk const &tb)
 Fold a tight-binding Hamiltonian onto a superlattice.
template<int coeff_dim, typename CoeffArr>
nda::array< dcomplex, coeff_dim+1 > triqs::experimental::lattice::fourier_eval (nda::matrix_const_view< double > R_mat, CoeffArr const &coeff_arr, nda::array_const_view< double, 2 > k_list)
 Evaluate a Fourier series at a batch of k-points given as a matrix.
template<int coeff_dim, int kdim, typename CoeffArr>
auto triqs::experimental::lattice::fourier_eval (nda::matrix_const_view< double > R_mat, CoeffArr const &coeff_arr, std::array< double, kdim > const &k)
 Evaluate a Fourier series at a single k-point.
template<int coeff_dim, int kdim, typename CoeffArr, typename V>
requires (std::ranges::contiguous_range<V>)
nda::array< dcomplex, coeff_dim+1 > triqs::experimental::lattice::fourier_eval (nda::matrix_const_view< double > R_mat, CoeffArr const &coeff_arr, V const &k_iterator)
 Evaluate a Fourier series at a contiguous range of k-points.
template<typename Mesh>
gfs::gf< Mesh, gfs::matrix_valuedtriqs::experimental::lattice::gloc (Mesh const &w_mesh, tb_hk const &H_k, double mu, bz_int_options const &opt)
 Compute the non-interacting local Green's function from a tight-binding Hamiltonian on a given mesh.
template<typename Mesh>
gfs::block_gf< Mesh, gfs::matrix_valuedtriqs::experimental::lattice::gloc (tb_hk const &H_k, double mu, gfs::block_gf< Mesh, gfs::matrix_valued > const &Sigma, bz_int_options const &opt)
 Compute the interacting local Green's function as a block Green's function.
template<typename Mesh>
gfs::gf< Mesh, gfs::matrix_valuedtriqs::experimental::lattice::gloc (tb_hk const &H_k, double mu, gfs::gf< Mesh, gfs::matrix_valued > const &Sigma, bz_int_options const &opt)
 Compute the interacting local Green's function from a tight-binding Hamiltonian and a self-energy.
auto triqs::experimental::lattice::integrate_adaptive (auto const &f_kw, adaptive_options const &opt)
 Build a callable that adaptively integrates an expression over the Brillouin zone for a given frequency.
template<typename Mesh>
auto triqs::experimental::lattice::integrate_adaptive (auto const &f_kw, Mesh const &w_mesh, adaptive_options const &opt)
 Adaptively integrate an expression over the Brillouin zone for all points of a frequency mesh.
template<typename Mesh>
gf< Mesh, matrix_valuedtriqs::experimental::lattice::integrate_bz (auto const &f_kw, Mesh const &w_mesh, bz_int_options const &opt, mpi::communicator comm={})
 Integrate an expression over the Brillouin zone for all frequencies, combining PTR and adaptive integration.
template<typename Mesh>
auto triqs::experimental::lattice::integrate_ptr (auto const &f_kw, Mesh const &w_mesh, std::array< long, 3 > const &k_grid, mpi::communicator comm={})
 Integrate an expression over the Brillouin zone on a fixed k-grid (PTR) for all points of a frequency mesh, using both MPI and OpenMP parallelism.
template<typename T>
requires (std::convertible_to<T, dcomplex> or std::convertible_to<T, double>)
nda::array< dcomplex, 3 > triqs::experimental::lattice::integrate_ptr (auto const &f_kw, std::vector< T > const &omega_values, std::array< long, 3 > const &k_grid, mpi::communicator comm)
 Integrate an expression over the Brillouin zone on a fixed k-grid (PTR) for a list of frequencies, using both MPI and OpenMP parallelism.
template<int kdim>
nda::matrix< double > triqs::experimental::lattice::make_R_mat (auto const &r_list)
 Build the packed matrix of lattice vectors from a sequence of R-vectors.
tb_hk triqs::experimental::lattice::make_tb_hk_from_w90_hr_file (std::string const &w90_path_and_seedname)
 Build a tight-binding Hamiltonian from a Wannier90 *_hr.dat file.
tb_hk triqs::experimental::lattice::make_tb_hk_from_w90_tb_file (std::string const &w90_path_and_seedname)
 Build a tight-binding Hamiltonian from a Wannier90 *_tb.dat file.
w90_hr_data_t triqs::experimental::lattice::read_wannier90_hr_data (std::string const &w90_path_and_seedname)
 Read a Wannier90 *_hr.dat file and return the lattice vectors and hopping matrices.
w90_tb_data_t triqs::experimental::lattice::read_wannier90_tb_data (std::string const &w90_path_and_seedname)
 Read a Wannier90 *_tb.dat file and return the lattice vectors, hopping matrices, position operators and unit-cell vectors.

Function Documentation

◆ find_chemical_potential() [1/2]

template<typename Mesh>
double triqs::experimental::lattice::find_chemical_potential ( double const target_density,
tb_hk const & H_k,
gfs::block_gf< Mesh, gfs::matrix_valued > const & Sigma,
bz_int_options const & opt,
std::string method = "dichotomy",
double precision = 1.e-5,
bool verbosity = false )

#include <triqs/experimental/lattice/gloc.hpp>

Find the chemical potential that yields a target density for a block self-energy.

This function adjusts the chemical potential \( \mu \) with a root finder until the total density of the local block Green's function (summed over all blocks) matches the target density.

Template Parameters
MeshFrequency mesh type.
Parameters
target_densityTarget total on-site density used to determine \( \mu \).
H_kTight-binding Hamiltonian \( H(\mathbf{k}) \).
SigmaBlock self-energy \( \Sigma(\omega) \).
optOptions controlling the Brillouin-zone integration.
methodRoot-finding method used to determine \( \mu \), either "dichotomy" or "bisection".
precisionAbsolute precision at which \( \mu \) is determined.
verbosityWhether to print the convergence progress.
Returns
Chemical potential \( \mu \) reproducing the target density.

Definition at line 115 of file gloc.hpp.

◆ find_chemical_potential() [2/2]

template<typename Mesh>
double triqs::experimental::lattice::find_chemical_potential ( double const target_density,
tb_hk const & H_k,
gfs::gf< Mesh, gfs::matrix_valued > const & Sigma,
bz_int_options const & opt,
std::string method = "dichotomy",
double precision = 1.e-5,
bool verbosity = false )

#include <triqs/experimental/lattice/gloc.hpp>

Find the chemical potential that yields a target density for a single-block self-energy.

This function adjusts the chemical potential \( \mu \) with a root finder until the density of the local Green's function matches the target density.

Template Parameters
MeshFrequency mesh type.
Parameters
target_densityTarget on-site density used to determine \( \mu \).
H_kTight-binding Hamiltonian \( H(\mathbf{k}) \).
SigmaSelf-energy \( \Sigma(\omega) \).
optOptions controlling the Brillouin-zone integration.
methodRoot-finding method used to determine \( \mu \), either "dichotomy" or "bisection".
precisionAbsolute precision at which \( \mu \) is determined.
verbosityWhether to print the convergence progress.
Returns
Chemical potential \( \mu \) reproducing the target density.

Definition at line 147 of file gloc.hpp.

◆ fold() [1/2]

template<int kdim>
fourier_polynomial< 2, kdim > triqs::experimental::lattice::fold ( superlattice const & sl,
fourier_polynomial< 2, kdim > const & fp )

#include <triqs/experimental/lattice/superlattice.cpp>

Fold a Fourier polynomial defined on a lattice onto a superlattice.

Template Parameters
kdimDimension of the k-vectors, either 2 or 3.
Parameters
slSuperlattice onto which the Fourier polynomial is folded.
fpFourier polynomial defined on the underlying lattice.
Returns
Fourier polynomial folded onto the superlattice.

Definition at line 58 of file superlattice.cpp.

◆ fold() [2/2]

tb_hk triqs::experimental::lattice::fold ( superlattice const & sl,
tb_hk const & tb )
inline

#include <triqs/experimental/lattice/tb_hk.hpp>

Fold a tight-binding Hamiltonian onto a superlattice.

Parameters
slSuperlattice onto which the Hamiltonian is folded.
tbTight-binding Hamiltonian defined on the underlying lattice.
Returns
Tight-binding Hamiltonian folded onto the superlattice.

Definition at line 230 of file tb_hk.hpp.

◆ fourier_eval() [1/3]

template<int coeff_dim, typename CoeffArr>
nda::array< dcomplex, coeff_dim+1 > triqs::experimental::lattice::fourier_eval ( nda::matrix_const_view< double > R_mat,
CoeffArr const & coeff_arr,
nda::array_const_view< double, 2 > k_list )

#include <triqs/experimental/lattice/fourier_polynomial.hpp>

Evaluate a Fourier series at a batch of k-points given as a matrix.

This kernel evaluates the Fourier series at all k-points at once using BLAS matrix multiplications for the phases and the coefficient contraction.

Template Parameters
coeff_dimRank of the Fourier coefficient at each R-vector.
CoeffArrType of the packed coefficient array.
Parameters
R_matPacked matrix of lattice vectors of shape [nR, kdim].
coeff_arrPacked coefficient array of shape [nR, coeff_shape...].
k_listMatrix of k-points of shape [nk, kdim].
Returns
Array of shape [nk, coeff_shape...] holding the value of the Fourier series at each k-point.

Definition at line 117 of file fourier_polynomial.hpp.

◆ fourier_eval() [2/3]

template<int coeff_dim, int kdim, typename CoeffArr>
auto triqs::experimental::lattice::fourier_eval ( nda::matrix_const_view< double > R_mat,
CoeffArr const & coeff_arr,
std::array< double, kdim > const & k )

#include <triqs/experimental/lattice/fourier_polynomial.hpp>

Evaluate a Fourier series at a single k-point.

This kernel computes \( f(\mathbf{k}) = \sum_\mathbf{R} f(\mathbf{R}) \, e^{2 \pi i \, \mathbf{k} \cdot \mathbf{R}} \) directly by summing the exponentials.

Template Parameters
coeff_dimRank of the Fourier coefficient at each R-vector.
kdimDimension of the k-vector.
CoeffArrType of the packed coefficient array.
Parameters
R_matPacked matrix of lattice vectors of shape [nR, kdim].
coeff_arrPacked coefficient array of shape [nR, coeff_shape...].
kThe k-point at which to evaluate.
Returns
Value of the Fourier series at k, a dcomplex for scalar targets or an nda array/matrix otherwise.

Definition at line 79 of file fourier_polynomial.hpp.

◆ fourier_eval() [3/3]

template<int coeff_dim, int kdim, typename CoeffArr, typename V>
requires (std::ranges::contiguous_range<V>)
nda::array< dcomplex, coeff_dim+1 > triqs::experimental::lattice::fourier_eval ( nda::matrix_const_view< double > R_mat,
CoeffArr const & coeff_arr,
V const & k_iterator )

#include <triqs/experimental/lattice/fourier_polynomial.hpp>

Evaluate a Fourier series at a contiguous range of k-points.

This kernel packs the k-points of the range into a matrix and forwards to the batched matrix overload.

Template Parameters
coeff_dimRank of the Fourier coefficient at each R-vector.
kdimDimension of the k-vectors.
CoeffArrType of the packed coefficient array.
VContiguous range type whose elements support operator[](int).
Parameters
R_matPacked matrix of lattice vectors of shape [nR, kdim].
coeff_arrPacked coefficient array of shape [nR, coeff_shape...].
k_iteratorContiguous range of k-points.
Returns
Array of shape [nk, coeff_shape...] holding the value of the Fourier series at each k-point.

Definition at line 160 of file fourier_polynomial.hpp.

◆ gloc() [1/3]

template<typename Mesh>
gfs::gf< Mesh, gfs::matrix_valued > triqs::experimental::lattice::gloc ( Mesh const & w_mesh,
tb_hk const & H_k,
double mu,
bz_int_options const & opt )

#include <triqs/experimental/lattice/gloc.hpp>

Compute the non-interacting local Green's function from a tight-binding Hamiltonian on a given mesh.

The local Green's function is obtained by integrating \( [(\omega + \mu) I - H(\mathbf{k})]^{-1} \) over the Brillouin zone for each frequency of the mesh.

Template Parameters
MeshFrequency mesh type.
Parameters
w_meshFrequency mesh on which the Brillouin-zone integration is performed for each frequency.
H_kTight-binding Hamiltonian \( H(\mathbf{k}) \).
muChemical potential \( \mu \).
optOptions controlling the Brillouin-zone integration.
Returns
Local Green's function on the given frequency mesh.

Definition at line 37 of file gloc.hpp.

◆ gloc() [2/3]

template<typename Mesh>
gfs::block_gf< Mesh, gfs::matrix_valued > triqs::experimental::lattice::gloc ( tb_hk const & H_k,
double mu,
gfs::block_gf< Mesh, gfs::matrix_valued > const & Sigma,
bz_int_options const & opt )

#include <triqs/experimental/lattice/gloc.hpp>

Compute the interacting local Green's function as a block Green's function.

This overload applies the single-block calculation to each block of the given block self-energy and collects the results into a block Green's function with the same block structure.

Template Parameters
MeshFrequency mesh type.
Parameters
H_kTight-binding Hamiltonian \( H(\mathbf{k}) \).
muChemical potential \( \mu \).
SigmaBlock self-energy \( \Sigma(\omega) \) defining the block structure and frequency mesh.
optOptions controlling the Brillouin-zone integration.
Returns
Local block Green's function on the frequency mesh of the given self-energy.

Definition at line 90 of file gloc.hpp.

◆ gloc() [3/3]

template<typename Mesh>
gfs::gf< Mesh, gfs::matrix_valued > triqs::experimental::lattice::gloc ( tb_hk const & H_k,
double mu,
gfs::gf< Mesh, gfs::matrix_valued > const & Sigma,
bz_int_options const & opt )

#include <triqs/experimental/lattice/gloc.hpp>

Compute the interacting local Green's function from a tight-binding Hamiltonian and a self-energy.

The local Green's function is obtained by integrating \( [(\omega + \mu) I - H(\mathbf{k}) - \Sigma(\omega)]^{-1} \) over the Brillouin zone for each frequency of the self-energy mesh. The number of orbitals of the self-energy must match that of the Hamiltonian.

Template Parameters
MeshFrequency mesh type.
Parameters
H_kTight-binding Hamiltonian \( H(\mathbf{k}) \).
muChemical potential \( \mu \).
SigmaSelf-energy \( \Sigma(\omega) \) defining the frequency mesh.
optOptions controlling the Brillouin-zone integration.
Returns
Local Green's function on the frequency mesh of the given self-energy.

Definition at line 61 of file gloc.hpp.

◆ integrate_adaptive() [1/2]

auto triqs::experimental::lattice::integrate_adaptive ( auto const & f_kw,
adaptive_options const & opt )

#include <triqs/experimental/lattice/bz_integrators.hpp>

Build a callable that adaptively integrates an expression over the Brillouin zone for a given frequency.

This overload returns a lambda that, given a frequency \( \omega \), performs the adaptive three-dimensional Brillouin-zone integration of the expression. The k-integration itself is not parallelized, but the returned callable can be evaluated in parallel over different frequencies.

Parameters
f_kwCLEF expression to integrate, using the placeholders for \( k_x, k_y, k_z \) and \( \omega \).
optAdaptive integration options (currently only the absolute tolerance).
Returns
Callable that maps a frequency \( \omega \) to the value of the Brillouin-zone integral.

Definition at line 196 of file bz_integrators.hpp.

◆ integrate_adaptive() [2/2]

template<typename Mesh>
auto triqs::experimental::lattice::integrate_adaptive ( auto const & f_kw,
Mesh const & w_mesh,
adaptive_options const & opt )

#include <triqs/experimental/lattice/bz_integrators.hpp>

Adaptively integrate an expression over the Brillouin zone for all points of a frequency mesh.

This overload evaluates the adaptive Brillouin-zone integral at every point of the given frequency mesh, in parallel over frequencies, and stores the result in a Green's function defined on that mesh.

Template Parameters
MeshFrequency mesh type.
Parameters
f_kwCLEF expression to integrate, using the placeholders for \( k_x, k_y, k_z \) and \( \omega \).
w_meshFrequency mesh on which the integral is evaluated and which defines the returned Green's function.
optAdaptive integration options (currently only the absolute tolerance).
Returns
Green's function on w_mesh holding the adaptively integrated expression.

Definition at line 226 of file bz_integrators.hpp.

◆ integrate_bz()

template<typename Mesh>
gf< Mesh, matrix_valued > triqs::experimental::lattice::integrate_bz ( auto const & f_kw,
Mesh const & w_mesh,
bz_int_options const & opt,
mpi::communicator comm = {} )

#include <triqs/experimental/lattice/bz_integrators.hpp>

Integrate an expression over the Brillouin zone for all frequencies, combining PTR and adaptive integration.

This is the main entry point of the module. It first integrates the frequencies with fixed k-grid (PTR) integration of increasing grid density and then falls back to adaptive integration for the frequency points that did not converge before the maximum grid size was reached. It dispatches to triqs::experimental::lattice::integrate_ptr and triqs::experimental::lattice::integrate_adaptive according to the given options.

Template Parameters
MeshFrequency mesh type (e.g. imfreq, DLR or refreq).
Parameters
f_kwCLEF expression to integrate, using the placeholders for \( k_x, k_y, k_z \) and \( \omega \) from the triqs::experimental::lattice::placeholders namespace.
w_meshFrequency mesh on which the integral is evaluated.
optOptions controlling both the PTR and the adaptive integration.
commMPI communicator (defaults to the world communicator).
Returns
Matrix-valued Green's function on w_mesh holding the integrated expression.

Definition at line 256 of file bz_integrators.hpp.

◆ integrate_ptr() [1/2]

template<typename Mesh>
auto triqs::experimental::lattice::integrate_ptr ( auto const & f_kw,
Mesh const & w_mesh,
std::array< long, 3 > const & k_grid,
mpi::communicator comm = {} )

#include <triqs/experimental/lattice/bz_integrators.hpp>

Integrate an expression over the Brillouin zone on a fixed k-grid (PTR) for all points of a frequency mesh, using both MPI and OpenMP parallelism.

This overload evaluates the integral at every point of the given frequency mesh and stores the result in a Green's function defined on that mesh.

Template Parameters
MeshFrequency mesh type.
Parameters
f_kwCLEF expression to integrate, using the placeholders for \( k_x, k_y, k_z \) and \( \omega \).
w_meshFrequency mesh on which the integration is performed.
k_gridNumber of grid points along each direction; e.g. {2, 2, 2} samples a total of 8 k-points.
commMPI communicator over which the k-grid is distributed.
Returns
Green's function on w_mesh holding the integral, fully integrated over \( k_x, k_y, k_z \).

Definition at line 173 of file bz_integrators.hpp.

◆ integrate_ptr() [2/2]

template<typename T>
requires (std::convertible_to<T, dcomplex> or std::convertible_to<T, double>)
nda::array< dcomplex, 3 > triqs::experimental::lattice::integrate_ptr ( auto const & f_kw,
std::vector< T > const & omega_values,
std::array< long, 3 > const & k_grid,
mpi::communicator comm )

#include <triqs/experimental/lattice/bz_integrators.hpp>

Integrate an expression over the Brillouin zone on a fixed k-grid (PTR) for a list of frequencies, using both MPI and OpenMP parallelism.

The expression is evaluated on a regular grid of \( k_x \times k_y \times k_z \) points and averaged. The work is distributed over MPI ranks along the longest grid direction and over OpenMP threads.

Template Parameters
TType of the frequency values, convertible to double or dcomplex (e.g. a number or a mesh point).
Parameters
f_kwCLEF expression to integrate, using the placeholders for \( k_x, k_y, k_z \) and \( \omega \).
omega_valuesList of frequency values at which the integral is evaluated.
k_gridNumber of grid points along each direction; e.g. {2, 2, 2} samples a total of 8 k-points.
commMPI communicator over which the k-grid is distributed.
Returns
Array of shape [n_omega, dim, dim] holding the integral, fully integrated over \( k_x, k_y, k_z \) for each frequency.

Definition at line 114 of file bz_integrators.hpp.

◆ make_R_mat()

template<int kdim>
nda::matrix< double > triqs::experimental::lattice::make_R_mat ( auto const & r_list)

#include <triqs/experimental/lattice/fourier_polynomial.hpp>

Build the packed matrix of lattice vectors from a sequence of R-vectors.

Template Parameters
kdimDimension of the lattice vectors.
Parameters
r_listSequence of R-vectors, each supporting operator[](int).
Returns
Matrix of shape [nR, kdim] whose row \( i \) holds the components of the \( i \)-th R-vector as doubles.

Definition at line 57 of file fourier_polynomial.hpp.

◆ make_tb_hk_from_w90_hr_file()

tb_hk triqs::experimental::lattice::make_tb_hk_from_w90_hr_file ( std::string const & w90_path_and_seedname)
inline

#include <triqs/experimental/lattice/wannier_loader.hpp>

Build a tight-binding Hamiltonian from a Wannier90 *_hr.dat file.

This is a convenience wrapper that reads the file and keeps the lattice vectors and hopping matrices.

Parameters
w90_path_and_seednamePath to the Wannier90 files including the seedname, such that the file to read is <w90_path_and_seedname>_hr.dat.
Returns
Tight-binding Hamiltonian with hoppings in units of eV.

Definition at line 91 of file wannier_loader.hpp.

◆ make_tb_hk_from_w90_tb_file()

tb_hk triqs::experimental::lattice::make_tb_hk_from_w90_tb_file ( std::string const & w90_path_and_seedname)
inline

#include <triqs/experimental/lattice/wannier_loader.hpp>

Build a tight-binding Hamiltonian from a Wannier90 *_tb.dat file.

This is a convenience wrapper that reads the file and keeps only the lattice vectors and hopping matrices, discarding the position operators and unit-cell vectors.

Parameters
w90_path_and_seednamePath to the Wannier90 files including the seedname, such that the file to read is <w90_path_and_seedname>_tb.dat.
Returns
Tight-binding Hamiltonian with hoppings in units of eV.

Definition at line 64 of file wannier_loader.hpp.

◆ read_wannier90_hr_data()

w90_hr_data_t triqs::experimental::lattice::read_wannier90_hr_data ( std::string const & w90_path_and_seedname)

#include <triqs/experimental/lattice/wannier_loader.cpp>

Read a Wannier90 *_hr.dat file and return the lattice vectors and hopping matrices.

The file is located by appending _hr.dat to the given path and seedname. The lattice vectors \( \mathbf{R} \) are returned in crystal (lattice) coordinates and the hoppings in eV.

Parameters
w90_path_and_seednamePath to the Wannier90 files including the seedname, such that the file to read is <w90_path_and_seedname>_hr.dat.
Returns
Tuple containing the lattice vectors \( \mathbf{R} \) (shape [nR, 3]) and the hopping matrices (shape [nR, nOrb, nOrb]).

Definition at line 105 of file wannier_loader.cpp.

◆ read_wannier90_tb_data()

w90_tb_data_t triqs::experimental::lattice::read_wannier90_tb_data ( std::string const & w90_path_and_seedname)

#include <triqs/experimental/lattice/wannier_loader.cpp>

Read a Wannier90 *_tb.dat file and return the lattice vectors, hopping matrices, position operators and unit-cell vectors.

The file is located by appending _tb.dat to the given path and seedname. All quantities are returned in the units used by Wannier90: hoppings in eV, lattice vectors \( \mathbf{R} \) in crystal (lattice) coordinates, position operators in Angstrom and unit-cell vectors in Angstrom.

Parameters
w90_path_and_seednamePath to the Wannier90 files including the seedname, such that the file to read is <w90_path_and_seedname>_tb.dat.
Returns
Tuple containing the lattice vectors \( \mathbf{R} \) (shape [nR, 3]), the hopping matrices (shape [nR, nOrb, nOrb]), the position operators in the real-space Wannier basis (shape [nR, nOrb, nOrb, 3]) and the unit-cell vectors (shape [3, 3]).

Definition at line 31 of file wannier_loader.cpp.