SIRIUS 7.5.0
Electronic structure library and applications
constants.hpp
Go to the documentation of this file.
1// Copyright (c) 2013-2018 Anton Kozhevnikov, Thomas Schulthess
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without modification, are permitted provided that
5// the following conditions are met:
6//
7// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8// following disclaimer.
9// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
10// and the following disclaimer in the documentation and/or other materials provided with the distribution.
11//
12// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
13// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
14// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
15// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
17// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
18// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19
20/** \file constants.hpp
21 *
22 * \brief Various constants
23 */
24
25#ifndef __CONSTANTS_HPP__
26#define __CONSTANTS_HPP__
27
28#include <complex>
29
30namespace sirius {
31
32/// NIST value for the inverse fine structure (http://physics.nist.gov/cuu/Constants/index.html)
33const double speed_of_light = 137.035999139;
34
35// This value reproduces NIST ScRLDA total energy much better.
36// const double speed_of_light = 137.0359895;
37
38/// Bohr radius in angstroms.
39const double bohr_radius = 0.52917721067;
40
41/// \f$ \pi \f$
42const double pi = 3.1415926535897932385;
43
44/// \f$ 2\pi \f$
45const double twopi = 6.2831853071795864769;
46
47/// \f$ 4\pi \f$
48const double fourpi = 12.566370614359172954;
49
50/// First spherical harmonic \f$ Y_{00} = \frac{1}{\sqrt{4\pi}} \f$.
51const double y00 = 0.28209479177387814347;
52
53/// Hartree in electron-volt units.
54const double ha2ev = 27.21138505;
55
56const char* const storage_file_name = "sirius.h5";
57
58/// Pauli matrices in {I, Z, X, Y} order.
59const std::complex<double> pauli_matrix[4][2][2] = {
60 {{1.0, 0.0}, {0.0, 1.0}},
61 {{1.0, 0.0}, {0.0, -1.0}},
62 {{0.0, 1.0}, {1.0, 0.0}},
63 {{0.0, std::complex<double>(0, -1)}, {std::complex<double>(0, 1), 0.0}}};
64
65} // namespace sirius
66
67#endif // __CONSTANTS_HPP__
Namespace of the SIRIUS library.
Definition: sirius.f90:5
const double bohr_radius
Bohr radius in angstroms.
Definition: constants.hpp:39
const double y00
First spherical harmonic .
Definition: constants.hpp:51
const double twopi
Definition: constants.hpp:45
const double pi
Definition: constants.hpp:42
const double ha2ev
Hartree in electron-volt units.
Definition: constants.hpp:54
const double speed_of_light
NIST value for the inverse fine structure (http://physics.nist.gov/cuu/Constants/index....
Definition: constants.hpp:33
const double fourpi
Definition: constants.hpp:48
const std::complex< double > pauli_matrix[4][2][2]
Pauli matrices in {I, Z, X, Y} order.
Definition: constants.hpp:59