3
\brief Driver for the computation of first derivatives.
10
#include<libipv1/ip_lib.h>
12
#include<libciomr/libciomr.h>
13
#include<libint/libint.h>
14
#include<libchkpt/chkpt.h>
21
#include"compute_scf_opdm.h"
22
#include"read_gen_opdm.h"
23
#include"enuc_deriv1.h"
25
#include"oe_deriv1_ints.h"
26
#include"te_deriv1_scf.h"
27
#include"te_deriv1_corr.h"
28
#include"te_deriv1_ints.h"
29
#include"symmetrize_deriv1.h"
36
pthread_mutex_t deriv1_mutex;
41
/* Either contract integrals with the densities ... */
42
if (UserOptions.symm_ints == 0) {
43
/*--- Gradient in the canonical frame ---*/
44
Grad = block_matrix(Molecule.num_atoms,3);
46
if (UserOptions.empirical_dispersion) {
47
double *oldgrad = chkpt_rd_grad();
48
for (int i=0,j=0; i<Molecule.num_atoms; i++) {
49
Grad[i][0] = oldgrad[j++];
50
Grad[i][1] = oldgrad[j++];
51
Grad[i][2] = oldgrad[j++];
56
if (Molecule.num_atoms != 0) {
57
if ((!strcmp(UserOptions.wfn,"SCF")) ||
58
(!strcmp(UserOptions.wfn,"SCF_MVD"))) {
66
if (!strcmp(UserOptions.wfn,"SCF_MVD")) {
70
if ((!strcmp(UserOptions.wfn,"SCF")) ||
71
(!strcmp(UserOptions.wfn,"SCF_MVD")))
77
if ((!strcmp(UserOptions.wfn,"SCF")) ||
78
(!strcmp(UserOptions.wfn,"SCF_MVD")))
84
chkpt_wt_grad(Grad[0]);
87
/* ... or compute integrals alone */