33#ifndef MADNESS_CHEM_POTENTIALMANAGER_H__INCLUDED
34#define MADNESS_CHEM_POTENTIALMANAGER_H__INCLUDED
134 int npsi =
psi.size();
135 if (npsi == 0)
return psi;
140 for (
int i=0; i<natom; ++i) {
144 if (nshell == 0)
continue;
145 for (
unsigned int c=0;
c<nshell; ++
c) {
147 int max_m = (l+1)*(l+2)/2;
149 for (
int m=0;
m<max_m; ++
m) {
152 overlap_sum += overlap;
153 for (
int j=0; j<npsi; ++j) {
155 proj[j] += core.
scale(overlap[j]);
161 if (world.
rank() == 0)
print(
"sum_k <core_k|psi_i>:", overlap_sum);
168 std::vector<double> bc;
173 for (
unsigned int c=0;
c<ncore; ++
c) {
175 int max_m = (l+1)*(l+2)/2;
176 for (
int m=0;
m<max_m; ++
m) {
187 for (
unsigned int c=0;
c<cores.size(); ++
c) {
191 for (
unsigned int i=0; i<mo.size(); ++i) {
192 rcore += rdcores[i] * rcores[i] * occ[i];
194 r += 2.0 * bc[
c] * rcore;
Declaration of utility class and functions for atom.
unsigned int atomic_number
Atomic number.
Definition molecule.h:61
Definition potentialmanager.h:96
double operator()(const coord_3d &r) const
Definition potentialmanager.h:104
CoreOrbitalDerivativeFunctor(Molecule &molecule, int atom, int axis, unsigned int core, int m)
Definition potentialmanager.h:102
const Molecule molecule
Definition potentialmanager.h:97
const int axis
Definition potentialmanager.h:98
const int atom
Definition potentialmanager.h:98
const unsigned int core
Definition potentialmanager.h:99
const int m
Definition potentialmanager.h:100
Definition potentialmanager.h:83
CoreOrbitalFunctor(Molecule &molecule, int atom, unsigned int core, int m)
Definition potentialmanager.h:89
double operator()(const coord_3d &r) const
Definition potentialmanager.h:91
const int m
Definition potentialmanager.h:87
const unsigned int core
Definition potentialmanager.h:86
const int atom
Definition potentialmanager.h:85
const Molecule molecule
Definition potentialmanager.h:84
FunctionDefaults holds default paramaters as static class members.
Definition funcdefaults.h:204
static const double & get_thresh()
Returns the default threshold.
Definition funcdefaults.h:279
Abstract base class interface required for functors used as input to Functions.
Definition function_interface.h:68
Function< T, NDIM > & scale(const Q q, bool fence=true)
Inplace, scale the function by a constant. No communication except for optional fence.
Definition mra.h:953
double thresh() const
Returns value of truncation threshold. No communication.
Definition mra.h:567
void set_thresh(double value, bool fence=true)
Sets the value of the truncation threshold. Optional global fence.
Definition mra.h:577
Function< T, NDIM > & truncate(double tol=0.0, bool fence=true)
Truncate the function with optional fence. Compresses with fence if not compressed.
Definition mra.h:602
const Function< T, NDIM > & reconstruct(bool fence=true) const
Reconstructs the function, transforming into scaling function basis. Possible non-blocking comm.
Definition mra.h:775
Definition potentialmanager.h:69
std::vector< coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition potentialmanager.h:80
MolecularCorePotentialFunctor(const Molecule &molecule)
Definition potentialmanager.h:73
double operator()(const coord_3d &x) const
Definition potentialmanager.h:76
const Molecule & molecule
Definition potentialmanager.h:71
Definition potentialmanager.h:55
MolecularPotentialFunctor(const Molecule &molecule)
Definition potentialmanager.h:59
const Molecule & molecule
Definition potentialmanager.h:57
std::vector< coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition potentialmanager.h:66
double operator()(const coord_3d &x) const
Definition potentialmanager.h:62
Definition molecule.h:124
std::vector< madness::Vector< double, 3 > > get_all_coords_vec() const
Definition molecule.cc:408
double get_core_bc(unsigned int atn, unsigned int c) const
Definition molecule.h:371
const Atom & get_atom(unsigned int i) const
Definition molecule.cc:447
double core_derivative(int atom, int axis, unsigned int core, int m, double x, double y, double z) const
Definition molecule.cc:1103
double molecular_core_potential(double x, double y, double z) const
Definition molecule.cc:1116
double nuclear_attraction_potential(double x, double y, double z) const
nuclear attraction potential for the whole molecule
Definition molecule.cc:971
size_t natom() const
Definition molecule.h:387
double core_eval(int atom, unsigned int core, int m, double x, double y, double z) const
Definition molecule.cc:1094
unsigned int get_core_l(unsigned int atn, unsigned int c) const
Definition molecule.h:367
unsigned int n_core_orb(unsigned int atn) const
Definition molecule.h:360
Definition potentialmanager.h:110
Molecule mol
Definition potentialmanager.h:112
void apply_nonlocal_potential(World &world, const vector_real_function_3d &amo, vector_real_function_3d Vpsi)
Definition potentialmanager.h:200
const Molecule & molecule() const
Definition potentialmanager.h:120
const real_function_3d & vnuclear()
Definition potentialmanager.h:128
PotentialManager(const Molecule &molecule, const std::string &core_type)
Definition potentialmanager.h:117
const std::string & core_type() const
Definition potentialmanager.h:124
real_function_3d vnuc
Definition potentialmanager.h:113
vector_real_function_3d core_projection(World &world, const vector_real_function_3d &psi, const bool include_Bc=true)
Definition potentialmanager.h:132
double core_projector_derivative(World &world, const vector_real_function_3d &mo, const real_tensor &occ, int atom, int axis)
Definition potentialmanager.h:165
void make_nuclear_potential(World &world)
Definition potentialmanager.h:208
std::string core_type_
Definition potentialmanager.h:114
void fence(bool debug=false)
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition worldgop.cc:161
A parallel world class.
Definition world.h:132
ProcessID rank() const
Returns the process rank in this World (same as MPI_Comm_rank()).
Definition world.h:318
WorldGopInterface & gop
Global operations.
Definition world.h:205
Declaration of core potential related class.
double psi(const Vector< double, 3 > &r)
Definition hatom_energy.cc:78
Header to declare stuff which has not yet found a home.
Main include file for MADNESS and defines Function interface.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
std::shared_ptr< FunctionFunctorInterface< double, 3 > > real_functor_3d
Definition functypedefs.h:107
std::vector< real_function_3d > vector_real_function_3d
Definition functypedefs.h:79
std::shared_ptr< FunctionFunctorInterface< double, 3 > > func(new opT(g))
FunctionFactory< double, 3 > real_factory_3d
Definition functypedefs.h:93
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition print.h:225
Function< double, 3 > real_function_3d
Definition functypedefs.h:65
double inner(response_space &a, response_space &b)
Definition response_functions.h:442
void gaxpy(const double a, ScalarResult< T > &left, const double b, const T &right, const bool fence=true)
the result type of a macrotask must implement gaxpy
Definition macrotaskq.h:140
static const double c
Definition relops.cc:10
static const double m
Definition relops.cc:9
Defines and implements most of Tensor.
std::size_t axis
Definition testpdiff.cc:59