40#ifndef ELECTRONICSTRUCTUREAPP_H_
41#define ELECTRONICSTRUCTUREAPP_H_
64 if (n <= 3 || (n&0x1)) hash = key.
hash();
93 const bool&
periodic,
const std::vector<coordT>& specialpts)
117 for (
int xr = -1; xr <= 1; xr += 1)
119 double xx = x[0] + xr*
R;
121 if (xx < big && xx > -big)
123 for (
int yr = -1; yr <= 1; yr += 1)
125 double yy = x[1] + yr*
R;
127 if (yy < big && yy > -big)
129 for (
int zr = -1; zr <= 1; zr += 1)
131 double zz = x[2] + zr*
R;
133 if (zz < big && zz > -big)
176 r[0]=x;
r[1]=y;
r[2]=z;
181 tx[ir+
NTRANS] = exp(std::complex<double>(0.0,
kpt.
k[0]*ir *
R));
182 ty[ir+
NTRANS] = exp(std::complex<double>(0.0,
kpt.
k[1]*ir *
R));
183 tz[ir+
NTRANS] = exp(std::complex<double>(0.0,
kpt.
k[2]*ir *
R));
194 std::complex<double> value = 0.0;
197 const double xxR = xx*
R + x[0] -
r[0];
198 const double xxRsq = xxR*xxR;
201 const double yyR = yy*
R + x[1] -
r[1];
202 const double yyRsq = xxRsq + yyR*yyR;
205 double ao =
aofunc(xx*
R+x[0], yy*
R+x[1], zz*
R+x[2]);
206 if (fabs(ao) > 1
e-8) {
208 double kx0 =
kpt.
k[0] * x[0];
209 double kx1 =
kpt.
k[1] * x[1];
210 double kx2 =
kpt.
k[2] * x[2];
211 std::complex<double> t2 = exp(std::complex<double>(0.0, -kx0 - kx1 - kx2));
223 value =
aofunc(x[0], x[1], x[2]);
270 return r[0]*r[0] + r[1]*r[1] + r[2]*r[2];
Used to represent one basis function from a shell on a specific center.
Definition apps/periodic_old/molecularbasis.h:361
void get_coords(double &x, double &y, double &z) const
Definition apps/periodic_old/molecularbasis.h:408
Vector< std::complex< double >, 2 *NTRANS+1 > tx
Definition electronicstructureapp.h:165
Vector< std::complex< double >, 2 *NTRANS+1 > tz
Definition electronicstructureapp.h:167
const KPoint kpt
Definition electronicstructureapp.h:161
virtual std::vector< coordT > special_points() const
Override this to return list of special points to be refined more deeply.
Definition electronicstructureapp.h:187
coordT r
Definition electronicstructureapp.h:162
AtomicBasisFunctor(const AtomicBasisFunction &aofunc, double R, bool periodic, const KPoint kpt)
Definition electronicstructureapp.h:169
const AtomicBasisFunction aofunc
Definition preal.cc:79
const double R
Definition electronicstructureapp.h:158
const double rangesq
Definition electronicstructureapp.h:159
std::vector< coordT > _specialpts
Definition electronicstructureapp.h:163
Vector< std::complex< double >, 2 *NTRANS+1 > ty
Definition electronicstructureapp.h:166
const bool periodic
Definition electronicstructureapp.h:160
std::complex< double > operator()(const coordT &x) const
Definition electronicstructureapp.h:192
Definition electronicstructureapp.h:51
ProcessID owner(const Key< 3 > &key) const
Find the owner of a given key.
Definition electronicstructureapp.h:60
LevelPmap()
Definition electronicstructureapp.h:55
LevelPmap(World &world)
Definition electronicstructureapp.h:57
const int nproc
Definition electronicstructureapp.h:53
double nuclear_attraction_potential(double x, double y, double z) const
Definition mentity.cc:452
double smallest_length_scale() const
Definition mentity.cc:403
double nuclear_charge_density(double x, double y, double z) const
Definition mentity.cc:469
Definition electronicstructureapp.h:85
virtual Level special_level()
Override this change level refinement for special points (default is 6)
Definition electronicstructureapp.h:102
const MolecularEntity & _mentity
Definition electronicstructureapp.h:87
virtual std::vector< coordT > special_points() const
Override this to return list of special points to be refined more deeply.
Definition electronicstructureapp.h:97
double operator()(const coordT &x) const
Definition electronicstructureapp.h:107
const double R
Definition electronicstructureapp.h:88
const std::vector< coordT > _specialpts
Definition electronicstructureapp.h:90
const bool periodic
Definition electronicstructureapp.h:89
MolecularNuclearChargeDensityFunctor(const MolecularEntity &mentity, const double &R, const bool &periodic, const std::vector< coordT > &specialpts)
Definition electronicstructureapp.h:92
MolecularPotentialFunctor(const MolecularEntity &mentity)
Definition electronicstructureapp.h:75
const MolecularEntity & _mentity
Definition electronicstructureapp.h:73
double operator()(const coordT &x) const
Definition electronicstructureapp.h:79
Abstract base class interface required for functors used as input to Functions.
Definition function_interface.h:68
FunctionFunctorInterface()
Definition function_interface.h:77
Key is the index for a node of the 2^NDIM-tree.
Definition key.h:66
Level level() const
Definition key.h:159
hashT hash() const
Definition key.h:148
Key parent(int generation=1) const
Returns the key of the parent.
Definition key.h:187
Interface to be provided by any process map.
Definition worlddc.h:82
A parallel world class.
Definition world.h:132
double rsquared(const coordT &r)
Definition electronicstructureapp.h:269
#define NTRANS
Definition electronicstructureapp.h:153
Vector< double, 3 > coordT
Definition ewald.cc:9
Vector< double, 3 > coordT
Definition mcpfit.cc:48
Main include file for MADNESS and defines Function interface.
int Level
Definition key.h:55
std::size_t hashT
The hash value type.
Definition worldhash.h:145
coordT k
Definition esolver.h:138
void e()
Definition test_sig.cc:75
int ProcessID
Used to clearly identify process number/rank.
Definition worldtypes.h:43