58#define THREE std::setw(3) << std::setfill(' ')
61#define FOUR std::setw(4) << std::setfill(' ')
64#define FIVE std::setw(5) << std::setfill(' ')
67#define SIX std::setw(6) << std::setfill(' ')
70#define SEVEN std::setw(7) << std::setfill(' ')
73#define HEIGHT std::setw(8) << std::setfill(' ')
76#define NINE std::setw(9) << std::setfill(' ')
111 struct timeval start, interm,
stop;
136 unsigned int LI[35][3];
250 std::vector<criticalpoint> cpList;
306 void IGM(
double** chi,
double** phi,
307 double* dx,
double* dy,
double* dz,
double** gradPrim,
308 double &deltagIntraCURRENT,
double &deltagInterCURRENT,
double &qgIntraCURRENT,
double &qgInterCURRENT);
329void gradAtomHirsh(
bool fullRHOGRAD,
unsigned int threadID,
double rho,
double gradrho[3],
330 double*** dx,
double*** dy,
double*** dz,
int ip,
331 double* rhoFree,
double *pregradFree,
double** gradAtom,
double* rhoAtom);
340void gradAtomGBP(
unsigned int nbPrim,
unsigned int* prim,
double** gradPrim,
double** gradAtom);
352void IGMH(
double** gradAtom,
double &deltagIntraCURRENT,
double &deltagInterCURRENT,
double &qgIntraCURRENT,
double &qgInterCURRENT);
360void IGMBDA(
double *gradAtom1QM,
double *gradAtom2QM,
double &bda);
404using FunctionType = double (*)(double, double);
405static FunctionType functions[];
406static FunctionType derivatives[];
421 NCISolver(
const char* parameterFileName,
bool logParam =
true);
458 unsigned int*
index0(
const unsigned int i);
465 unsigned int index1(
const unsigned int i);
507void calcQMAO(
unsigned int nbPrim,
unsigned int* prim,
double* d2,
double* dx,
double* dy,
double* dz,
double** chi);
520void calcQMPROP(
unsigned int nbPrim,
unsigned int* prim,
double** chi,
double** phi,
double &rho,
double* grad,
double** hess);
538bool NewtonRaphson(
unsigned int nbPrim,
unsigned int* prim,
double rcurr[3],
double L[3],
double &G,
double &rhocp,
double &gradrhocp);
545int cptype(
double L123[3]);
557void basischange(
unsigned int nbPrim,
unsigned int* prim,
double matrixHessianEigVec[3][3],
558 double **chi,
double* dx,
double* dy,
double* dz,
double **phi,
double gg[3]);
568void IGMPRO(
double *dx,
double *dy,
double *dz,
double &deltag,
double &qg);
577void gradPRO(
double *dx,
double *dy,
double *dz,
double **gradAtom);
594void rhogradlap(
unsigned int atIndex1,
unsigned int atIndex2,
double* rhoFree,
double* pregradFree,
595 double* sumSquareBRho,
double* dx,
double* dy,
double* dz,
double* dist,
596 double &rhopro,
double &normgradpro,
double &lap);
606static double func0(
double r,
double alpha);
615static double func1(
double r,
double alpha);
625static double func2(
double r,
double alpha);
633static double func3(
double r,
double alpha);
640static double func4(
double r,
double alpha);
651 double tolerance = 0.010,
652 int maxIterations = 100,
653 double initialGuess = 0.01
Worker for one Node of the NCI grid.
double getPredictedSize()
Return the predicted size of the ouput in MB.
Definition NCISolver.cpp:7814
void IGMPRO(double *dx, double *dy, double *dz, double &deltag, double &qg)
compute the deltag descriptor at current point
Definition NCISolver.cpp:10247
double * primRmin
Array to store the minimum radius below which a primitive has to be computed (scalProd speedup test)
Definition NCISolver.h:200
void solve()
Solves the problem.
Definition NCISolver.cpp:6641
double MOoccupied
The number of MO occupied with occupancy >=0.1.
Definition NCISolver.h:223
void rhoFree__pregradFree(double *dist, double *rhoFree, double *pregradFree)
Compute quantities needed to compute next rho and gradrho at the promol level.
Definition NCISolver.cpp:8930
unsigned int * nprimbond
Definition NCISolver.h:197
void IGMBDA(double *gradAtom1QM, double *gradAtom2QM, double &bda)
Compute the deltagInter quantity between two given atoms of a bond and the associated BDA based on HI...
Definition NCISolver.cpp:9309
bool runinfostate
runinfo file state (timing info for users printed by
Definition NCISolver.h:115
int cptype(double L123[3])
determine the signature of the critical point (algebrix sum of the signs of the three eigenvalues)
Definition NCISolver.cpp:10133
unsigned int * fragAIndexToFragPrimIndex
An array converting indexes of fragAPrim to indexes of fragPrim.
Definition NCISolver.h:173
void IGMH(double **gradAtom, double &deltagIntraCURRENT, double &deltagInterCURRENT, double &qgIntraCURRENT, double &qgInterCURRENT)
Compute the deltagIntra and deltagInter quantities.
Definition NCISolver.cpp:9187
~NCISolver()
Destructor.
Definition NCISolver.cpp:1867
param_t params
Problem's parameters.
Definition NCISolver.h:92
unsigned int LI[35][3]
For index0.
Definition NCISolver.h:136
void findmaxc()
find the maximum value for primitive coefficients accross the MOs
Definition NCISolver.cpp:9852
bool * inMoleculeA
Array to store the membership of each primitives of Fragment A.
Definition NCISolver.h:184
std::string score()
Return a string with the interaction's score.
Definition NCISolver.cpp:7617
Node ** nodes
A program node used by threads.
Definition NCISolver.h:103
static double maxElectron
The accuracy required for atomic orbitals calculation (speed-up procedure by J. Pilme)
Definition NCISolver.h:181
std::vector< int > atomTypeNb
List of the number of atoms for each atom type.
Definition NCISolver.h:234
double rhopromolFRAG1FRAG2(double *rhoFree)
Compute the free promol ED for FRAG1+FRAG2 system.
Definition NCISolver.cpp:8963
unsigned int * fragBPrim
the list (array) of primitives of fragment B
Definition NCISolver.h:163
unsigned int * allPrim
the list (array) of ALL primitives
Definition NCISolver.h:168
NCISolver(const char *parameterFileName, bool logParam=true)
Main constructor.
Definition NCISolver.cpp:58
unsigned int nbPrimInA
the number of primitives in fragment A (Cube mode)
Definition NCISolver.h:190
unsigned int * index0(const unsigned int i)
get the triplet (i,j,k) defining a GTO (or STO) from a code in the range [0:34]
Definition NCISolver.cpp:7624
int currentPercentage
Current completion in percent.
Definition NCISolver.h:124
void calcQMAO(unsigned int nbPrim, unsigned int *prim, double *d2, double *dx, double *dy, double *dz, double **chi)
Compute primitives from WFX/WFN data at current grid point.
Definition NCISolver.cpp:9326
double rhoHIRSHFRAG1FRAG2(double rhoQM, double *rhoFree)
estimated QM ED for the FRAG1+FRAG2 system from HIRSHFELD partition
Definition NCISolver.cpp:9111
Results * results
Results' values.
Definition NCISolver.h:100
void gradPRO(double *dx, double *dy, double *dz, double **gradAtom)
compute the promolecular ED gradient at current point
Definition NCISolver.cpp:10314
void calcQMPROP(unsigned int nbPrim, unsigned int *prim, double **chi, double **phi, double &rho, double *grad, double **hess)
Compute primitives and MOs from WFX/WFN data at current grid point.
Definition NCISolver.cpp:9739
void initializeL3()
Tool procedure that initializes L3 array (s,p,d,f,g GTOs)
Definition NCISolver.cpp:7738
struct NCISolver::point point
structure to save 3D point (triplet of doubles)
double coreElecWFN
The number of core electrons (BDA calculations only account for valence orbitals)
Definition NCISolver.h:220
axis_t * posGrid
Array with current grid position.
Definition NCISolver.h:106
unsigned int COREHeavyAtomWarning
Boolean flag to indicate if one atom exceeds the upper atomic number limit for BDA treatment.
Definition NCISolver.h:211
void rhoFree__pregradFree_sumSquareBRho(double *dist, double *rhoFree, double *pregradFree, double *sumSquareBRho)
Compute quantities needed to compute next rho and gradrho at the promol level.
Definition NCISolver.cpp:8891
void basischange(unsigned int nbPrim, unsigned int *prim, double matrixHessianEigVec[3][3], double **chi, double *dx, double *dy, double *dz, double **phi, double gg[3])
changes the basis for several vectors of the QM calculation
Definition NCISolver.cpp:10157
unsigned int nbThreads
The number of threads for the current run.
Definition NCISolver.h:145
void setChemFormula()
establish the chemical formula of the studied system
Definition NCISolver.cpp:8351
double total
Total dg inter.
Definition NCISolver.h:130
unsigned int * fragPrim
the list (array) of primitives to be considered in the IGM QM calculations
Definition NCISolver.h:152
double elecNumb
The total theoretical number of electrons.
Definition NCISolver.h:214
bool NewtonRaphson(unsigned int nbPrim, unsigned int *prim, double rcurr[3], double L[3], double &G, double &rhocp, double &gradrhocp)
performs a Newton-Raphson procedure to get the Critical point closest to the guess passed in paramete...
Definition NCISolver.cpp:9872
void setCOREMOandELEC()
count the number of core MOs and electrons
Definition NCISolver.cpp:8144
ProgData * data
Problem's data.
Definition NCISolver.h:95
void calcprops_wfn_cyl()
IBSI + BDA calculations, no cube generated.
Definition NCISolver.cpp:5015
int zyAxisSize
Number of row in the grid.
Definition NCISolver.h:118
unsigned int * fragAPrim
the list (array) of primitives of fragment A
Definition NCISolver.h:158
unsigned int * fragBIndexToFragPrimIndex
An array converting indexes of fragAPrim to indexes of fragPrim.
Definition NCISolver.h:177
void getLambdaOfHessian(double **hessian, double *eigenValues, double **eigenVect)
Using the eig3 implementation of diagonalisation.
Definition NCISolver.cpp:7784
std::vector< moleculeOrbital > molecularOrbitals
the set of expressions of MOs read from the WFN/WFX
Definition NCISolver.h:246
void findRminAllPrim()
function that compute the minimum radius for all primitives
unsigned int L3[35]
For index1.
Definition NCISolver.h:139
double * maxc
the maximum value of primitive coefficient accross the MOs
Definition NCISolver.h:240
void setIBSIPrimList()
filtering primitives according to the cutoff radius around atom pairs
Definition NCISolver.cpp:8007
unsigned int npri
the size of the basis set read from WFN
Definition NCISolver.h:243
void lineProcessing(int posY, int posZ, int cubePosYZ)
Process all the information for an entire line of the grid.
Definition NCISolver.cpp:7438
void gradAtomGBP(unsigned int nbPrim, unsigned int *prim, double **gradPrim, double **gradAtom)
Compute the atomic contribution to the ED gradient according to the GBP partition.
Definition NCISolver.cpp:9143
unsigned int nbPrimInB
the number of primitives in fragment B (Cube mode)
Definition NCISolver.h:193
void setDensityMatrixForPauli(double **D)
compute matrix density elements from wave function
Definition NCISolver.cpp:7825
struct timeval start interm stop
start and stop time to provide timing info for the user
Definition NCISolver.h:111
unsigned long int fullSize
Number of nodes in the grid.
Definition NCISolver.h:121
unsigned int index1(const unsigned int i)
identify which kind of AO it is
Definition NCISolver.cpp:7642
double WFNelecNumb
The real number of electrons reac from WFN.
Definition NCISolver.h:217
unsigned int ** primbond
the list (array) of primitives to be considered in the IBSI calculation
Definition NCISolver.h:237
void initializeLI()
Tool procedure that initializes LI array (36 GTO types)
Definition NCISolver.cpp:7664
std::vector< int > atomTypeList
List of atom types present in the system.
Definition NCISolver.h:231
void setPrimList()
filtering primitives according to fragment definitions
Definition NCISolver.cpp:7869
void IGM(double **chi, double **phi, double *dx, double *dy, double *dz, double **gradPrim, double &deltagIntraCURRENT, double &deltagInterCURRENT, double &qgIntraCURRENT, double &qgInterCURRENT)
compute the deltagIntra and deltagIntrer in cartesian coordinates (not cylindrical)
Definition NCISolver.cpp:8386
bool * inMoleculeB
Array to store the membership of each primitives of Fragment B.
Definition NCISolver.h:187
unsigned int fragNbPrim
The number of primitives to be considered in the IGM WFN( WFX) calculations (cube mode)
Definition NCISolver.h:148
void calcprops_wfn()
IGM dg dgInter dgIntra CUBE calculations.
Definition NCISolver.cpp:1897
bool getRuninfostate()
Return the runinfo state (true = built by printCurrentState)
Definition NCISolver.cpp:7819
double max
Maximum percent value.
Definition NCISolver.h:133
void gradAtomHirsh(bool fullRHOGRAD, unsigned int threadID, double rho, double gradrho[3], double ***dx, double ***dy, double ***dz, int ip, double *rhoFree, double *pregradFree, double **gradAtom, double *rhoAtom)
Compute the atomic contribution to the ED gradient according to the Hirschfeld partition.
Definition NCISolver.cpp:8716
void output()
Outputs according the output type given in the parameters.
Definition NCISolver.cpp:7467
bool log
Activates logs.
Definition NCISolver.h:127
double predictedSize
Predicted size of the data on HDD.
Definition NCISolver.h:142
double findRmin(int GTOType, double alpha, double tolerance=0.010, int maxIterations=100, double initialGuess=0.01)
function that takes as input the type (s,p,d,f,g) of GTO and its alpha exponent and returns a radius ...
Definition NCISolver.cpp:10364
Class used to handle every node data storage and processing ; implemented for multiprocessing impleme...
Definition Node.h:59
Class designed to store the program's main dataprovide some utilities concerning those.
Definition ProgData.h:65
Class designed to store all results that can be used as output by the program.
Definition Results.h:67
structure to save 3D point (triplet of doubles)
Definition NCISolver.h:411
double x
x,y,z coordinates
Definition NCISolver.h:413
Structure describing one axis.
Definition general.h:694
Structure used for the storage of the parameters read from the parameter file param....
Definition general.h:560