source: ThirdParty/mpqc_open/src/lib/chemistry/qc/cints/grt_quartet_data.h@ 482400e

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 482400e was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 4.8 KB
Line 
1//
2// grt_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_grtquartetdata_h
29#define _chemistry_qc_cints_grtquartetdata_h
30
31#include <math.h>
32
33/*--------------------------------------------------------------------------------
34 This function computes constants used in OSRR for a given quartet of primitives
35 --------------------------------------------------------------------------------*/
36inline void GRTCints::grt_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 Data->twozeta_a = 2.0*a1;
69 Data->twozeta_b = 2.0*a2;
70 Data->twozeta_c = 2.0*a3;
71 Data->twozeta_d = 2.0*a4;
72 double zeta = pair12->gamma;
73 double eta = pair34->gamma;
74 double ooz = 1.0/zeta;
75 double oon = 1.0/eta;
76 double oozn = 1.0/(zeta+eta);
77 Data->poz = eta*oozn;
78 double rho = zeta*Data->poz;
79 Data->oo2p = 0.5/rho;
80
81 double pfac_norm = int_shell1_->coefficient_unnorm(quartet_info_.gc1,p1)*
82 int_shell2_->coefficient_unnorm(quartet_info_.gc2,p2)*
83 int_shell3_->coefficient_unnorm(quartet_info_.gc3,p3)*
84 int_shell4_->coefficient_unnorm(quartet_info_.gc4,p4);
85 double pfac = 2.0*sqrt(rho*M_1_PI)*scale*pair12->ovlp*pair34->ovlp*pfac_norm;
86
87 P[0] = pair12->P[0];
88 P[1] = pair12->P[1];
89 P[2] = pair12->P[2];
90 Q[0] = pair34->P[0];
91 Q[1] = pair34->P[1];
92 Q[2] = pair34->P[2];
93 PQ[0] = P[0] - Q[0];
94 PQ[1] = P[1] - Q[1];
95 PQ[2] = P[2] - Q[2];
96 double PQ2 = PQ[0]*PQ[0];
97 PQ2 += PQ[1]*PQ[1];
98 PQ2 += PQ[2]*PQ[2];
99 double T = rho*PQ2;
100
101 Data->oo2zn = 0.5*oozn;
102 Data->pon = zeta*oozn;
103 Data->oo2z = 0.5/zeta;
104 Data->oo2n = 0.5/eta;
105 W[0] = (zeta*P[0] + eta*Q[0])*oozn;
106 W[1] = (zeta*P[1] + eta*Q[1])*oozn;
107 W[2] = (zeta*P[2] + eta*Q[2])*oozn;
108
109 if(T < small_T){
110 for(int i=0; i<=quartet_info_.am+1; i++)
111 Data->F[i] = oo2np1[i]*pfac;
112 }
113 else {
114 double *fjttable = Fm_Eval_->values(quartet_info_.am+1,T);
115 for(int i=0;i<=quartet_info_.am+1;i++)
116 Data->F[i] = fjttable[i]*pfac;
117 }
118
119 Data->ss_r12_ss = 2.0*Data->oo2p*Data->F[0] + PQ2*(Data->F[0] - Data->F[1]);
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 /* QA */
126 Data->U[1][0] = Q[0] - quartet_info_.A[0];
127 Data->U[1][1] = Q[1] - quartet_info_.A[1];
128 Data->U[1][2] = Q[2] - quartet_info_.A[2];
129 /* QC */
130 Data->U[2][0] = Q[0] - quartet_info_.C[0];
131 Data->U[2][1] = Q[1] - quartet_info_.C[1];
132 Data->U[2][2] = Q[2] - quartet_info_.C[2];
133 /* PC */
134 Data->U[3][0] = P[0] - quartet_info_.C[0];
135 Data->U[3][1] = P[1] - quartet_info_.C[1];
136 Data->U[3][2] = P[2] - quartet_info_.C[2];
137 /* WP */
138 Data->U[4][0] = W[0] - P[0];
139 Data->U[4][1] = W[1] - P[1];
140 Data->U[4][2] = W[2] - P[2];
141 /* WQ */
142 Data->U[5][0] = W[0] - Q[0];
143 Data->U[5][1] = W[1] - Q[1];
144 Data->U[5][2] = W[2] - Q[2];
145
146 return;
147}
148
149#endif
150
151// Local Variables:
152// mode: c++
153// c-file-style: "CLJ"
154// End:
Note: See TracBrowser for help on using the repository browser.