GQCP
Loading...
Searching...
No Matches
units.hpp
Go to the documentation of this file.
1// This file is part of GQCG-GQCP.
2//
3// Copyright (C) 2017-2020 the GQCG developers
4//
5// GQCG-GQCP is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// GQCG-GQCP is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with GQCG-GQCP. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
20
21namespace GQCP {
22namespace units {
23
24
25namespace constants {
26
27
28struct CODATA2014 {
29 static constexpr double angstrom_per_bohr = 0.52917721067;
30 static constexpr double bohr_per_angstrom = 1 / angstrom_per_bohr;
31};
32
33
34} // namespace constants
35
36
42inline double angstrom_to_bohr(double value_in_angstrom) { return value_in_angstrom * constants::CODATA2014::bohr_per_angstrom; }
43
44
50inline double bohr_to_angstrom(double value_in_bohr) { return value_in_bohr * constants::CODATA2014::angstrom_per_bohr; }
51
52
53} // namespace units
54} // namespace GQCP
double bohr_to_angstrom(double value_in_bohr)
Definition: units.hpp:50
double angstrom_to_bohr(double value_in_angstrom)
Definition: units.hpp:42
Definition: BaseOneElectronIntegralBuffer.hpp:25
Definition: units.hpp:28
static constexpr double angstrom_per_bohr
Definition: units.hpp:29
static constexpr double bohr_per_angstrom
Definition: units.hpp:30