MADNESS 0.10.1
molecular_functors.h
Go to the documentation of this file.
1//
2// Created by Florian Bischoff on 5/25/22.
3//
4#ifndef MADNESS_MOLECULAR_FUNCTORS_H
5#define MADNESS_MOLECULAR_FUNCTORS_H
6
9#include<madness/mra/mra.h>
11namespace madchem {
12
13
14
16private:
19public:
20 using madness::FunctionFunctorInterface<double,3>::operator();
21
24
25 double operator()(const madness::coord_3d& x) const {
26 return aobasis.eval_guess_density(molecule, x[0], x[1], x[2]);
27 }
28
29 std::vector<madness::coord_3d> special_points() const {return molecule.get_all_coords_vec();}
30};
31
32
34private:
36
37public:
38 using madness::FunctionFunctorInterface<double,3>::operator();
39
43
44 double operator()(const madness::coord_3d& x) const {
45 return aofunc(x[0], x[1], x[2]);
46 }
47
48 std::vector<madness::coord_3d> special_points() const {
49 return std::vector<madness::coord_3d>(1,aofunc.get_coords_vec());
50 }
51};
52
53
55private:
57 const int iatom;
58
59public:
60 using madness::FunctionFunctorInterface<double,3>::operator();
61
64
65 double operator()(const madness::coord_3d& x) const {
66 const madness::Atom& atom=molecule.get_atom(iatom);
67 const madness::coord_3d coord={atom.x,atom.y,atom.z};
68 double r = (x-coord).normf();
69 return -atom.q * madness::smoothed_potential(r*molecule.get_rcut()[iatom])
70 *molecule.get_rcut()[iatom];
71 }
72
73 std::vector<madness::coord_3d> special_points() const {
74 return std::vector<madness::coord_3d>(1,molecule.get_atom(iatom).get_coords());
75 }
76};
77
79private:
81 const int atom;
82 const int axis;
83
84public:
85 using madness::FunctionFunctorInterface<double,3>::operator();
86
90
91 double operator()(const madness::coord_3d& x) const {
92 return molecule.nuclear_attraction_potential_derivative(atom, axis, x[0], x[1], x[2]);
93 }
94
95 std::vector<madness::coord_3d> special_points() const {
96 return std::vector<madness::coord_3d>(1,molecule.get_atom(atom).get_coords());
97 }
98};
99
101private:
103 const int atom;
104 const int iaxis, jaxis;
105
106public:
107 using madness::FunctionFunctorInterface<double,3>::operator();
108
113
114 double operator()(const madness::coord_3d& x) const {
115 return molecule.nuclear_attraction_potential_second_derivative(atom,
116 iaxis, jaxis, x[0], x[1], x[2]);
117 }
118
119 std::vector<madness::coord_3d> special_points() const {
120 return std::vector<madness::coord_3d>(1,molecule.get_atom(atom).get_coords());
121 }
122};
123
124
126private:
128 const int atom;
129 const int axis;
130 std::vector<madness::coord_3d> specialpt;
131public:
132 using madness::FunctionFunctorInterface<double,3>::operator();
133
136
137 double operator()(const madness::coord_3d& r) const {
138 return molecule.core_potential_derivative(atom, axis, r[0], r[1], r[2]);
139 }
140};
141
142
143
144}
145#endif //MADNESS_MOLECULAR_FUNCTORS_H
const madness::Molecule & molecule
Definition molecular_functors.h:56
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition molecular_functors.h:73
const int iatom
Definition molecular_functors.h:57
AtomicAttractionFunctor(const madness::Molecule &molecule, int iatom)
Definition molecular_functors.h:62
double operator()(const madness::coord_3d &x) const
Definition molecular_functors.h:65
AtomicBasisFunctor(const madness::AtomicBasisFunction &aofunc)
Definition molecular_functors.h:40
double operator()(const madness::coord_3d &x) const
Definition molecular_functors.h:44
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition molecular_functors.h:48
const madness::AtomicBasisFunction aofunc
Definition molecular_functors.h:35
CorePotentialDerivativeFunctor(const madness::Molecule &molecule, int atom, int axis)
Definition molecular_functors.h:134
double operator()(const madness::coord_3d &r) const
Definition molecular_functors.h:137
const int atom
Definition molecular_functors.h:128
const int axis
Definition molecular_functors.h:129
std::vector< madness::coord_3d > specialpt
Definition molecular_functors.h:130
const madness::Molecule & molecule
Definition molecular_functors.h:127
double operator()(const madness::coord_3d &x) const
Definition molecular_functors.h:91
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition molecular_functors.h:95
const int atom
Definition molecular_functors.h:81
const madness::Molecule & molecule
Definition molecular_functors.h:80
const int axis
Definition molecular_functors.h:82
MolecularDerivativeFunctor(const madness::Molecule &molecule, int atom, int axis)
Definition molecular_functors.h:87
const madness::Molecule & molecule
Definition molecular_functors.h:17
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition molecular_functors.h:29
const madness::AtomicBasisSet & aobasis
Definition molecular_functors.h:18
double operator()(const madness::coord_3d &x) const
Definition molecular_functors.h:25
MolecularGuessDensityFunctor(const madness::Molecule &molecule, const madness::AtomicBasisSet &aobasis)
Definition molecular_functors.h:22
double operator()(const madness::coord_3d &x) const
Definition molecular_functors.h:114
const int jaxis
Definition molecular_functors.h:104
MolecularSecondDerivativeFunctor(const madness::Molecule &molecule, int atom, int iaxis, int jaxis)
Definition molecular_functors.h:109
const int atom
Definition molecular_functors.h:103
const int iaxis
Definition molecular_functors.h:104
const madness::Molecule & molecule
Definition molecular_functors.h:102
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition molecular_functors.h:119
Definition molecule.h:60
double y
Definition molecule.h:62
double x
Definition molecule.h:62
double z
Definition molecule.h:62
double q
Coordinates and charge in atomic units.
Definition molecule.h:62
Used to represent one basis function from a shell on a specific center.
Definition madness/chem/molecularbasis.h:409
Contracted Gaussian basis.
Definition madness/chem/molecularbasis.h:469
Abstract base class interface required for functors used as input to Functions.
Definition function_interface.h:68
Definition molecule.h:129
Provides typedefs to hide use of templates and to increase interoperability.
Main include file for MADNESS and defines Function interface.
Definition molecular_functors.h:11
double smoothed_potential(double r)
Smoothed 1/r potential.
Definition atomutil.cc:220
Vector< double, 3 > coord_3d
Definition funcplot.h:1074