37 #ifndef _DFT_COMMON_H_ 38 #define _DFT_COMMON_H_ 44 #define EXTERN_C extern "C" 102 virtual void getAtom(
int icent,
int *cnt,
real (*coor)[3],
103 int *
charge,
int *mult)
const;
107 int *nblcnt,
int (*iblcks)[2])
const;
110 int *nblcnt,
int (*iblcks)[2])
const;
111 virtual void getExps(
int *maxl,
int **nucbas,
real (**aa)[2])
const;
116 int *norbbl,
int (*orbblock)[2],
125 #define dal_new(sz,tp) (tp*)dal_malloc_((sz)*sizeof(tp),__FUNCTION__, __LINE__) 126 void*
dal_malloc_(
size_t sz,
const char *func,
unsigned line);
128 #define dal_malloc(sz) dal_malloc_((sz),__FUNCTION__, __LINE__) 154 printf(
"B:(%8.2f %8.2f %8.2f)-(%8.2f %8.2f %8.2f): %8.2f %8.2f %8.2f ",
158 for(
int i=0; i<3; i++)
159 if(p[i]<
lo[i] || p[i] >=
hi[i]) {
171 template<
typename Iterator>
176 throw "BoundingBox called for empty set";
178 real r = start->radius() + OFF;
179 for(
int i=0; i<3; i++) {
180 box.
lo[i] = start->center[i]-r;
181 box.
hi[i] = start->center[i]+r;
184 for(++start; start != end; ++start) {
185 real r = start->radius() + OFF;
186 for(
int i=0; i<3; i++) {
187 real l = start->center[i]-r;
if (l<box.
lo[i]) box.
lo[i] = l;
188 real h = start->center[i]+r;
if (h>box.
hi[i]) box.
hi[i] = h;
EXTERN_C void dft_set_num_threads(int nThreads)
Definition: dft_common.cc:226
int ZEROI
Definition: dft_common.cc:64
int ONEI
Definition: dft_common.cc:64
double ergo_real
Definition: realtype.h:69
const Molecule & molecule
Definition: dft_common.h:97
real fRG
Definition: dft_common.h:78
int getMaxDim() const
Return the index of the largest Cartesian dimension: 0 for x, 1 for y and 2 for z.
Definition: dft_common.cc:111
virtual ~ErgoMolInfo()
Definition: dft_common.cc:583
Definition: functionals.h:375
A vector of first order derivatives with respect to two parameters: density rho and SQUARE of the gra...
Definition: dft_common.h:60
bool contains(const real *p) const
Determines whether given point is inside the box.
Definition: dft_common.h:152
real getDistanceTo(const real *v) const
Returns the shortest distance of the border of the box to the specified point in space.
Definition: dft_common.cc:90
Code for setting up basis functions starting from shells.
real fZ
Definition: dft_common.h:62
Representation of a molecule as a set of nuclei and total charge.
Definition: molecule.h:87
real size(int dim) const
Definition: dft_common.h:141
ergo_real real
Definition: test.cc:46
real fZG
Definition: dft_common.h:79
int THREEI
Definition: dft_common.cc:64
Implements shared parts of the grid generation code.
Definition of the main floating-point datatype used; the ergo_real type.
void getBlocks1(const real *center, real cellsz, const real *rshell, int *nblcnt, int(*iblcks)[2]) const
get blocks of active SHELLS in cube of CELLSZ size centered at CENTER.
Definition: dft_common.cc:352
virtual void getExps(int *maxl, int **nucbas, real(**aa)[2]) const
ergo_get_exps() generates a list of exponents for every center as in mol_info table: number of gaussi...
Definition: dft_common.cc:648
real fRR
Definition: dft_common.h:73
real fR
Definition: dft_common.h:71
real fGG
Definition: dft_common.h:80
real ZEROR
Definition: dft_common.cc:65
virtual void getBlocks(const real *center, real cellsz, const real *rshell, int *nblcnt, int(*iblcks)[2]) const
same as ergo_get_shlblocks, except it should scale NlogN.
Definition: dft_common.cc:593
ShellTree * shellTree
Definition: dft_common.h:112
real fZ
Definition: dft_common.h:72
Class that allows to find in NLogN time all shells that overlap with a given box. ...
Definition: dft_common.cc:386
bool overlapsWith(const real *center, real radius) const
Definition: dft_common.h:143
int FOURI
Definition: dft_common.cc:64
real TWOR
Definition: dft_common.cc:65
Definition: basisinfo.h:112
Class Box provides an ability to determine box containing all Objects.
Definition: dft_common.h:137
Header file with typedefs for matrix and vector types.
void getBoundingBox(Box &box, Iterator start, Iterator end)
Definition: dft_common.h:172
EXTERN_C int dft_setfunc(const char *line)
Definition: dft_common.cc:277
GridGenMolInfo is an abstract class providing information about the molecule so that the grid generat...
Definition: grid_interface.h:45
real fR
Definition: dft_common.h:61
ErgoMolInfo(const BasisInfoStruct &bis_, const Molecule &mol)
Ther standard constructor.
Definition: dft_common.cc:573
EXTERN_C void dftpot1_(SecondDrv *ds, const real *w, const FunDensProp *dp, const int *triplet)
Definition: dft_common.cc:776
int charge
Definition: grid_test.cc:51
const BasisInfoStruct & bis
Definition: dft_common.h:96
EXTERN_C void ergoShellsToOrbs(const int *nshlbl, const int(*shlblock)[2], int *norbbl, int(*orbblock)[2], const BasisInfoStruct &bis)
transform shell block indices to orbital block indices.
Definition: dft_common.cc:708
real hi[3]
Definition: dft_common.h:168
virtual void getAtom(int icent, int *cnt, real(*coor)[3], int *charge, int *mult) const
Return atom data.
Definition: dft_common.cc:305
EXTERN_C void dft_init(void)
Definition: dft_common.cc:195
Definition: dft_common.h:70
int sync_threads(bool release, int nThreads)
creates or destroys a barrier for nThreads.
Definition: dft_common.cc:137
Functional library interface.
EXTERN_C int dft_get_num_threads()
Definition: dft_common.cc:203
void * dal_malloc_(size_t sz, const char *func, unsigned line)
Definition: dft_common.cc:68
real fZZ
Definition: dft_common.h:75
Ergo specific implementation of molecule-grid interface.
Definition: dft_common.h:95
real ONER
Definition: dft_common.cc:65
real fRZ
Definition: dft_common.h:74
virtual void setShellRadii(real *shellRadii) const
Definition: dft_common.cc:317
EXTERN_C void dftpot0_(FirstDrv *ds, const real *weight, const FunDensProp *dp)
Definition: dft_common.cc:766
#define EXTERN_C
Definition: dft_common.h:46
real fG
Definition: dft_common.h:81
real lo[3]
Definition: dft_common.h:167
real FOURR
Definition: dft_common.cc:65