1 | //
|
---|
2 | // eri_quartet_data.h
|
---|
3 | //
|
---|
4 | // Copyright (C) 2001 Edward Valeev
|
---|
5 | //
|
---|
6 | // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu>
|
---|
7 | // Maintainer: EV
|
---|
8 | //
|
---|
9 | // This file is part of the SC Toolkit.
|
---|
10 | //
|
---|
11 | // The SC Toolkit is free software; you can redistribute it and/or modify
|
---|
12 | // it under the terms of the GNU Library General Public License as published by
|
---|
13 | // the Free Software Foundation; either version 2, or (at your option)
|
---|
14 | // any later version.
|
---|
15 | //
|
---|
16 | // The SC Toolkit is distributed in the hope that it will be useful,
|
---|
17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | // GNU Library General Public License for more details.
|
---|
20 | //
|
---|
21 | // You should have received a copy of the GNU Library General Public License
|
---|
22 | // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
|
---|
23 | // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
24 | //
|
---|
25 | // The U.S. Government is granted a limited license as per AL 91-7.
|
---|
26 | //
|
---|
27 |
|
---|
28 | #ifndef _chemistry_qc_cints_eriquartetdata_h
|
---|
29 | #define _chemistry_qc_cints_eriquartetdata_h
|
---|
30 |
|
---|
31 | #include <util/misc/math.h>
|
---|
32 |
|
---|
33 | /*--------------------------------------------------------------------------------
|
---|
34 | This function computes constants used in OSRR for a given quartet of primitives
|
---|
35 | --------------------------------------------------------------------------------*/
|
---|
36 | inline void EriCints::eri_quartet_data_(prim_data *Data, double scale)
|
---|
37 | {
|
---|
38 | #define STATIC_OO2NP1
|
---|
39 | #include "static.h"
|
---|
40 |
|
---|
41 | /*----------------
|
---|
42 | Local variables
|
---|
43 | ----------------*/
|
---|
44 | double P[3], Q[3], PQ[3], W[3];
|
---|
45 | double small_T = 1E-15; /*--- Use only one term in Taylor expansion of Fj(T) if T < small_T ---*/
|
---|
46 |
|
---|
47 | int p1 = quartet_info_.p1;
|
---|
48 | int p2 = quartet_info_.p2;
|
---|
49 | int p3 = quartet_info_.p3;
|
---|
50 | int p4 = quartet_info_.p4;
|
---|
51 |
|
---|
52 | double a1 = int_shell1_->exponent(quartet_info_.p1);
|
---|
53 | double a2 = int_shell2_->exponent(quartet_info_.p2);
|
---|
54 | double a3 = int_shell3_->exponent(quartet_info_.p3);
|
---|
55 | double a4 = int_shell4_->exponent(quartet_info_.p4);
|
---|
56 |
|
---|
57 | prim_pair_t* pair12;
|
---|
58 | prim_pair_t* pair34;
|
---|
59 | if (!quartet_info_.p13p24) {
|
---|
60 | pair12 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2);
|
---|
61 | pair34 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4);
|
---|
62 | }
|
---|
63 | else {
|
---|
64 | pair12 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4);
|
---|
65 | pair34 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2);
|
---|
66 | }
|
---|
67 |
|
---|
68 | double zeta = pair12->gamma;
|
---|
69 | double eta = pair34->gamma;
|
---|
70 | double ooz = 1.0/zeta;
|
---|
71 | double oon = 1.0/eta;
|
---|
72 | double oozn = 1.0/(zeta+eta);
|
---|
73 | Data->poz = eta*oozn;
|
---|
74 | double rho = zeta*Data->poz;
|
---|
75 |
|
---|
76 | double t1 = M_PI*ooz;
|
---|
77 | double t2 = M_PI*oon;
|
---|
78 | double pfac_norm = int_shell1_->coefficient_unnorm(quartet_info_.gc1,p1)*
|
---|
79 | int_shell2_->coefficient_unnorm(quartet_info_.gc2,p2)*
|
---|
80 | int_shell3_->coefficient_unnorm(quartet_info_.gc3,p3)*
|
---|
81 | int_shell4_->coefficient_unnorm(quartet_info_.gc4,p4);
|
---|
82 | double pfac = 2.0*sqrt(rho*M_1_PI)*scale*pair12->ovlp*pair34->ovlp*pfac_norm;
|
---|
83 |
|
---|
84 | P[0] = pair12->P[0];
|
---|
85 | P[1] = pair12->P[1];
|
---|
86 | P[2] = pair12->P[2];
|
---|
87 | Q[0] = pair34->P[0];
|
---|
88 | Q[1] = pair34->P[1];
|
---|
89 | Q[2] = pair34->P[2];
|
---|
90 | PQ[0] = P[0] - Q[0];
|
---|
91 | PQ[1] = P[1] - Q[1];
|
---|
92 | PQ[2] = P[2] - Q[2];
|
---|
93 | double PQ2 = PQ[0]*PQ[0];
|
---|
94 | PQ2 += PQ[1]*PQ[1];
|
---|
95 | PQ2 += PQ[2]*PQ[2];
|
---|
96 | double T = rho*PQ2;
|
---|
97 |
|
---|
98 | if (!quartet_info_.am) {
|
---|
99 | double *fjttable = Fm_Eval_->values(0,T);
|
---|
100 | Data->F[0] = fjttable[0]*pfac;
|
---|
101 | }
|
---|
102 | else {
|
---|
103 | Data->oo2zn = 0.5*oozn;
|
---|
104 | Data->pon = zeta*oozn;
|
---|
105 | Data->oo2z = 0.5/zeta;
|
---|
106 | Data->oo2n = 0.5/eta;
|
---|
107 | W[0] = (zeta*P[0] + eta*Q[0])*oozn;
|
---|
108 | W[1] = (zeta*P[1] + eta*Q[1])*oozn;
|
---|
109 | W[2] = (zeta*P[2] + eta*Q[2])*oozn;
|
---|
110 |
|
---|
111 | if(T < small_T){
|
---|
112 | for(int i=0; i<=quartet_info_.am; i++)
|
---|
113 | Data->F[i] = oo2np1[i]*pfac;
|
---|
114 | }
|
---|
115 | else {
|
---|
116 | double *fjttable = Fm_Eval_->values(quartet_info_.am,T);
|
---|
117 | for(int i=0;i<=quartet_info_.am;i++)
|
---|
118 | Data->F[i] = fjttable[i]*pfac;
|
---|
119 | }
|
---|
120 |
|
---|
121 | /* PA */
|
---|
122 | Data->U[0][0] = P[0] - quartet_info_.A[0];
|
---|
123 | Data->U[0][1] = P[1] - quartet_info_.A[1];
|
---|
124 | Data->U[0][2] = P[2] - quartet_info_.A[2];
|
---|
125 | /* QC */
|
---|
126 | Data->U[2][0] = Q[0] - quartet_info_.C[0];
|
---|
127 | Data->U[2][1] = Q[1] - quartet_info_.C[1];
|
---|
128 | Data->U[2][2] = Q[2] - quartet_info_.C[2];
|
---|
129 | /* WP */
|
---|
130 | Data->U[4][0] = W[0] - P[0];
|
---|
131 | Data->U[4][1] = W[1] - P[1];
|
---|
132 | Data->U[4][2] = W[2] - P[2];
|
---|
133 | /* WQ */
|
---|
134 | Data->U[5][0] = W[0] - Q[0];
|
---|
135 | Data->U[5][1] = W[1] - Q[1];
|
---|
136 | Data->U[5][2] = W[2] - Q[2];
|
---|
137 | }
|
---|
138 |
|
---|
139 | return;
|
---|
140 | }
|
---|
141 |
|
---|
142 | #endif
|
---|
143 |
|
---|
144 | // Local Variables:
|
---|
145 | // mode: c++
|
---|
146 | // c-file-style: "CLJ"
|
---|
147 | // End:
|
---|