TRIQS/triqs_modest 3.3.0
Brillouin zone summation
Loading...
Searching...
No Matches
dft_code_specific.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 "utils/defs.hpp"
8namespace triqs::modest {
9
11
12 namespace dft_code {
13
14 inline DFTCode dft_code_to_enum(std::string const &code) {
15 if (code == "wien2k") return DFTCode::Wien2k;
16 if (code == "vasp") return DFTCode::VASP;
17 if (code == "w90") return DFTCode::W90;
18 if (code == "elk") return DFTCode::Elk;
19 if (code == "hk") return DFTCode::Hk;
20 throw std::runtime_error{"Not a valid dft_code!"};
21 }
22
23 // Various functions implemented in C++ files
24 nda::matrix<dcomplex> get_spherical_to_dft_rotation_Wien2k(long l);
25 nda::matrix<dcomplex> get_spherical_to_dft_rotation_VASP(long l);
26 // nda::matrix<dcomplex> get_spherical_to_dft_rotation_QuantumEspresso();
27 // nda::matrix<dcomplex> get_spherical_to_dft_rotation_Elk();
28 // nda::matrix<dcomplex> get_spherical_to_dft_rotation_W90();
29
30 //
31 inline nda::matrix<dcomplex> get_spherical_to_dft_rotation(DFTCode code, long l) {
32 switch (code) {
35 case DFTCode::W90: return get_spherical_to_dft_rotation_VASP(l); // FIXME
36 case DFTCode::Hk:
37 return get_spherical_to_dft_rotation_VASP(l); // FIXME
38 // case DFTCode::Elk: return get_spherical_to_dft_rotation_Elk();
39 // case DFTCode::QuantumEspresso: return get_spherical_to_dft_rotation_W90();
40 default: throw std::invalid_argument("Unknown DFTCode");
41 }
42 }
43
44 } // namespace dft_code
45
46} // namespace triqs::modest
nda::matrix< dcomplex > get_spherical_to_dft_rotation_VASP(long l)
Definition Vasp.cpp:11
nda::matrix< dcomplex > get_spherical_to_dft_rotation_Wien2k(long l)
Definition Wien2k.cpp:11
nda::matrix< dcomplex > get_spherical_to_dft_rotation(DFTCode code, long l)
DFTCode dft_code_to_enum(std::string const &code)