GQCP
Loading...
Searching...
No Matches
SimpleSpinOrbitalBasis.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
23#include "Molecule/Molecule.hpp"
25
26
27namespace GQCP {
28
29
37template <typename _ExpansionScalar, typename _Shell, typename _DerivedSpinOrbitalBasis>
39 public SimpleSpinorBasis<_ExpansionScalar, _DerivedSpinOrbitalBasis> {
40public:
41 // The scalar type used to represent an expansion coefficient of the spin-orbitals in the underlying scalar orbitals: real or complex.
42 using ExpansionScalar = _ExpansionScalar;
43
44 // The type of shell that the underlying scalar basis contains.
45 using Shell = _Shell;
46
47 // The spin-orbital basis that derives from this class, enabling CRTP and compile-time polymorphism.
48 using DerivedSpinOrbitalBasis = _DerivedSpinOrbitalBasis;
49
50 // The type of the base spinor basis.
52
53 // The type of transformation that is naturally related to the derived spin-orbital basis.
55
56
57protected:
58 // The underlying scalar basis with respect to which the basis coefficients are expressed.
60
61
62public:
63 /*
64 * MARK: Constructors
65 */
66
76
77
84 SimpleSpinOrbitalBasis(scalar_basis, Transformation::Identity(scalar_basis.numberOfBasisFunctions())) {}
85
86
95 SimpleSpinOrbitalBasis(const NuclearFramework& nuclear_framework, const std::string& basisset_name) :
96 SimpleSpinOrbitalBasis(ScalarBasis<Shell>(nuclear_framework, basisset_name)) {}
97
98
107 SimpleSpinOrbitalBasis(const Molecule& molecule, const std::string& basisset_name) :
108 SimpleSpinOrbitalBasis(molecule.nuclearFramework(), basisset_name) {}
109
110
120 template <typename Z = Shell>
121 SimpleSpinOrbitalBasis(const Molecule& molecule, const std::string& basisset_name, const HomogeneousMagneticField& B,
122 typename std::enable_if<std::is_same<Z, LondonGTOShell>::value>::type* = 0) :
123 SimpleSpinOrbitalBasis(ScalarBasis<Shell>(molecule.nuclearFramework(), basisset_name, B)) {}
124
125
126 /*
127 * MARK: Scalar basis
128 */
129
133 const ScalarBasis<Shell>& scalarBasis() const { return this->scalar_basis; }
134};
135
136
137} // namespace GQCP
Definition: HomogeneousMagneticField.hpp:30
Definition: Molecule.hpp:34
Definition: NuclearFramework.hpp:35
Definition: ScalarBasis.hpp:41
Definition: SimpleSpinOrbitalBasis.hpp:39
_DerivedSpinOrbitalBasis DerivedSpinOrbitalBasis
Definition: SimpleSpinOrbitalBasis.hpp:48
SimpleSpinOrbitalBasis(const Molecule &molecule, const std::string &basisset_name)
Definition: SimpleSpinOrbitalBasis.hpp:107
_ExpansionScalar ExpansionScalar
Definition: SimpleSpinOrbitalBasis.hpp:42
SimpleSpinOrbitalBasis(const ScalarBasis< Shell > &scalar_basis, const Transformation &C)
Definition: SimpleSpinOrbitalBasis.hpp:73
_Shell Shell
Definition: SimpleSpinOrbitalBasis.hpp:45
typename SpinorBasisTraits< DerivedSpinOrbitalBasis >::Transformation Transformation
Definition: SimpleSpinOrbitalBasis.hpp:54
ScalarBasis< Shell > scalar_basis
Definition: SimpleSpinOrbitalBasis.hpp:59
const ScalarBasis< Shell > & scalarBasis() const
Definition: SimpleSpinOrbitalBasis.hpp:133
SimpleSpinOrbitalBasis(const NuclearFramework &nuclear_framework, const std::string &basisset_name)
Definition: SimpleSpinOrbitalBasis.hpp:95
SimpleSpinOrbitalBasis(const ScalarBasis< Shell > &scalar_basis)
Definition: SimpleSpinOrbitalBasis.hpp:83
SimpleSpinOrbitalBasis(const Molecule &molecule, const std::string &basisset_name, const HomogeneousMagneticField &B, typename std::enable_if< std::is_same< Z, LondonGTOShell >::value >::type *=0)
Definition: SimpleSpinOrbitalBasis.hpp:121
Definition: SimpleSpinorBasis.hpp:55
Transformation C
Definition: SimpleSpinorBasis.hpp:76
Definition: BaseOneElectronIntegralBuffer.hpp:25
Definition: SimpleSpinorBasis.hpp:38