TRIQS/triqs_modest
3.3.0
Modular Electronic Structure Toolkit
Loading...
Searching...
No Matches
utils.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"
8
#include <string>
9
#include <stdexcept>
10
11
namespace
triqs::modest
{
12
14
enum class
DFTCode
{
Wien2k
,
QuantumEspresso
,
VASP
,
Elk
,
W90
,
Hk
};
15
16
namespace
dft_tools {
17
22
inline
DFTCode
dft_code_to_enum
(std::string
const
&code) {
23
if
(code ==
"wien2k"
)
return
DFTCode::Wien2k
;
24
if
(code ==
"vasp"
)
return
DFTCode::VASP
;
25
if
(code ==
"w90"
)
return
DFTCode::W90
;
26
if
(code ==
"elk"
)
return
DFTCode::Elk
;
27
if
(code ==
"hk"
)
return
DFTCode::Hk
;
28
if
(code ==
"qe"
)
return
DFTCode::QuantumEspresso
;
29
throw
std::runtime_error{
"Not a valid dft_code: "
+ code};
30
}
31
32
}
// namespace dft_tools
33
34
}
// namespace triqs::modest
triqs::modest::dft_tools::dft_code_to_enum
DFTCode dft_code_to_enum(std::string const &code)
Definition
utils.hpp:22
triqs::modest
Definition
chargedensity.hpp:8
triqs::modest::DFTCode
DFTCode
Enumeration of supported DFT codes.
Definition
utils.hpp:14
triqs::modest::DFTCode::QuantumEspresso
@ QuantumEspresso
triqs::modest::DFTCode::W90
@ W90
triqs::modest::DFTCode::Elk
@ Elk
triqs::modest::DFTCode::Wien2k
@ Wien2k
triqs::modest::DFTCode::VASP
@ VASP
triqs::modest::DFTCode::Hk
@ Hk
triqs_modest
dft_tools
utils.hpp
Generated by
1.9.8