83 #ifndef MADNESS_CHEM_NUCLEARCORRELATIONFACTOR_H__INCLUDED
84 #define MADNESS_CHEM_NUCLEARCORRELATIONFACTOR_H__INCLUDED
96 class NuclearCorrelationFactor {
98 enum corrfactype {None, GaussSlater, LinearSlater, Polynomial,
106 NuclearCorrelationFactor(World& world,
const Molecule& mol)
107 : world(world), vtol(FunctionDefaults<3>::get_thresh()*0.1)
115 for (
int axis=0; axis<3; ++axis) {
116 functorT U1f=
functorT(
new U1_functor(
this,axis));
118 .functor(U1f).truncate_on_project());
119 U1_function.back().set_thresh(FunctionDefaults<3>::get_thresh());
123 functorT U2f=
functorT(
new U2_functor(
this));
125 .functor(U2f).truncate_on_project();
126 U2_function.set_thresh(FunctionDefaults<3>::get_thresh());
129 functorT U3f=
functorT(
new U3_functor(
this));
131 .functor(U3f).truncate_on_project();
132 tmp.set_thresh(FunctionDefaults<3>::get_thresh());
134 U2_function.truncate();
137 virtual corrfactype type()
const = 0;
147 for (
int axis=0; axis<3; ++axis) {
150 result+=U1(axis)*Drhs;
159 functorT Rf=
functorT(
new R_functor(
this,1));
161 .functor(Rf).truncate_on_project();
168 .functor2(R_functor(
this,2)).truncate_on_project();
175 .functor2(R_functor(
this,-1)).truncate_on_project();
181 return U1_function[axis];
199 std::vector<real_function_3d> U1_function;
209 virtual double S(
const double& r,
const double& Z)
const = 0;
225 virtual double Spp_div_S(
const double& r,
const double& Z)
const = 0;
227 class R_functor :
public FunctionFunctorInterface<double,3> {
228 const NuclearCorrelationFactor* ncf;
231 R_functor(
const NuclearCorrelationFactor* ncf,
const int e=1)
232 : ncf(ncf), exponent(e) {}
233 double operator()(
const coord_3d& xyz)
const {
235 for (
int i=0; i<ncf->molecule.natom(); ++i) {
236 const Atom& atom=ncf->molecule.get_atom(i);
238 const double r=vr1A.
normf();
239 result*=ncf->S(r,atom.
q);
241 if (exponent==-1)
return 1.0/result;
242 else if (exponent==2)
return result*result;
243 else if (exponent==1)
return result;
245 return std::pow(result,
double(exponent));
249 std::vector<coord_3d> special_points()
const {
250 return ncf->molecule.get_all_coords_vec();
257 class U1_functor :
public FunctionFunctorInterface<double,3> {
259 const NuclearCorrelationFactor* ncf;
263 U1_functor(
const NuclearCorrelationFactor* ncf,
const int axis)
264 : ncf(ncf), axis(axis) {}
266 double operator()(
const coord_3d& xyz)
const {
268 for (
int i=0; i<ncf->molecule.natom(); ++i) {
269 const Atom& atom=ncf->molecule.get_atom(i);
271 const double r=vr1A.
normf();
272 result+=(ncf->Sp(vr1A,atom.
q)[axis]/ncf->S(r,atom.
q));
276 std::vector<coord_3d> special_points()
const {
277 return ncf->molecule.get_all_coords_vec();
281 class U2_functor :
public FunctionFunctorInterface<double,3> {
282 const NuclearCorrelationFactor* ncf;
284 U2_functor(
const NuclearCorrelationFactor* ncf) : ncf(ncf) {}
285 double operator()(
const coord_3d& xyz)
const {
287 for (
int i=0; i<ncf->molecule.natom(); ++i) {
288 const Atom& atom=ncf->molecule.get_atom(i);
290 const double r=vr1A.
normf();
291 result+=ncf->Spp_div_S(r,atom.
q);
295 std::vector<coord_3d> special_points()
const {
296 return ncf->molecule.get_all_coords_vec();
300 class U3_functor :
public FunctionFunctorInterface<double,3> {
301 const NuclearCorrelationFactor* ncf;
303 U3_functor(
const NuclearCorrelationFactor* ncf) : ncf(ncf) {}
304 double operator()(
const coord_3d& xyz)
const {
305 std::vector<coord_3d> all_terms(ncf->molecule.natom());
306 for (
int i=0; i<ncf->molecule.natom(); ++i) {
307 const Atom& atom=ncf->molecule.get_atom(i);
309 const double r=vr1A.
normf();
310 all_terms[i]=ncf->Sp(vr1A,atom.
q)*(1.0/ncf->S(r,atom.
q));
314 for (
int i=0; i<ncf->molecule.natom(); ++i) {
315 for (
int j=0; j<i; ++j) {
316 result+=all_terms[i][0]*all_terms[j][0]
317 +all_terms[i][1]*all_terms[j][1]
318 +all_terms[i][2]*all_terms[j][2];
324 std::vector<coord_3d> special_points()
const {
325 return ncf->molecule.get_all_coords_vec();
337 class GaussSlater :
public NuclearCorrelationFactor {
343 GaussSlater(World& world,
const Molecule& mol)
344 : NuclearCorrelationFactor(world,mol) {
346 if (world.rank()==0) {
347 print(
"constructed nuclear correlation factor of the form");
348 print(
" R = Prod_A S_A");
349 print(
" S_A = exp(-Z_A r_{1A}) + (1 - exp(-Z_A^2*r_{1A}^2))");
350 print(
"which is of Gaussian-Slater type\n");
356 corrfactype type()
const {
return NuclearCorrelationFactor::GaussSlater;}
361 double S(
const double& r,
const double& Z)
const {
362 const double rho=r*Z;
363 return exp(-rho)+(1.0-
exp(-(rho*rho)));
369 const double r=
sqrt(vr1A[0]*vr1A[0] +
370 vr1A[1]*vr1A[1] + vr1A[2]*vr1A[2]);
372 const double eA=
exp(-Z*r);
373 const double gA=
exp(-Z*Z*r*r);
374 coord_3d term=(2.0*gA*Z*Z*vr1A-Z*eA*
n12(vr1A,1.e-8));
381 double Spp_div_S(
const double& r,
const double& Z)
const {
382 const double rho=Z*r;
384 return Z*Z*(-3.5 - 4.0*rho + 6.0*rho*rho + 12.0*rho*rho*rho);
386 const double e=
exp(-rho);
387 const double g=
exp(-rho*rho);
388 const double term1=-Z/r*(1.0-
g);
389 const double term2=-g*Z*Z*(3.0-2.0*Z*Z*r*r) - Z*Z/2.0*e;
390 const double S_inv=
exp(-rho)+(1.0-
exp(-(rho*rho)));
391 return (term1+term2)/S_inv;
405 class LinearSlater :
public NuclearCorrelationFactor {
411 LinearSlater(World& world,
const Molecule& mol,
const double a)
412 : NuclearCorrelationFactor(world,mol), a_(1.0) {
416 if (world.rank()==0) {
417 print(
"constructed nuclear correlation factor of the form");
418 print(
" S_A = -Z_A r_{1A} exp(-Z_A r_{1A}) + 1");
420 print(
"which is of linear Slater type\n");
425 corrfactype type()
const {
return NuclearCorrelationFactor::LinearSlater;}
432 double a_param()
const {
return 1.0;}
435 double S(
const double& r,
const double& Z)
const {
436 const double rho=r*Z;
437 const double b=a_param();
438 return (-rho)*
exp(-b*rho)+1.0;
444 const double b=a_param();
445 const double r=
sqrt(vr1A[0]*vr1A[0] +
446 vr1A[1]*vr1A[1] + vr1A[2]*vr1A[2]);
448 const double ebrz=
exp(-b*r*Z);
449 const coord_3d term=Z*ebrz*(b*Z*(vr1A) -
n12(vr1A));
456 double Spp_div_S(
const double& r,
const double& Z)
const {
458 const double b=a_param();
459 const double rho=Z*r;
461 const double O0=1.0- 3.0*
b;
462 const double O1=Z - 4.0*b*Z + 3.0*b*b*Z;
463 const double O2=Z*Z - 5.0*b*Z*Z + 6.5*b*b*Z*Z - 5.0/3.0*b*b*b*Z*Z;
464 return Z*Z*(O0 + O1*r + O2*r*r);
467 const double ebrz=
exp(-b*rho);
468 const double num=Z* (ebrz - 1.0 + 0.5*ebrz*rho* (2.0 + b*(b*rho-4.0)));
469 const double denom=r*(rho*ebrz-1.0);
478 class Slater :
public NuclearCorrelationFactor {
484 Slater(World& world,
const Molecule& mol,
const double a)
485 : NuclearCorrelationFactor(world,mol), a_(1.5) {
489 if (world.rank()==0) {
490 print(
"\nconstructed nuclear correlation factor of the form");
491 print(
" S_A = 1/(a-1) exp(-a Z_A r_{1A}) + 1");
493 print(
"which is of Slater type\n");
498 corrfactype type()
const {
return NuclearCorrelationFactor::Slater;}
505 double a_param()
const {
return a_;}
508 double S(
const double& r,
const double& Z)
const {
509 const double a=a_param();
510 return 1.0+1.0/(a-1.0) *
exp(-a*Z*r);
515 const double a=a_param();
516 const double r=vr1A.normf();
517 return -(a*
exp(-a*Z*r)*Z)/(a-1.0)*
n12(vr1A);
521 double Spp_div_S(
const double& r,
const double& Z)
const {
522 const double a=a_param();
525 const double O0=1.0-(1.5*
a);
526 const double O1=(a-1.0)*(a-1.0)*Z;
527 const double O2=(1.0/12.0 * (a-1.0)*(12.0+a*(5*a-18.0)))*Z*Z;
528 return Z*Z*(O0 + O1*r + O2*r*r);
531 const double earz=
exp(-a*r*Z);
532 const double num=Z*(-earz + a*earz - (a-1.0) - 0.5*a*a*r*Z*earz);
533 const double denom=(r*earz + (a-1.0) * r);
544 template<std::
size_t N>
545 class Polynomial :
public NuclearCorrelationFactor {
551 Polynomial(World& world,
const Molecule& mol,
const double a)
552 : NuclearCorrelationFactor(world,mol) {
555 a_=(2. + (-2. +
sqrt(-1. +
N))*
N)/(-2. +
N);
559 if (world.rank()==0) {
560 print(
"constructed nuclear correlation factor of the form");
561 print(
" R = Prod_A S_A");
562 print(
" S_A = 1 + a (r/b -1)^N if r<b, with b= (N*a)/((1+a) Z)");
564 print(
"which is of polynomial type with exponent N = ",
N);
569 corrfactype type()
const {
return NuclearCorrelationFactor::Polynomial;}
576 double a_param()
const {
return a_;}
579 static double b_param(
const double& a) {
return N*a/(1.0+
a);}
582 double S(
const double& r,
const double& Z)
const {
584 const double rho=r*Z;
585 const double a=Polynomial<N>::a_param();
586 const double b=Polynomial<N>::b_param(a);
589 const double arg=-1.0 + rho/
b;
590 return 1.0 + power<N>(-1.0) * a*power<N>(
arg);
600 const double r=vr1A.
normf();
601 const double rho=r*Z;
602 const double a=Polynomial<N>::a_param();
603 const double b=Polynomial<N>::b_param(a);
606 return power<N>(-1.)*(1.+
a)* Z* power<N-1>(-1.+rho/b)*
n12(vr1A);
614 double Spp_div_S(
const double& r,
const double& Z)
const {
616 const double rho=r*Z;
617 const double a=Polynomial<N>::a_param();
618 const double b=Polynomial<N>::b_param(a);
621 const double ap1=1.0+
a;
622 const double c0=((3. *(1. +
a) - (3. + a) *
N))/(2.* a*
N);
623 const double c1=((2.* ap1*ap1 - ap1* (3. +
a)*
N +
N*
N)*Z)/(a*a*N*N);
624 const double c2=((30.*ap1*ap1*ap1- ap1*ap1* (55 + 18*
a)*N +
625 30 *ap1 *N*N + (-5 + a* (8 + a)) *N*N*N)* Z*Z)/(12 *a*a*a*N*N*N);
626 return Z*Z*(c0 + c1*r + c2*r*r);
630 const double num=Z* (2 + (power<N>(-1)* a* power<N>(-1 + rho/b)
631 * (-2 *a*N*N + (1 +
a) *N* (1 + a *(-3 + N) +
N)* rho +
632 2 *(1 + a)*(1+
a)* rho*rho))/
power<2>(a* N - (1 + a)*rho));
634 const double denom=2.* (r + power<N>(-1) *a* r* power<N>(-1 + rho/b));
645 class PseudoNuclearCorrelationFactor :
public NuclearCorrelationFactor {
652 PseudoNuclearCorrelationFactor(World& world,
const Molecule& mol,
654 : NuclearCorrelationFactor(world,mol), potentialmanager(pot), fac(fac) {
656 if (world.rank()==0) {
657 print(
"constructed nuclear correlation factor of the form");
659 print(
"which means it's (nearly) a conventional calculation\n");
666 corrfactype type()
const {
return None;}
675 MADNESS_ASSERT(potentialmanager->vnuclear().is_initialized());
677 return potentialmanager->vnuclear();
697 double S(
const double& r,
const double& Z)
const {
709 double Spp_div_S(
const double& r,
const double& Z)
const {
718 class CorrelationFactor {
728 CorrelationFactor(World& world) : world(world), _gamma(-1.0), dcut(1.e-10),
733 CorrelationFactor(World& world,
const double&
gamma,
const double dcut,
734 const Molecule& molecule) : world(world), _gamma(gamma), dcut(dcut) {
736 if (world.rank()==0) {
738 if (gamma>0.0)
print(
"constructed correlation factor with gamma=",gamma);
739 else if (gamma==0.0)
print(
"constructed linear correlation factor");
744 CorrelationFactor(
const CorrelationFactor& other) : world(other.world) {
751 CorrelationFactor& operator=(
const CorrelationFactor& other) {
759 double gamma()
const {
return _gamma;}
762 double operator()(
const coord_6d& r)
const {
763 const double rr=r12(r);
764 if (_gamma>0.0)
return (1.0-
exp(-_gamma*rr))/(2.0*_gamma);
770 const double eps)
const {
772 const double bsh_thresh=1.e-7;
777 op_mod.modified()=
true;
779 for (
int axis=0; axis<3; ++axis) {
780 if (world.rank()==0)
print(
"working on axis",axis);
788 .g12(u).particle1(
copy(Di)).particle2(
copy(phi_j));
791 .g12(u).particle1(
copy(phi_i)).particle2(
copy(Dj));
793 if (world.rank()==0)
print(
"done with fill_tree");
795 result=result+(tmp1-tmp2).
truncate();
799 result.truncate().reduce_rank();
801 if (world.rank()==0) printf(
"done with multiplication with U at ime %.1f\n",
wall_time());
802 result.print_size(
"result");
811 .g12(fg3).particle1(
copy(phi_i)).particle2(
copy(phi_j));
812 mul.fill_tree(op_mod).truncate();
813 mul.print_size(
"mul");
817 result.print_size(
"U * |ij>");
830 if (world.rank()==0)
print(
"U2 for the electronic correlation factor");
831 if (world.rank()==0)
print(
"is expensive -- do you really need it??");
841 .dcut(dcut).gamma(_gamma).f12().
thresh(thresh);
874 fg_(
double gamma,
double dcut) : gamma(gamma), dcut(dcut) {
875 MADNESS_ASSERT(gamma>0.0);
877 double operator()(
const coord_6d& r)
const {
878 const double rr=r12(r);
879 const double e=
exp(-gamma*rr);
880 return (1.0-e)*u(rr,dcut) + 0.5*gamma*e;
888 f_over_r_(
double gamma,
double dcut) : gamma(gamma), dcut(dcut) {
889 MADNESS_ASSERT(gamma>0.0);
891 double operator()(
const coord_6d& r)
const {
892 const double rr=r12(r);
893 const double e=
exp(-gamma*rr);
894 return (1.0-e)*u(rr,dcut)/(2.0*
gamma);
903 U(
double gamma,
int axis,
double dcut) : gamma(gamma), axis(axis),
905 MADNESS_ASSERT(axis>=0 and axis<3);
907 double operator()(
const coord_6d& r)
const {
908 const double rr=r12(r);
909 const coord_3d vr12=
vec(r[0]-r[3],r[1]-r[4],r[2]-r[5]);
911 if (gamma>0.0)
return -0.5*
exp(-gamma*rr)*N[axis];
924 f2_(
double gamma) : gamma(gamma) {MADNESS_ASSERT(gamma>0.0);}
925 double operator()(
const coord_6d& r)
const {
926 const double rr=r12(r);
927 const double e=
exp(-gamma*rr);
928 const double f=(1.0-e)/(2.0*gamma);
936 nablaf2_(
double gamma) : gamma(gamma) {
937 MADNESS_ASSERT(gamma>0.0);
938 MADNESS_ASSERT(gamma=1.0);
940 double operator()(
const coord_6d& r)
const {
941 const double rr=r12(r);
942 const double f=
exp(-2.0*gamma*rr)/(4.0*gamma*
gamma);
948 static double u(
double r,
double c) {
950 double r2 = r*r, pot;
953 }
else if (r > 1e-2) {
954 pot =
erf(r)/r +
exp(-r2)*0.56418958354775630;
956 pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));
961 static double r12(
const coord_6d& r) {
962 const double x12=r[0]-r[3];
963 const double y12=r[1]-r[4];
964 const double z12=r[2]-r[5];
965 const double r12=
sqrt(x12*x12 + y12*y12 + z12*z12);
968 static double x12(
const coord_6d& r,
const int axis) {
969 return r[axis]-r[axis+3];
976 class CorrelationFactor2 {
990 CorrelationFactor2(World& world) : world(world), _gamma(0.5), dcut(1.e-10),
991 lo(1.e-10), vtol(FunctionDefaults<3>::get_thresh()*0.1) {
992 MADNESS_ASSERT(_gamma==0.5);
996 double gamma()
const {
return _gamma;}
999 functorT
R=
functorT(
new R_functor(_gamma,1));
1004 functorT R2=
functorT(
new R_functor(_gamma,2));
1009 functorT R=
functorT(
new R_functor(_gamma,-1));
1015 functorT U1f=
functorT(
new U1_functor(_gamma,axis));
1021 functorT U2f=
functorT(
new U2_functor(_gamma));
1027 const double bsh_thresh=1.e-7;
1032 op_mod.modified()=
true;
1034 for (
int axis=0; axis<3; ++axis) {
1035 if (world.rank()==0)
print(
"working on axis",axis);
1044 .g12(u1).ket(
copy(Drhs1));
1048 .g12(u1).ket(
copy(Drhs2));
1050 if (world.rank()==0)
print(
"done with fill_tree");
1052 result=result+(tmp1-tmp2).
truncate();
1056 result.truncate().reduce_rank();
1058 if (world.rank()==0)
1059 printf(
"done with multiplication with U at ime %.1f\n",
wall_time());
1060 result.print_size(
"result");
1066 r2.fill_tree(op_mod);
1075 class R_functor :
public FunctionFunctorInterface<double,6> {
1080 R_functor(
double gamma,
int e=1) : gamma(gamma), exponent(e) {
1081 MADNESS_ASSERT(gamma=0.5);
1085 double operator()(
const coord_6d& r)
const {
1086 const double rr=r12(r);
1087 double val=(1.0-0.5*
exp(-gamma*rr));
1088 if (exponent==1)
return val;
1089 else if (exponent==2)
return val*val;
1090 else if (exponent==-1)
return 1.0/val;
1098 class U2_functor :
public FunctionFunctorInterface<double,6> {
1102 U2_functor(
double gamma) : gamma(gamma) {
1103 MADNESS_ASSERT(gamma=0.5);
1107 double operator()(
const coord_6d& r)
const {
1108 const double rr=r12(r);
1111 return 5./4.0 - rr + (35.0* rr*rr)/48.0 - (101.0*rr*rr*rr)/192.0;
1113 const double egr=
exp(-gamma*rr);
1114 return -(-8.*egr + 8.0 + rr*egr)/(4.0 *rr*egr - 8 *rr);
1124 class U1_functor :
public FunctionFunctorInterface<double,6> {
1129 U1_functor(
double gamma,
int axis) : gamma(gamma), axis(axis) {
1130 MADNESS_ASSERT(gamma==0.5);
1131 MADNESS_ASSERT(axis<3);
1134 double operator()(
const coord_6d& r)
const {
1135 const double rr=r12(r);
1136 const coord_3d vr12=
vec(r[0]-r[3],r[1]-r[4],r[2]-r[5]);
1141 val = 0.5 - 0.5*rr + 0.125*(3.*rr*rr) - (13.* rr*rr*rr)/48.0;
1143 const double egr=
exp(-gamma*rr);
1144 val=egr/(4.0-2.0*egr);
1147 return -val*N[axis];
1152 static double r12(
const coord_6d& r) {
1153 const double x12=r[0]-r[3];
1154 const double y12=r[1]-r[4];
1155 const double z12=r[2]-r[5];
1156 const double r12=
sqrt(x12*x12 + y12*y12 + z12*z12);
const double thresh
Definition: dielectric.cc:185
Derivative< double, 6 > real_derivative_6d
Definition: functypedefs.h:173
Definition: shared_ptr_bits.h:38
Vector< T, NDIM > n12(const Vector< T, NDIM > &r, const double eps=1.e-6)
helper function unit vector in direction r
Definition: array.h:546
NDIM const Function< R, NDIM > & g
Definition: mra.h:2179
const mpreal exp(const mpreal &v, mp_rnd_t rnd_mode)
Definition: mpreal.h:2234
FunctionFactory & functor2(const opT &op)
Definition: function_factory.h:136
const mpreal erf(const mpreal &v, mp_rnd_t rnd_mode)
Definition: mpreal.h:2457
const double R
Definition: dielectric.cc:191
Main include file for MADNESS and defines Function interface.
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:577
FunctionFactory< double, 6 > real_factory_6d
Definition: functypedefs.h:96
void truncate(World &world, std::vector< Function< T, NDIM > > &v, double tol=0.0, bool fence=true)
Truncates a vector of functions.
Definition: vmra.h:194
Function< T, NDIM > & fill_tree(const Function< R, NDIM > &g, bool fence=true)
With this being an on-demand function, fill the MRA tree according to different criteria.
Definition: mra.h:1060
Vector< double, 3 > coord_3d
Definition: funcplot.h:634
NDIM & f
Definition: mra.h:2179
static const double & get_thresh()
Returns the default threshold.
Definition: funcdefaults.h:225
double smallest_length_scale() const
Definition: DFcode/molecule.cc:300
Definition: DFcode/molecule.h:82
World & initialize(int &argc, char **&argv)
Initialize the MADNESS runtime.
Definition: world.cc:134
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
Tensor< typename Tensor< T >::scalar_type > arg(const Tensor< T > &t)
Return a new tensor holding the argument of each element of t (complex types only) ...
Definition: tensor.h:2429
Function< double, 3 > real_function_3d
Definition: functypedefs.h:65
Derivative< double, 3 > real_derivative_3d
Definition: functypedefs.h:170
std::shared_ptr< FunctionFunctorInterface< double, 3 > > functorT
Definition: chem/corepotential.cc:58
double q
Coordinates and charge in atomic units.
Definition: DFcode/molecule.h:56
int power< 2 >(int base)
Definition: power.h:58
SeparatedConvolution< double, 6 > real_convolution_6d
Definition: functypedefs.h:124
Vector< T, 1 > vec(T x)
Your friendly neighborhood factory function.
Definition: array.h:456
Function< T, NDIM > copy(const Function< T, NDIM > &f, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
Create a new copy of the function with different distribution and optional fence. ...
Definition: mra.h:1835
FunctionFactory & functor(const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > &f)
Definition: function_factory.h:129
const double N
Definition: navstokes_cosines.cc:94
double psi(const Vector< double, 3 > &r)
Definition: apps/ii/hatom_energy.cc:42
Function< double, 6 > real_function_6d
Definition: functypedefs.h:68
FLOAT a(int j, FLOAT z)
Definition: y1.cc:86
T normf() const
return the 2-norm of the vector elements
Definition: array.h:258
tensorT sqrt(const tensorT &s, double tol=1e-8)
Computes matrix square root (not used any more?)
Definition: DFcode/moldft.cc:446
Function< T, NDIM > square(const Function< T, NDIM > &f, bool fence=true)
Create a new function that is the square of f - global comm only if not reconstructed.
Definition: mra.h:1806
const mpreal gamma(const mpreal &v, mp_rnd_t rnd_mode)
Definition: mpreal.h:2429
Abstract Atom class.
Definition: DFcode/molecule.h:54
Vector< double, 6 > coord_6d
Definition: funcplot.h:635
Implements (2nd generation) static load/data balancing for functions.
virtual FunctionFactory & is_on_demand()
Definition: function_factory.h:227
Definition: tkato/SCF.h:52
void print(const A &a)
Print a single item to std::cout terminating with new line.
Definition: print.h:122
FunctionFactory< double, 3 > real_factory_3d
Definition: functypedefs.h:93
#define MADNESS_EXCEPTION(msg, value)
Definition: worldexc.h:88
double thresh() const
Returns value of truncation threshold. No communication.
Definition: mra.h:542
const T1 const T2 & f2
Definition: gtest-tuple.h:680
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
const double c
Definition: gfit.cc:200
const double R2
Definition: vnucso.cc:89
FLOAT b(int j, FLOAT z)
Definition: y1.cc:79
madness::Vector< double, 3 > get_coords() const
Definition: DFcode/molecule.h:70
double wall_time()
Returns the wall time in seconds relative to arbitrary origin.
Definition: world.cc:248
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