MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
grt_quartet_data.h
1//
2// grt_quartet_data.h
3//
4// Copyright (C) 2001 Edward Valeev
5//
6// Author: Edward Valeev <evaleev@vt.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_libint2_grtquartetdata_h
29#define _chemistry_qc_libint2_grtquartetdata_h
30
31#include <math.h>
32
33namespace sc {
34
35/*--------------------------------------------------------------------------------
36 This function computes constants used in OSRR for a given quartet of primitives
37 --------------------------------------------------------------------------------*/
38inline void GRTLibint2::grt_quartet_data_(prim_data *Data, double scale)
39{
40#define STATIC_OO2NP1
41#include "static.h"
42
43 /*----------------
44 Local variables
45 ----------------*/
46 double P[3], Q[3], PQ[3], W[3];
47 double small_T = 1E-15; /*--- Use only one term in Taylor expansion of Fj(T) if T < small_T ---*/
48
49 int p1 = quartet_info_.p1;
50 int p2 = quartet_info_.p2;
51 int p3 = quartet_info_.p3;
52 int p4 = quartet_info_.p4;
53
54 double a1 = int_shell1_->exponent(quartet_info_.p1);
55 double a2 = int_shell2_->exponent(quartet_info_.p2);
56 double a3 = int_shell3_->exponent(quartet_info_.p3);
57 double a4 = int_shell4_->exponent(quartet_info_.p4);
58
59 prim_pair_t* pair12;
60 prim_pair_t* pair34;
61 if (!quartet_info_.p13p24) {
62 pair12 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2);
63 pair34 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4);
64 }
65 else {
66 pair12 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4);
67 pair34 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2);
68 }
69
70 Data->twozeta_a = 2.0*a1;
71 Data->twozeta_b = 2.0*a2;
72 Data->twozeta_c = 2.0*a3;
73 Data->twozeta_d = 2.0*a4;
74 double zeta = pair12->gamma;
75 double eta = pair34->gamma;
76 double ooz = 1.0/zeta;
77 double oon = 1.0/eta;
78 double oozn = 1.0/(zeta+eta);
79 Data->poz = eta*oozn;
80 double rho = zeta*Data->poz;
81 Data->oo2p = 0.5/rho;
82
83 double pfac_norm = int_shell1_->coefficient_unnorm(quartet_info_.gc1,p1)*
84 int_shell2_->coefficient_unnorm(quartet_info_.gc2,p2)*
85 int_shell3_->coefficient_unnorm(quartet_info_.gc3,p3)*
86 int_shell4_->coefficient_unnorm(quartet_info_.gc4,p4);
87 double pfac = 2.0*sqrt(rho*M_1_PI)*scale*pair12->ovlp*pair34->ovlp*pfac_norm;
88
89 P[0] = pair12->P[0];
90 P[1] = pair12->P[1];
91 P[2] = pair12->P[2];
92 Q[0] = pair34->P[0];
93 Q[1] = pair34->P[1];
94 Q[2] = pair34->P[2];
95 PQ[0] = P[0] - Q[0];
96 PQ[1] = P[1] - Q[1];
97 PQ[2] = P[2] - Q[2];
98 double PQ2 = PQ[0]*PQ[0];
99 PQ2 += PQ[1]*PQ[1];
100 PQ2 += PQ[2]*PQ[2];
101 double T = rho*PQ2;
102
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+1; i++)
113 Data->F[i] = oo2np1[i]*pfac;
114 }
115 else {
116 double *fjttable = Fm_Eval_->values(quartet_info_.am+1,T);
117 for(int i=0;i<=quartet_info_.am+1;i++)
118 Data->F[i] = fjttable[i]*pfac;
119 }
120
121 Data->ss_r12_ss = 2.0*Data->oo2p*Data->F[0] + PQ2*(Data->F[0] - Data->F[1]);
122
123 /* PA */
124 Data->U[0][0] = P[0] - quartet_info_.A[0];
125 Data->U[0][1] = P[1] - quartet_info_.A[1];
126 Data->U[0][2] = P[2] - quartet_info_.A[2];
127 /* QA */
128 Data->U[1][0] = Q[0] - quartet_info_.A[0];
129 Data->U[1][1] = Q[1] - quartet_info_.A[1];
130 Data->U[1][2] = Q[2] - quartet_info_.A[2];
131 /* QC */
132 Data->U[2][0] = Q[0] - quartet_info_.C[0];
133 Data->U[2][1] = Q[1] - quartet_info_.C[1];
134 Data->U[2][2] = Q[2] - quartet_info_.C[2];
135 /* PC */
136 Data->U[3][0] = P[0] - quartet_info_.C[0];
137 Data->U[3][1] = P[1] - quartet_info_.C[1];
138 Data->U[3][2] = P[2] - quartet_info_.C[2];
139 /* WP */
140 Data->U[4][0] = W[0] - P[0];
141 Data->U[4][1] = W[1] - P[1];
142 Data->U[4][2] = W[2] - P[2];
143 /* WQ */
144 Data->U[5][0] = W[0] - Q[0];
145 Data->U[5][1] = W[1] - Q[1];
146 Data->U[5][2] = W[2] - Q[2];
147
148 return;
149}
150
151}
152
153#endif
154
155// Local Variables:
156// mode: c++
157// c-file-style: "CLJ"
158// End:
double coefficient_unnorm(int con, int prim) const
Returns the contraction coef for unnormalized primitives.
Definition gaussshell.h:232
double exponent(int iprim) const
Returns the exponents of the given primitive.
Definition gaussshell.h:238
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

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