Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

grt_quartet_data.h

00001 // 00002 // grt_quartet_data.h 00003 // 00004 // Copyright (C) 2001 Edward Valeev 00005 // 00006 // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu> 00007 // Maintainer: EV 00008 // 00009 // This file is part of the SC Toolkit. 00010 // 00011 // The SC Toolkit is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Library General Public License as published by 00013 // the Free Software Foundation; either version 2, or (at your option) 00014 // any later version. 00015 // 00016 // The SC Toolkit is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU Library General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Library General Public License 00022 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to 00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 00024 // 00025 // The U.S. Government is granted a limited license as per AL 91-7. 00026 // 00027 00028 #ifndef _chemistry_qc_cints_grtquartetdata_h 00029 #define _chemistry_qc_cints_grtquartetdata_h 00030 00031 #include <math.h> 00032 00033 /*-------------------------------------------------------------------------------- 00034 This function computes constants used in OSRR for a given quartet of primitives 00035 --------------------------------------------------------------------------------*/ 00036 inline void GRTCints::grt_quartet_data_(prim_data *Data, double scale) 00037 { 00038 #define STATIC_OO2NP1 00039 #include "static.h" 00040 00041 /*---------------- 00042 Local variables 00043 ----------------*/ 00044 double P[3], Q[3], PQ[3], W[3]; 00045 double small_T = 1E-15; /*--- Use only one term in Taylor expansion of Fj(T) if T < small_T ---*/ 00046 00047 int p1 = quartet_info_.p1; 00048 int p2 = quartet_info_.p2; 00049 int p3 = quartet_info_.p3; 00050 int p4 = quartet_info_.p4; 00051 00052 double a1 = int_shell1_->exponent(quartet_info_.p1); 00053 double a2 = int_shell2_->exponent(quartet_info_.p2); 00054 double a3 = int_shell3_->exponent(quartet_info_.p3); 00055 double a4 = int_shell4_->exponent(quartet_info_.p4); 00056 00057 prim_pair_t* pair12; 00058 prim_pair_t* pair34; 00059 if (!quartet_info_.p13p24) { 00060 pair12 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2); 00061 pair34 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4); 00062 } 00063 else { 00064 pair12 = quartet_info_.shell_pair34->prim_pair(*quartet_info_.op3,*quartet_info_.op4); 00065 pair34 = quartet_info_.shell_pair12->prim_pair(*quartet_info_.op1,*quartet_info_.op2); 00066 } 00067 00068 Data->twozeta_a = 2.0*a1; 00069 Data->twozeta_b = 2.0*a2; 00070 Data->twozeta_c = 2.0*a3; 00071 Data->twozeta_d = 2.0*a4; 00072 double zeta = pair12->gamma; 00073 double eta = pair34->gamma; 00074 double ooz = 1.0/zeta; 00075 double oon = 1.0/eta; 00076 double oozn = 1.0/(zeta+eta); 00077 Data->poz = eta*oozn; 00078 double rho = zeta*Data->poz; 00079 Data->oo2p = 0.5/rho; 00080 00081 double pfac_norm = int_shell1_->coefficient_unnorm(quartet_info_.gc1,p1)* 00082 int_shell2_->coefficient_unnorm(quartet_info_.gc2,p2)* 00083 int_shell3_->coefficient_unnorm(quartet_info_.gc3,p3)* 00084 int_shell4_->coefficient_unnorm(quartet_info_.gc4,p4); 00085 double pfac = 2.0*sqrt(rho*M_1_PI)*scale*pair12->ovlp*pair34->ovlp*pfac_norm; 00086 00087 P[0] = pair12->P[0]; 00088 P[1] = pair12->P[1]; 00089 P[2] = pair12->P[2]; 00090 Q[0] = pair34->P[0]; 00091 Q[1] = pair34->P[1]; 00092 Q[2] = pair34->P[2]; 00093 PQ[0] = P[0] - Q[0]; 00094 PQ[1] = P[1] - Q[1]; 00095 PQ[2] = P[2] - Q[2]; 00096 double PQ2 = PQ[0]*PQ[0]; 00097 PQ2 += PQ[1]*PQ[1]; 00098 PQ2 += PQ[2]*PQ[2]; 00099 double T = rho*PQ2; 00100 00101 Data->oo2zn = 0.5*oozn; 00102 Data->pon = zeta*oozn; 00103 Data->oo2z = 0.5/zeta; 00104 Data->oo2n = 0.5/eta; 00105 W[0] = (zeta*P[0] + eta*Q[0])*oozn; 00106 W[1] = (zeta*P[1] + eta*Q[1])*oozn; 00107 W[2] = (zeta*P[2] + eta*Q[2])*oozn; 00108 00109 if(T < small_T){ 00110 for(int i=0; i<=quartet_info_.am+1; i++) 00111 Data->F[i] = oo2np1[i]*pfac; 00112 } 00113 else { 00114 double *fjttable = Fm_Eval_->values(quartet_info_.am+1,T); 00115 for(int i=0;i<=quartet_info_.am+1;i++) 00116 Data->F[i] = fjttable[i]*pfac; 00117 } 00118 00119 Data->ss_r12_ss = 2.0*Data->oo2p*Data->F[0] + PQ2*(Data->F[0] - Data->F[1]); 00120 00121 /* PA */ 00122 Data->U[0][0] = P[0] - quartet_info_.A[0]; 00123 Data->U[0][1] = P[1] - quartet_info_.A[1]; 00124 Data->U[0][2] = P[2] - quartet_info_.A[2]; 00125 /* QA */ 00126 Data->U[1][0] = Q[0] - quartet_info_.A[0]; 00127 Data->U[1][1] = Q[1] - quartet_info_.A[1]; 00128 Data->U[1][2] = Q[2] - quartet_info_.A[2]; 00129 /* QC */ 00130 Data->U[2][0] = Q[0] - quartet_info_.C[0]; 00131 Data->U[2][1] = Q[1] - quartet_info_.C[1]; 00132 Data->U[2][2] = Q[2] - quartet_info_.C[2]; 00133 /* PC */ 00134 Data->U[3][0] = P[0] - quartet_info_.C[0]; 00135 Data->U[3][1] = P[1] - quartet_info_.C[1]; 00136 Data->U[3][2] = P[2] - quartet_info_.C[2]; 00137 /* WP */ 00138 Data->U[4][0] = W[0] - P[0]; 00139 Data->U[4][1] = W[1] - P[1]; 00140 Data->U[4][2] = W[2] - P[2]; 00141 /* WQ */ 00142 Data->U[5][0] = W[0] - Q[0]; 00143 Data->U[5][1] = W[1] - Q[1]; 00144 Data->U[5][2] = W[2] - Q[2]; 00145 00146 return; 00147 } 00148 00149 #endif 00150 00151 // Local Variables: 00152 // mode: c++ 00153 // c-file-style: "CLJ" 00154 // End:

Generated at Sat Aug 7 00:04:21 2004 for MPQC 2.2.2 using the documentation package Doxygen 1.3.8.