votca 2026-dev
Loading...
Searching...
No Matches
dftgradient.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2024 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// ===========================================================================
21// STATUS: new, in-progress home for DFT gradient (nuclear force) assembly,
22// as distinct from the raw integral derivatives in libint2_derivative_calls
23// (which this consumes). Currently implements ONLY the nuclear repulsion
24// term. Not yet wired into DFTEngine or Orbitals::setForces() -- that is
25// a separate, later step once the RI-J (and, if hybrids matter, RI-K) and
26// XC gradient terms exist alongside this one.
27//
28// Planned eventual contents, per the dependency order worked out
29// separately: nuclear repulsion (this commit) -> RI-J gradient assembly,
30// contracting the already-validated two-/three-center integral
31// derivatives with the converged density and fitting coefficients ->
32// XC gradient (density-derivative + SSW grid-weight-derivative terms,
33// the one piece with no existing shortcut in the codebase) -> total
34// gradient, called from DFTEngine once SCF has converged, written to
35// Orbitals::setForces(). CDFT's own lambda_i * d(w_i)/dR term rides on
36// the XC term's grid-weight-derivative code, once that exists, and is
37// deliberately out of scope until the plain-DFT case is complete and
38// tested end to end.
39// ===========================================================================
40
41#pragma once
42#ifndef VOTCA_XTP_DFTGRADIENT_H
43#define VOTCA_XTP_DFTGRADIENT_H
44
45// Local VOTCA includes
46#include "aobasis.h"
47#include "qmmolecule.h"
48
49namespace votca {
50namespace xtp {
51
53 public:
69 static Eigen::MatrixXd NuclearRepulsionDerivative(const QMMolecule& mol);
70
90 static Eigen::MatrixXd RIJGradient(const Eigen::MatrixXd& density,
91 const AOBasis& auxbasis,
92 const AOBasis& dftbasis);
93
140 static Eigen::MatrixXd RIKGradient(const Eigen::MatrixXd& occ_mo_coeffs,
141 const AOBasis& auxbasis,
142 const AOBasis& dftbasis);
143};
144
145} // namespace xtp
146} // namespace votca
147
148#endif // VOTCA_XTP_DFTGRADIENT_H
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
static Eigen::MatrixXd RIKGradient(const Eigen::MatrixXd &occ_mo_coeffs, const AOBasis &auxbasis, const AOBasis &dftbasis)
static Eigen::MatrixXd NuclearRepulsionDerivative(const QMMolecule &mol)
static Eigen::MatrixXd RIJGradient(const Eigen::MatrixXd &density, const AOBasis &auxbasis, const AOBasis &dftbasis)
Provides a means for comparing floating point numbers.
Definition basebead.h:33