GQCP
Loading...
Searching...
No Matches
GMullikenDomain.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
22#include "Domain/DiscreteDomain.hpp"
24
25
26namespace GQCP {
27
28
33template <typename _Scalar>
35 public DiscreteDomain {
36public:
37 using DiscreteDomain::DiscreteDomain;
38
39 // The expansion scalar type used for a Mulliken domain: real or complex.
40 using Scalar = _Scalar;
41
52
53 const auto M = C.numberOfOrbitals();
54 const auto K = M / 2;
55
56 // Set up the top-left (alpha) and bottom-right (beta) blocks of the total partition matrix.
58
59 auto P_component = SquareMatrix<Scalar>::PartitionMatrix(this->domain_indices, K);
60 P.topLeftCorner(K, K) = P_component;
61 P.bottomRightCorner(K, K) = P_component;
62
63 return P;
64 }
65
66
75};
76
77
78} // namespace GQCP
Definition: GMullikenDomain.hpp:35
_Scalar Scalar
Definition: GMullikenDomain.hpp:40
SquareMatrix< Scalar > partitionMatrix(const GTransformation< Scalar > &C) const
Definition: GMullikenDomain.hpp:51
GTransformation< Scalar > projectionMatrix(const GTransformation< Scalar > &C) const
Definition: GMullikenDomain.hpp:74
Definition: GTransformation.hpp:43
size_t numberOfOrbitals() const
Definition: SimpleTransformation.hpp:153
DerivedTransformation inverse() const
Definition: SimpleTransformation.hpp:183
const SquareMatrix< Scalar > & matrix() const
Definition: SimpleTransformation.hpp:168
Definition: SquareMatrix.hpp:39
static Self PartitionMatrix(const std::vector< size_t > &indices, const size_t M)
Definition: SquareMatrix.hpp:152
static Self Zero(const size_t dim)
Definition: SquareMatrix.hpp:289
Definition: BaseOneElectronIntegralBuffer.hpp:25