64 template<
typename T, std::
size_t NDIM>
68 std::vector<Function<T, NDIM> >
x;
75 world(x1[0].world()), x(x1) {
79 world(other.world), x(other.x) {
92 x =
add(world, x, b.
x);
99 std::vector<Function<T,NDIM> > result(x.size());
100 for (
unsigned int i=0; i<x.size(); ++i) {
101 result[i]=
mul(a,x[i],
false);
111 template<
typename T, std::
size_t NDIM>
120 template<
typename T, std::
size_t NDIM>
128 world(world), n(nn) {
148 world(world1), calc(calc), coords_sum(-1.0) {
156 R = nuclear_correlation->function();
157 R_inverse = nuclear_correlation->inverse();
161 double value() {
return value(calc->molecule.get_all_coords());}
163 double value(
const Tensor<double>& x);
195 mutable double coords_sum;
200 void print_nuclear_corrfac()
const;
224 void normalize(
vecfuncT& nemo)
const;
229 void orthonormalize(
vecfuncT& nemo)
const;
239 template<
typename solverT>
241 int lo,
int nfunc,
double trantol)
const;
244 template<
typename T,
size_t NDIM>
SCFParameters param
Definition: tkato/SCF.h:63
WorldGopInterface & gop
Global operations.
Definition: worldfwd.h:462
Definition: shared_ptr_bits.h:38
The Nemo class.
Definition: nemo.h:138
real_function_3d R
the nuclear correlation factor
Definition: nemo.h:187
Main include file for MADNESS and defines Function interface.
vecfunc & operator=(const vecfunc &other)
Definition: nemo.h:82
std::vector< Function< T, NDIM > > x
Definition: nemo.h:68
::std::string string
Definition: gtest-port.h:872
World & world
Definition: nemo.h:67
std::shared_ptr< SCF > get_calc() const
Definition: nemo.h:169
vecfunc(const std::vector< Function< T, NDIM > > &x1)
Definition: nemo.h:74
NDIM & f
Definition: mra.h:2179
std::shared_ptr< NuclearCorrelationFactor > nuclear_correlation
the nuclear correlation factor
Definition: nemo.h:184
Function< TENSOR_RESULT_TYPE(L, R), NDIM > add(const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
Same as operator+ but with optional fence and no automatic compression.
Definition: mra.h:1734
std::shared_ptr< NuclearCorrelationFactor > create_nuclear_correlation_factor(World &world, const SCF &calc)
create and return a new nuclear correlation factor
Definition: correlationfactor.cc:48
T inner(const vecfunc< T, NDIM > &a, const vecfunc< T, NDIM > &b)
the non-linear solver requires an inner product
Definition: nemo.h:112
double econv
Energy convergence.
Definition: scfparam.h:59
Implements most functionality of separated operators.
allocator(World &world, const int nn)
Definition: nemo.h:127
vecfunc operator*(double a) const
Definition: nemo.h:96
#define PROFILE_BLOCK(name)
Definition: worldprofile.h:197
vecfunc operator+=(const vecfunc &b)
Definition: nemo.h:91
Nemo(World &world1, std::shared_ptr< SCF > calc)
ctor
Definition: nemo.h:147
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
vecfunc(World &world, const std::vector< Function< T, NDIM > > &x1)
Definition: nemo.h:70
Defines operations on vectors of FunctionsThis file defines a number of operations on vectors of func...
The interface to be provided by functions to be optimized.
Definition: solvers.h:176
Generalized version of NonlinearSolver not limited to a single madness function.
Definition: nonlinsol.h:174
Example implementation of Krylov-subspace nonlinear equation solver.
Function< TENSOR_RESULT_TYPE(L, R), NDIM > sub(const Function< L, NDIM > &left, const Function< R, NDIM > &right, bool fence=true)
Same as operator- but with optional fence and no automatic compression.
Definition: mra.h:1778
tensorT compute_fock_matrix(const vecfuncT &nemo, const tensorT &occ) const
compute the Fock matrix from scratch
Definition: apps/chem/nemo.cc:163
double psi(const Vector< double, 3 > &r)
Definition: apps/ii/hatom_energy.cc:42
FLOAT a(int j, FLOAT z)
Definition: y1.cc:86
vector< functionT > vecfuncT
Definition: chem/corepotential.cc:61
Tensor< double > tensorT
Definition: chem/distpm.cc:13
vecfunc< T, NDIM > operator()()
allocate a vector of n empty functions
Definition: nemo.h:132
A parallel world with full functionality wrapping an MPI communicator.
Definition: worldfwd.h:416
void fence()
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition: worldgop.cc:52
A multiresolution adaptive numerical function.
Definition: derivative.h:61
Tensor< double > gradient(const Tensor< double > &x)
Should return the derivative of the function.
Definition: nemo.h:165
World & world
Definition: nemo.h:122
Implements (2nd generation) static load/data balancing for functions.
double lo
Smallest length scale we need to resolve.
Definition: scfparam.h:88
Defines/implements plotting interface for functions.
double value()
Definition: nemo.h:161
real_function_3d R_inverse
the inverse nuclear correlation factor
Definition: nemo.h:190
vecfunc operator-(const vecfunc &b) const
Definition: nemo.h:87
#define MADNESS_EXCEPTION(msg, value)
Definition: worldexc.h:88
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
const int n
Definition: nemo.h:123
FLOAT b(int j, FLOAT z)
Definition: y1.cc:79
Function< TENSOR_RESULT_TYPE(Q, T), NDIM > mul(const Q alpha, const Function< T, NDIM > &f, bool fence=true)
Returns new function equal to alpha*f(x) with optional fence.
Definition: mra.h:1528
vecfunc(const vecfunc &other)
Definition: nemo.h:78