From b42531de634132d0ffdea093b55a5a17e5596080 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Wed, 13 May 2020 23:46:21 -0700 Subject: [PATCH] Fix integral ggkin --- CMakeLists.txt | 2 +- ChangeLog | 2 ++ README | 4 ++-- scripts/auto_intor.cl | 2 +- src/autocode/intor1.c | 20 ++++++++++---------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2804243d..3654f10b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.6) project (cint C) set(cint_SOVERSION "3") -set(cint_VERSION "3.0.19") +set(cint_VERSION "3.0.20") #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -DNDEBUG") if ("${CMAKE_BUILD_TYPE}" STREQUAL "") diff --git a/ChangeLog b/ChangeLog index c0398091..4e10362f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +Version 3.0.20 (2020-05-13): + * Fix integral ggkin Version 3.0.19 (2019-11-30): * support fractional nuclear charges Version 3.0.18 (2019-07-02): diff --git a/README b/README index 8424fb81..dc39b26e 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ libcint ======= -version 3.0.19 -2019-11-30 +version 3.0.20 +2020-05-13 What is libcint diff --git a/scripts/auto_intor.cl b/scripts/auto_intor.cl index 7249bb22..af5a2a42 100644 --- a/scripts/auto_intor.cl +++ b/scripts/auto_intor.cl @@ -40,7 +40,7 @@ '("int1e_irrp" ( \| rc rc nabla \| )) '("int1e_irpr" ( \| rc nabla rc \| )) '("int1e_ggovlp" ( \| g g \|)) - '("int1e_ggkin" (.5 \| g g nabla dot nabla \|)) + '("int1e_ggkin" (.5 \| g g p dot p \|)) '("int1e_ggnuc" ( \| g g nuc \|)) '("int1e_grjxp" ( \| g r cross p \|)) '("int1e_rinv" (\| rinv \|)) diff --git a/src/autocode/intor1.c b/src/autocode/intor1.c index 2f19d32a..0e77d8e3 100644 --- a/src/autocode/intor1.c +++ b/src/autocode/intor1.c @@ -2779,7 +2779,7 @@ return CINT1e_spinor_drv(out, dims, &envs, cache, &c2s_sf_1e, 0); } // int1e_ggovlp_spinor ALL_CINT1E(int1e_ggovlp) ALL_CINT1E_FORTRAN_(int1e_ggovlp) -/* */ +/* */ void CINTgout1e_int1e_ggkin(double *gout, double *g, FINT *idx, CINTEnvVars *envs, FINT gout_empty) { FINT nf = envs->nf; FINT ix, iy, iz, n; @@ -2913,15 +2913,15 @@ s[77] = + g0[ix+0]*g2[iy+0]*g13[iz+0]; s[78] = + g1[ix+0]*g0[iy+0]*g14[iz+0]; s[79] = + g0[ix+0]*g1[iy+0]*g14[iz+0]; s[80] = + g0[ix+0]*g0[iy+0]*g15[iz+0]; -gout[n*9+0] += - c[4]*s[72] + 2*c[5]*s[63] - c[8]*s[36] - c[4]*s[76] + 2*c[5]*s[67] - c[8]*s[40] - c[4]*s[80] + 2*c[5]*s[71] - c[8]*s[44]; -gout[n*9+1] += - c[5]*s[54] + c[8]*s[27] + c[3]*s[72] - c[6]*s[45] - c[5]*s[58] + c[8]*s[31] + c[3]*s[76] - c[6]*s[49] - c[5]*s[62] + c[8]*s[35] + c[3]*s[80] - c[6]*s[53]; -gout[n*9+2] += - c[3]*s[63] + c[6]*s[36] + c[4]*s[54] - c[7]*s[27] - c[3]*s[67] + c[6]*s[40] + c[4]*s[58] - c[7]*s[31] - c[3]*s[71] + c[6]*s[44] + c[4]*s[62] - c[7]*s[35]; -gout[n*9+3] += - c[7]*s[18] + c[1]*s[72] + c[8]*s[9] - c[2]*s[63] - c[7]*s[22] + c[1]*s[76] + c[8]*s[13] - c[2]*s[67] - c[7]*s[26] + c[1]*s[80] + c[8]*s[17] - c[2]*s[71]; -gout[n*9+4] += - c[8]*s[0] + 2*c[6]*s[18] - c[0]*s[72] - c[8]*s[4] + 2*c[6]*s[22] - c[0]*s[76] - c[8]*s[8] + 2*c[6]*s[26] - c[0]*s[80]; -gout[n*9+5] += - c[6]*s[9] + c[0]*s[63] + c[7]*s[0] - c[1]*s[54] - c[6]*s[13] + c[0]*s[67] + c[7]*s[4] - c[1]*s[58] - c[6]*s[17] + c[0]*s[71] + c[7]*s[8] - c[1]*s[62]; -gout[n*9+6] += - c[1]*s[45] + c[4]*s[18] + c[2]*s[36] - c[5]*s[9] - c[1]*s[49] + c[4]*s[22] + c[2]*s[40] - c[5]*s[13] - c[1]*s[53] + c[4]*s[26] + c[2]*s[44] - c[5]*s[17]; -gout[n*9+7] += - c[2]*s[27] + c[5]*s[0] + c[0]*s[45] - c[3]*s[18] - c[2]*s[31] + c[5]*s[4] + c[0]*s[49] - c[3]*s[22] - c[2]*s[35] + c[5]*s[8] + c[0]*s[53] - c[3]*s[26]; -gout[n*9+8] += - c[0]*s[36] + 2*c[1]*s[27] - c[4]*s[0] - c[0]*s[40] + 2*c[1]*s[31] - c[4]*s[4] - c[0]*s[44] + 2*c[1]*s[35] - c[4]*s[8]; +gout[n*9+0] += + c[4]*s[72] -2*c[5]*s[63] + c[8]*s[36] + c[4]*s[76] -2*c[5]*s[67] + c[8]*s[40] + c[4]*s[80] -2*c[5]*s[71] + c[8]*s[44]; +gout[n*9+1] += + c[5]*s[54] - c[8]*s[27] - c[3]*s[72] + c[6]*s[45] + c[5]*s[58] - c[8]*s[31] - c[3]*s[76] + c[6]*s[49] + c[5]*s[62] - c[8]*s[35] - c[3]*s[80] + c[6]*s[53]; +gout[n*9+2] += + c[3]*s[63] - c[6]*s[36] - c[4]*s[54] + c[7]*s[27] + c[3]*s[67] - c[6]*s[40] - c[4]*s[58] + c[7]*s[31] + c[3]*s[71] - c[6]*s[44] - c[4]*s[62] + c[7]*s[35]; +gout[n*9+3] += + c[7]*s[18] - c[1]*s[72] - c[8]*s[9] + c[2]*s[63] + c[7]*s[22] - c[1]*s[76] - c[8]*s[13] + c[2]*s[67] + c[7]*s[26] - c[1]*s[80] - c[8]*s[17] + c[2]*s[71]; +gout[n*9+4] += + c[8]*s[0] -2*c[6]*s[18] + c[0]*s[72] + c[8]*s[4] -2*c[6]*s[22] + c[0]*s[76] + c[8]*s[8] -2*c[6]*s[26] + c[0]*s[80]; +gout[n*9+5] += + c[6]*s[9] - c[0]*s[63] - c[7]*s[0] + c[1]*s[54] + c[6]*s[13] - c[0]*s[67] - c[7]*s[4] + c[1]*s[58] + c[6]*s[17] - c[0]*s[71] - c[7]*s[8] + c[1]*s[62]; +gout[n*9+6] += + c[1]*s[45] - c[4]*s[18] - c[2]*s[36] + c[5]*s[9] + c[1]*s[49] - c[4]*s[22] - c[2]*s[40] + c[5]*s[13] + c[1]*s[53] - c[4]*s[26] - c[2]*s[44] + c[5]*s[17]; +gout[n*9+7] += + c[2]*s[27] - c[5]*s[0] - c[0]*s[45] + c[3]*s[18] + c[2]*s[31] - c[5]*s[4] - c[0]*s[49] + c[3]*s[22] + c[2]*s[35] - c[5]*s[8] - c[0]*s[53] + c[3]*s[26]; +gout[n*9+8] += + c[0]*s[36] -2*c[1]*s[27] + c[4]*s[0] + c[0]*s[40] -2*c[1]*s[31] + c[4]*s[4] + c[0]*s[44] -2*c[1]*s[35] + c[4]*s[8]; }} void int1e_ggkin_optimizer(CINTOpt **opt, FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env) { FINT ng[] = {0, 4, 0, 0, 4, 1, 1, 9};