GQCP
Loading...
Searching...
No Matches
CurrentDensityMatrixElement.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
25#include "Utilities/complex.hpp"
26
27
28namespace GQCP {
29
30
37template <typename _Scalar, typename _Primitive>
39 public Function<complex, Vector<double, 3>> {
40public:
41 // The scalar type of the expansion coefficients of the spatial orbitals that underlie this current density matrix element.
42 using Scalar = _Scalar;
43
44 // The type of primitive that underlies this current density matrix element.
45 using Primitive = _Primitive;
46
47 // The type of basis function that underlies this current density matrix element.
49
50 // The type of spatial orbital that underlies this current density matrix element.
52
53 // The type of the derivative of a primitive. The derivative of a Cartesian GTO is a linear combination of Cartesian GTOs.
55
56 // The type of the derivative of a basis function.
58
59 // The type of the derivative of a spatial orbital.
61
62
63private:
64 // The first spatial orbital.
65 SpatialOrbital phi_p;
66
67 // The second spatial orbital.
68 SpatialOrbital phi_q;
69
70 // One of the components of the first spatial orbital gradient.
72
73 // One of the components of the second spatial orbital gradient.
75
76
77public:
78 /*
79 * MARK: Constructors
80 */
81
82 /*
83 * The default constructor.
84 */
86
87
95 phi_p {phi_p},
96 phi_q {phi_q},
97 dphi_p {dphi_p},
98 dphi_q {dphi_q} {}
99
100
101 /*
102 * MARK: `Function` behavior
103 */
104
112 complex operator()(const Vector<double, 3>& r) const override {
113
114 using namespace GQCP::literals;
115
116 return 0.5_ii * (conj(phi_p(r)) * dphi_q(r) -
117 conj(dphi_p(r)) * phi_q(r));
118 }
119};
120
121
122} // namespace GQCP
Definition: CurrentDensityMatrixElement.hpp:39
_Primitive Primitive
Definition: CurrentDensityMatrixElement.hpp:45
complex operator()(const Vector< double, 3 > &r) const override
Definition: CurrentDensityMatrixElement.hpp:112
_Scalar Scalar
Definition: CurrentDensityMatrixElement.hpp:42
CurrentDensityMatrixElement(const SpatialOrbital &phi_p, const SpatialOrbital &phi_q, const SpatialOrbitalDerivative &dphi_p, const SpatialOrbitalDerivative &dphi_q)
Definition: CurrentDensityMatrixElement.hpp:94
Definition: EvaluableLinearCombination.hpp:46
Definition: Function.hpp:153
Definition: Matrix.hpp:47
Definition: complex.hpp:57
Definition: BaseOneElectronIntegralBuffer.hpp:25
std::complex< double > complex
Definition: complex.hpp:31
complex conj(const complex &c)
Definition: complex.cpp:31