votca 2026-dev
Loading...
Searching...
No Matches
riderivatives.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2026 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20// Contracted RI integrals and integral derivatives for analytic gradients
21// (defined in libint2_derivative_calls.cc). Nothing of size
22// Naux * Nao^2 or natoms * Naux^2 is stored: three-centre integrals and
23// their derivatives are contracted per aux shell as they are computed, the
24// metric derivatives per shell pair.
25//
26// Any RI gradient term of the form
27// sum_P sum_{mu nu} Gamma^P_{mu nu} d(mu nu|P)/dR - 1/2 sum_PQ G_PQ
28// d(P|Q)/dR
29// (RI-J, RI-K, and the screened-exchange terms of BSE gradients) is
30// assembled from ContractThreeCenterDerivatives and
31// ContractCoulombMetricDerivatives.
32
33#pragma once
34#ifndef VOTCA_XTP_RIDERIVATIVES_H
35#define VOTCA_XTP_RIDERIVATIVES_H
36
37// Standard includes
38#include <functional>
39
40// Local VOTCA includes
41#include "aobasis.h"
42#include "eigen.h"
43
44namespace votca {
45namespace xtp {
46
49using ThreeCenterVisitor = std::function<void(Index, const Eigen::MatrixXd&)>;
50
55using AuxDensityFn = std::function<void(Index, Eigen::MatrixXd&)>;
56
59void ForEachThreeCenterIntegral(const AOBasis& auxbasis,
60 const AOBasis& dftbasis,
61 const ThreeCenterVisitor& use);
62
65Eigen::MatrixXd ContractThreeCenterDerivatives(const AOBasis& auxbasis,
66 const AOBasis& dftbasis,
67 const AuxDensityFn& gamma);
68
71Eigen::MatrixXd ContractCoulombMetricDerivatives(const AOBasis& auxbasis,
72 const Eigen::MatrixXd& G);
73
74} // namespace xtp
75} // namespace votca
76
77#endif // VOTCA_XTP_RIDERIVATIVES_H
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
void ForEachThreeCenterIntegral(const AOBasis &auxbasis, const AOBasis &dftbasis, const ThreeCenterVisitor &use)
Eigen::MatrixXd ContractCoulombMetricDerivatives(const AOBasis &auxbasis, const Eigen::MatrixXd &G)
std::function< void(Index, const Eigen::MatrixXd &)> ThreeCenterVisitor
std::function< void(Index, Eigen::MatrixXd &)> AuxDensityFn
Eigen::MatrixXd ContractThreeCenterDerivatives(const AOBasis &auxbasis, const AOBasis &dftbasis, const AuxDensityFn &gamma)
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26