TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
wannier_loader.hpp
1#pragma once
2
3#include "./tb_hk.hpp"
4
5#include <nda/nda.hpp>
6
7#include <array>
8#include <complex>
9#include <string>
10#include <tuple>
11#include <utility>
12#include <vector>
13
14namespace triqs::experimental::lattice {
15
16 using dcomplex = std::complex<double>;
17
22
24 using r_vector_list_t = std::vector<std::array<long, 3>>;
25
27 using hopping_list_t = std::vector<nda::array<dcomplex, 2>>;
28
30 using position_op_list_t = std::vector<nda::array<dcomplex, 3>>;
31
33 using w90_tb_data_t = std::tuple<r_vector_list_t, hopping_list_t, position_op_list_t, nda::matrix<double>>;
34
36 using w90_hr_data_t = std::tuple<r_vector_list_t, hopping_list_t>;
37
52 w90_tb_data_t read_wannier90_tb_data(std::string const &w90_path_and_seedname);
53
64 inline tb_hk make_tb_hk_from_w90_tb_file(std::string const &w90_path_and_seedname) {
65 auto [Rs, hoppings, _unused1, _unused2] = read_wannier90_tb_data(w90_path_and_seedname);
66 return {std::move(Rs), std::move(hoppings)};
67 };
68
80 w90_hr_data_t read_wannier90_hr_data(std::string const &w90_path_and_seedname);
81
91 inline tb_hk make_tb_hk_from_w90_hr_file(std::string const &w90_path_and_seedname) {
92 auto [Rs, hoppings] = read_wannier90_hr_data(w90_path_and_seedname);
93 return {std::move(Rs), std::move(hoppings)};
94 };
95
97
98} // namespace triqs::experimental::lattice
Tight-binding Hamiltonian on a 3D lattice.
Definition tb_hk.hpp:40
w90_hr_data_t 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.
std::vector< std::array< long, 3 > > r_vector_list_t
A list of real-space lattice vectors , in crystal (lattice) coordinates.
std::tuple< r_vector_list_t, hopping_list_t, position_op_list_t, nda::matrix< double > > w90_tb_data_t
Data read from a Wannier90 *_tb.dat file: lattice vectors, hopping matrices, position operators and U...
w90_tb_data_t 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 a...
tb_hk 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.
std::tuple< r_vector_list_t, hopping_list_t > w90_hr_data_t
Data read from a Wannier90 *_hr.dat file: lattice vectors and hopping matrices.
std::vector< nda::array< dcomplex, 2 > > hopping_list_t
A list of hopping (overlap) matrices , one per lattice vector.
tb_hk 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.
std::vector< nda::array< dcomplex, 3 > > position_op_list_t
A list of position-operator matrices in the real-space Wannier basis, one per lattice vector.