MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
hsoshftmpl.h
1
2namespace sc {
3
5 private:
6 double * const gmat;
7 double * const gmato;
8 double * const pmat;
9 double * const pmato;
10
11 public:
12 LocalHSOSContribution(double *g, double *p, double *go, double *po) :
13 gmat(g), gmato(go), pmat(p), pmato(po) {}
15
16 void set_bound(double,double) {};
17
18 inline void cont1(int ij, int kl, double val) {
19 gmat[ij] += val*pmat[kl];
20 gmat[kl] += val*pmat[ij];
21 }
22
23 inline void cont2(int ij, int kl, double val) {
24 val *= 0.25;
25 gmat[ij] -= val*pmat[kl];
26 gmat[kl] -= val*pmat[ij];
27
28 gmato[ij] += val*pmato[kl];
29 gmato[kl] += val*pmato[ij];
30 }
31
32 inline void cont3(int ij, int kl, double val) {
33 val *= 0.5;
34 gmat[ij] -= val*pmat[kl];
35 gmat[kl] -= val*pmat[ij];
36
37 gmato[ij] += val*pmato[kl];
38 gmato[kl] += val*pmato[ij];
39 }
40
41 inline void cont4(int ij, int kl, double val) {
42 gmat[ij] += 0.75*val*pmat[kl];
43 gmat[kl] += 0.75*val*pmat[ij];
44
45 gmato[ij] += 0.25*val*pmato[kl];
46 gmato[kl] += 0.25*val*pmato[ij];
47 }
48
49 inline void cont5(int ij, int kl, double val) {
50 val *= 0.5;
51 gmat[ij] += val*pmat[kl];
52 gmat[kl] += val*pmat[ij];
53
54 gmato[ij] += val*pmato[kl];
55 gmato[kl] += val*pmato[ij];
56 }
57};
58
60 private:
61 double * const pmat;
62 double * const pmato;
63
64 public:
65 double ec;
66 double ex;
67
68 void set_bound(double,double) {};
69
70 LocalHSOSEnergyContribution(double *p, double *po) : pmat(p), pmato(po) {
71 ec=ex=0;
72 }
73
75
76 inline void cont1(int ij, int kl, double val) {
77 ec += val*pmat[ij]*pmat[kl];
78 }
79
80 inline void cont2(int ij, int kl, double val) {
81 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
82 }
83
84 inline void cont3(int ij, int kl, double val) {
85 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
86 }
87
88 inline void cont4(int ij, int kl, double val) {
89 ec += val*pmat[ij]*pmat[kl];
90 ex -= 0.25*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
91 }
92
93 inline void cont5(int ij, int kl, double val) {
94 ec += val*pmat[ij]*pmat[kl];
95 ex -= 0.5*val*(pmat[ij]*pmat[kl] + pmato[ij]*pmato[kl]);
96 }
97};
99 private:
100 double * const pmat;
101 double * const pmato;
102
103 public:
104 LocalHSOSGradContribution(double *p, double *po) : pmat(p), pmato(po) {}
106
107 inline double cont1(int ij, int kl) {
108 return pmat[ij]*pmat[kl] +
109 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl]) +
110 0.25*pmato[ij]*pmato[kl];
111 }
112
113 inline double cont2(int ij, int kl) {
114 return pmat[ij]*pmat[kl] +
115 0.5*(pmato[ij]*pmat[kl] + pmat[ij]*pmato[kl] + pmato[ij]*pmato[kl]);
116 }
117};
118
119} // namespace sc
Definition hsoshftmpl.h:4
Definition hsoshftmpl.h:59
Definition hsoshftmpl.h:98
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.