From ce22781f2879bec499b86d36144f5b361cc0d990 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Mon, 18 Mar 2019 22:36:44 -0700 Subject: [PATCH] New 4th order 2e integrals --- ChangeLog | 3 +- scripts/auto_intor.cl | 1 + src/autocode/hess.c | 452 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 455 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a4ded2e..a9a36d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ -Version 3.0.15 (2019-?-?): +Version 3.0.15 (2019-03-18): * F12 second derivatives * Add integrals for Gaussian type geminals + * Add 4th order derivatives of 2e integrals Version 3.0.14 (2018-11-22): * F12 derivative integrals * New 2c2e integral ( nabla nabla i | j ) diff --git a/scripts/auto_intor.cl b/scripts/auto_intor.cl index 820587c..3f36175 100644 --- a/scripts/auto_intor.cl +++ b/scripts/auto_intor.cl @@ -185,6 +185,7 @@ '("int1e_ipipsprinvsp" ( nabla nabla sigma dot p \| rinv sigma dot p \| )) '("int1e_ipsprinvspip" ( nabla sigma dot p \| rinv sigma dot p \| nabla )) '("int2e_ipip1ipip2" ( nabla nabla \, \| nabla nabla \, )) + '("int2e_ipvip1ipvip2" ( nabla \, nabla \| nabla \, nabla )) ) (gen-cint "int3c2e.c" diff --git a/src/autocode/hess.c b/src/autocode/hess.c index 2a868ae..eb86cc9 100644 --- a/src/autocode/hess.c +++ b/src/autocode/hess.c @@ -3388,3 +3388,455 @@ return CINT2e_spinor_drv(out, dims, &envs, opt, cache, &c2s_sf_2e1, &c2s_sf_2e2) } // int2e_ipip1ipip2_spinor ALL_CINT(int2e_ipip1ipip2) //ALL_CINT_FORTRAN_(cint2e_ipip1ipip2) +/* : i,j \in electron 1; k,l \in electron 2 + * = (NABLA i NABLA j|R12 |NABLA k NABLA l) */ +void CINTgout2e_int2e_ipvip1ipvip2(double *RESTRICT gout, +double *RESTRICT g, int *RESTRICT idx, CINTEnvVars *envs) { +int nf = envs->nf; +int nfc = nf * 81; +int nrys_roots = envs->nrys_roots; +int ix, iy, iz, i, n; +DECLARE_GOUT; +double *RESTRICT g0 = g; +double *RESTRICT g1 = g0 + envs->g_size * 3 * SIMDD; +double *RESTRICT g2 = g1 + envs->g_size * 3 * SIMDD; +double *RESTRICT g3 = g2 + envs->g_size * 3 * SIMDD; +double *RESTRICT g4 = g3 + envs->g_size * 3 * SIMDD; +double *RESTRICT g5 = g4 + envs->g_size * 3 * SIMDD; +double *RESTRICT g6 = g5 + envs->g_size * 3 * SIMDD; +double *RESTRICT g7 = g6 + envs->g_size * 3 * SIMDD; +double *RESTRICT g8 = g7 + envs->g_size * 3 * SIMDD; +double *RESTRICT g9 = g8 + envs->g_size * 3 * SIMDD; +double *RESTRICT g10 = g9 + envs->g_size * 3 * SIMDD; +double *RESTRICT g11 = g10 + envs->g_size * 3 * SIMDD; +double *RESTRICT g12 = g11 + envs->g_size * 3 * SIMDD; +double *RESTRICT g13 = g12 + envs->g_size * 3 * SIMDD; +double *RESTRICT g14 = g13 + envs->g_size * 3 * SIMDD; +double *RESTRICT g15 = g14 + envs->g_size * 3 * SIMDD; +G2E_D_L(g1, g0, envs->i_l+1, envs->j_l+1, envs->k_l+1, envs->l_l+0); +G2E_D_K(g2, g0, envs->i_l+1, envs->j_l+1, envs->k_l+0, envs->l_l); +G2E_D_K(g3, g1, envs->i_l+1, envs->j_l+1, envs->k_l+0, envs->l_l); +G2E_D_J(g4, g0, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J(g5, g1, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J(g6, g2, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J(g7, g3, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_I(g8, g0, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g9, g1, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g10, g2, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g11, g3, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g12, g4, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g13, g5, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g14, g6, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I(g15, g7, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +__MD r1; +__MD rs[81]; +for (n = 0; n < nf; n++) { +ix = idx[0+n*3]; +iy = idx[1+n*3]; +iz = idx[2+n*3]; +for (i = 0; i < 81; i++) { rs[i] = MM_SET1(0.); } +for (i = 0; i < nrys_roots; i++) { +rs[0] += MM_LOAD(g15+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[1] += MM_LOAD(g14+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[2] += MM_LOAD(g14+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[3] += MM_LOAD(g13+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[4] += MM_LOAD(g12+(ix+i)*SIMDD) * MM_LOAD(g3+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[5] += MM_LOAD(g12+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[6] += MM_LOAD(g13+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[7] += MM_LOAD(g12+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[8] += MM_LOAD(g12+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g3+(iz+i)*SIMDD); +rs[9] += MM_LOAD(g11+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[10] += MM_LOAD(g10+(ix+i)*SIMDD) * MM_LOAD(g5+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[11] += MM_LOAD(g10+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[12] += MM_LOAD(g9+(ix+i)*SIMDD) * MM_LOAD(g6+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[13] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g7+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[14] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g6+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[15] += MM_LOAD(g9+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[16] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g5+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[17] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g3+(iz+i)*SIMDD); +rs[18] += MM_LOAD(g11+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[19] += MM_LOAD(g10+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[20] += MM_LOAD(g10+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g5+(iz+i)*SIMDD); +rs[21] += MM_LOAD(g9+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[22] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g3+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[23] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g5+(iz+i)*SIMDD); +rs[24] += MM_LOAD(g9+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g6+(iz+i)*SIMDD); +rs[25] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g6+(iz+i)*SIMDD); +rs[26] += MM_LOAD(g8+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g7+(iz+i)*SIMDD); +rs[27] += MM_LOAD(g7+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[28] += MM_LOAD(g6+(ix+i)*SIMDD) * MM_LOAD(g9+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[29] += MM_LOAD(g6+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[30] += MM_LOAD(g5+(ix+i)*SIMDD) * MM_LOAD(g10+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[31] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g11+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[32] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g10+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[33] += MM_LOAD(g5+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[34] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g9+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[35] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g3+(iz+i)*SIMDD); +rs[36] += MM_LOAD(g3+(ix+i)*SIMDD) * MM_LOAD(g12+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[37] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g13+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[38] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g12+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[39] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g14+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[40] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g15+(iy+i)*SIMDD) * MM_LOAD(g0+(iz+i)*SIMDD); +rs[41] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g14+(iy+i)*SIMDD) * MM_LOAD(g1+(iz+i)*SIMDD); +rs[42] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g12+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[43] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g13+(iy+i)*SIMDD) * MM_LOAD(g2+(iz+i)*SIMDD); +rs[44] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g12+(iy+i)*SIMDD) * MM_LOAD(g3+(iz+i)*SIMDD); +rs[45] += MM_LOAD(g3+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[46] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g9+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[47] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g5+(iz+i)*SIMDD); +rs[48] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g10+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[49] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g11+(iy+i)*SIMDD) * MM_LOAD(g4+(iz+i)*SIMDD); +rs[50] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g10+(iy+i)*SIMDD) * MM_LOAD(g5+(iz+i)*SIMDD); +rs[51] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g6+(iz+i)*SIMDD); +rs[52] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g9+(iy+i)*SIMDD) * MM_LOAD(g6+(iz+i)*SIMDD); +rs[53] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g8+(iy+i)*SIMDD) * MM_LOAD(g7+(iz+i)*SIMDD); +rs[54] += MM_LOAD(g7+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[55] += MM_LOAD(g6+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[56] += MM_LOAD(g6+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g9+(iz+i)*SIMDD); +rs[57] += MM_LOAD(g5+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[58] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g3+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[59] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g9+(iz+i)*SIMDD); +rs[60] += MM_LOAD(g5+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g10+(iz+i)*SIMDD); +rs[61] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g10+(iz+i)*SIMDD); +rs[62] += MM_LOAD(g4+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g11+(iz+i)*SIMDD); +rs[63] += MM_LOAD(g3+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[64] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g5+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[65] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g9+(iz+i)*SIMDD); +rs[66] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g6+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[67] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g7+(iy+i)*SIMDD) * MM_LOAD(g8+(iz+i)*SIMDD); +rs[68] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g6+(iy+i)*SIMDD) * MM_LOAD(g9+(iz+i)*SIMDD); +rs[69] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g10+(iz+i)*SIMDD); +rs[70] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g5+(iy+i)*SIMDD) * MM_LOAD(g10+(iz+i)*SIMDD); +rs[71] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g4+(iy+i)*SIMDD) * MM_LOAD(g11+(iz+i)*SIMDD); +rs[72] += MM_LOAD(g3+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g12+(iz+i)*SIMDD); +rs[73] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g12+(iz+i)*SIMDD); +rs[74] += MM_LOAD(g2+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g13+(iz+i)*SIMDD); +rs[75] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g12+(iz+i)*SIMDD); +rs[76] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g3+(iy+i)*SIMDD) * MM_LOAD(g12+(iz+i)*SIMDD); +rs[77] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g2+(iy+i)*SIMDD) * MM_LOAD(g13+(iz+i)*SIMDD); +rs[78] += MM_LOAD(g1+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g14+(iz+i)*SIMDD); +rs[79] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g1+(iy+i)*SIMDD) * MM_LOAD(g14+(iz+i)*SIMDD); +rs[80] += MM_LOAD(g0+(ix+i)*SIMDD) * MM_LOAD(g0+(iy+i)*SIMDD) * MM_LOAD(g15+(iz+i)*SIMDD); +} +r1 = + rs[0]; GOUT_SCATTER(gout, n*81+0, r1); +r1 = + rs[1]; GOUT_SCATTER(gout, n*81+1, r1); +r1 = + rs[2]; GOUT_SCATTER(gout, n*81+2, r1); +r1 = + rs[3]; GOUT_SCATTER(gout, n*81+3, r1); +r1 = + rs[4]; GOUT_SCATTER(gout, n*81+4, r1); +r1 = + rs[5]; GOUT_SCATTER(gout, n*81+5, r1); +r1 = + rs[6]; GOUT_SCATTER(gout, n*81+6, r1); +r1 = + rs[7]; GOUT_SCATTER(gout, n*81+7, r1); +r1 = + rs[8]; GOUT_SCATTER(gout, n*81+8, r1); +r1 = + rs[9]; GOUT_SCATTER(gout, n*81+9, r1); +r1 = + rs[10]; GOUT_SCATTER(gout, n*81+10, r1); +r1 = + rs[11]; GOUT_SCATTER(gout, n*81+11, r1); +r1 = + rs[12]; GOUT_SCATTER(gout, n*81+12, r1); +r1 = + rs[13]; GOUT_SCATTER(gout, n*81+13, r1); +r1 = + rs[14]; GOUT_SCATTER(gout, n*81+14, r1); +r1 = + rs[15]; GOUT_SCATTER(gout, n*81+15, r1); +r1 = + rs[16]; GOUT_SCATTER(gout, n*81+16, r1); +r1 = + rs[17]; GOUT_SCATTER(gout, n*81+17, r1); +r1 = + rs[18]; GOUT_SCATTER(gout, n*81+18, r1); +r1 = + rs[19]; GOUT_SCATTER(gout, n*81+19, r1); +r1 = + rs[20]; GOUT_SCATTER(gout, n*81+20, r1); +r1 = + rs[21]; GOUT_SCATTER(gout, n*81+21, r1); +r1 = + rs[22]; GOUT_SCATTER(gout, n*81+22, r1); +r1 = + rs[23]; GOUT_SCATTER(gout, n*81+23, r1); +r1 = + rs[24]; GOUT_SCATTER(gout, n*81+24, r1); +r1 = + rs[25]; GOUT_SCATTER(gout, n*81+25, r1); +r1 = + rs[26]; GOUT_SCATTER(gout, n*81+26, r1); +r1 = + rs[27]; GOUT_SCATTER(gout, n*81+27, r1); +r1 = + rs[28]; GOUT_SCATTER(gout, n*81+28, r1); +r1 = + rs[29]; GOUT_SCATTER(gout, n*81+29, r1); +r1 = + rs[30]; GOUT_SCATTER(gout, n*81+30, r1); +r1 = + rs[31]; GOUT_SCATTER(gout, n*81+31, r1); +r1 = + rs[32]; GOUT_SCATTER(gout, n*81+32, r1); +r1 = + rs[33]; GOUT_SCATTER(gout, n*81+33, r1); +r1 = + rs[34]; GOUT_SCATTER(gout, n*81+34, r1); +r1 = + rs[35]; GOUT_SCATTER(gout, n*81+35, r1); +r1 = + rs[36]; GOUT_SCATTER(gout, n*81+36, r1); +r1 = + rs[37]; GOUT_SCATTER(gout, n*81+37, r1); +r1 = + rs[38]; GOUT_SCATTER(gout, n*81+38, r1); +r1 = + rs[39]; GOUT_SCATTER(gout, n*81+39, r1); +r1 = + rs[40]; GOUT_SCATTER(gout, n*81+40, r1); +r1 = + rs[41]; GOUT_SCATTER(gout, n*81+41, r1); +r1 = + rs[42]; GOUT_SCATTER(gout, n*81+42, r1); +r1 = + rs[43]; GOUT_SCATTER(gout, n*81+43, r1); +r1 = + rs[44]; GOUT_SCATTER(gout, n*81+44, r1); +r1 = + rs[45]; GOUT_SCATTER(gout, n*81+45, r1); +r1 = + rs[46]; GOUT_SCATTER(gout, n*81+46, r1); +r1 = + rs[47]; GOUT_SCATTER(gout, n*81+47, r1); +r1 = + rs[48]; GOUT_SCATTER(gout, n*81+48, r1); +r1 = + rs[49]; GOUT_SCATTER(gout, n*81+49, r1); +r1 = + rs[50]; GOUT_SCATTER(gout, n*81+50, r1); +r1 = + rs[51]; GOUT_SCATTER(gout, n*81+51, r1); +r1 = + rs[52]; GOUT_SCATTER(gout, n*81+52, r1); +r1 = + rs[53]; GOUT_SCATTER(gout, n*81+53, r1); +r1 = + rs[54]; GOUT_SCATTER(gout, n*81+54, r1); +r1 = + rs[55]; GOUT_SCATTER(gout, n*81+55, r1); +r1 = + rs[56]; GOUT_SCATTER(gout, n*81+56, r1); +r1 = + rs[57]; GOUT_SCATTER(gout, n*81+57, r1); +r1 = + rs[58]; GOUT_SCATTER(gout, n*81+58, r1); +r1 = + rs[59]; GOUT_SCATTER(gout, n*81+59, r1); +r1 = + rs[60]; GOUT_SCATTER(gout, n*81+60, r1); +r1 = + rs[61]; GOUT_SCATTER(gout, n*81+61, r1); +r1 = + rs[62]; GOUT_SCATTER(gout, n*81+62, r1); +r1 = + rs[63]; GOUT_SCATTER(gout, n*81+63, r1); +r1 = + rs[64]; GOUT_SCATTER(gout, n*81+64, r1); +r1 = + rs[65]; GOUT_SCATTER(gout, n*81+65, r1); +r1 = + rs[66]; GOUT_SCATTER(gout, n*81+66, r1); +r1 = + rs[67]; GOUT_SCATTER(gout, n*81+67, r1); +r1 = + rs[68]; GOUT_SCATTER(gout, n*81+68, r1); +r1 = + rs[69]; GOUT_SCATTER(gout, n*81+69, r1); +r1 = + rs[70]; GOUT_SCATTER(gout, n*81+70, r1); +r1 = + rs[71]; GOUT_SCATTER(gout, n*81+71, r1); +r1 = + rs[72]; GOUT_SCATTER(gout, n*81+72, r1); +r1 = + rs[73]; GOUT_SCATTER(gout, n*81+73, r1); +r1 = + rs[74]; GOUT_SCATTER(gout, n*81+74, r1); +r1 = + rs[75]; GOUT_SCATTER(gout, n*81+75, r1); +r1 = + rs[76]; GOUT_SCATTER(gout, n*81+76, r1); +r1 = + rs[77]; GOUT_SCATTER(gout, n*81+77, r1); +r1 = + rs[78]; GOUT_SCATTER(gout, n*81+78, r1); +r1 = + rs[79]; GOUT_SCATTER(gout, n*81+79, r1); +r1 = + rs[80]; GOUT_SCATTER(gout, n*81+80, r1); +}} +void CINTgout2e_int2e_ipvip1ipvip2_simd1(double *RESTRICT gout, +double *RESTRICT g, int *RESTRICT idx, CINTEnvVars *envs) { +int nf = envs->nf; +int nrys_roots = envs->nrys_roots; +int ix, iy, iz, i, n; +double *RESTRICT g0 = g; +double *RESTRICT g1 = g0 + envs->g_size * 3 * SIMDD; +double *RESTRICT g2 = g1 + envs->g_size * 3 * SIMDD; +double *RESTRICT g3 = g2 + envs->g_size * 3 * SIMDD; +double *RESTRICT g4 = g3 + envs->g_size * 3 * SIMDD; +double *RESTRICT g5 = g4 + envs->g_size * 3 * SIMDD; +double *RESTRICT g6 = g5 + envs->g_size * 3 * SIMDD; +double *RESTRICT g7 = g6 + envs->g_size * 3 * SIMDD; +double *RESTRICT g8 = g7 + envs->g_size * 3 * SIMDD; +double *RESTRICT g9 = g8 + envs->g_size * 3 * SIMDD; +double *RESTRICT g10 = g9 + envs->g_size * 3 * SIMDD; +double *RESTRICT g11 = g10 + envs->g_size * 3 * SIMDD; +double *RESTRICT g12 = g11 + envs->g_size * 3 * SIMDD; +double *RESTRICT g13 = g12 + envs->g_size * 3 * SIMDD; +double *RESTRICT g14 = g13 + envs->g_size * 3 * SIMDD; +double *RESTRICT g15 = g14 + envs->g_size * 3 * SIMDD; +G2E_D_L_SIMD1(g1, g0, envs->i_l+1, envs->j_l+1, envs->k_l+1, envs->l_l+0); +G2E_D_K_SIMD1(g2, g0, envs->i_l+1, envs->j_l+1, envs->k_l+0, envs->l_l); +G2E_D_K_SIMD1(g3, g1, envs->i_l+1, envs->j_l+1, envs->k_l+0, envs->l_l); +G2E_D_J_SIMD1(g4, g0, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J_SIMD1(g5, g1, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J_SIMD1(g6, g2, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_J_SIMD1(g7, g3, envs->i_l+1, envs->j_l+0, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g8, g0, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g9, g1, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g10, g2, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g11, g3, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g12, g4, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g13, g5, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g14, g6, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +G2E_D_I_SIMD1(g15, g7, envs->i_l+0, envs->j_l, envs->k_l, envs->l_l); +double s[81]; +for (n = 0; n < nf; n++) { +ix = idx[0+n*3]; +iy = idx[1+n*3]; +iz = idx[2+n*3]; +for (i = 0; i < 81; i++) { s[i] = 0; } +for (i = 0; i < nrys_roots; i++) { +s[0] += g15[ix+i] * g0[iy+i] * g0[iz+i]; +s[1] += g14[ix+i] * g1[iy+i] * g0[iz+i]; +s[2] += g14[ix+i] * g0[iy+i] * g1[iz+i]; +s[3] += g13[ix+i] * g2[iy+i] * g0[iz+i]; +s[4] += g12[ix+i] * g3[iy+i] * g0[iz+i]; +s[5] += g12[ix+i] * g2[iy+i] * g1[iz+i]; +s[6] += g13[ix+i] * g0[iy+i] * g2[iz+i]; +s[7] += g12[ix+i] * g1[iy+i] * g2[iz+i]; +s[8] += g12[ix+i] * g0[iy+i] * g3[iz+i]; +s[9] += g11[ix+i] * g4[iy+i] * g0[iz+i]; +s[10] += g10[ix+i] * g5[iy+i] * g0[iz+i]; +s[11] += g10[ix+i] * g4[iy+i] * g1[iz+i]; +s[12] += g9[ix+i] * g6[iy+i] * g0[iz+i]; +s[13] += g8[ix+i] * g7[iy+i] * g0[iz+i]; +s[14] += g8[ix+i] * g6[iy+i] * g1[iz+i]; +s[15] += g9[ix+i] * g4[iy+i] * g2[iz+i]; +s[16] += g8[ix+i] * g5[iy+i] * g2[iz+i]; +s[17] += g8[ix+i] * g4[iy+i] * g3[iz+i]; +s[18] += g11[ix+i] * g0[iy+i] * g4[iz+i]; +s[19] += g10[ix+i] * g1[iy+i] * g4[iz+i]; +s[20] += g10[ix+i] * g0[iy+i] * g5[iz+i]; +s[21] += g9[ix+i] * g2[iy+i] * g4[iz+i]; +s[22] += g8[ix+i] * g3[iy+i] * g4[iz+i]; +s[23] += g8[ix+i] * g2[iy+i] * g5[iz+i]; +s[24] += g9[ix+i] * g0[iy+i] * g6[iz+i]; +s[25] += g8[ix+i] * g1[iy+i] * g6[iz+i]; +s[26] += g8[ix+i] * g0[iy+i] * g7[iz+i]; +s[27] += g7[ix+i] * g8[iy+i] * g0[iz+i]; +s[28] += g6[ix+i] * g9[iy+i] * g0[iz+i]; +s[29] += g6[ix+i] * g8[iy+i] * g1[iz+i]; +s[30] += g5[ix+i] * g10[iy+i] * g0[iz+i]; +s[31] += g4[ix+i] * g11[iy+i] * g0[iz+i]; +s[32] += g4[ix+i] * g10[iy+i] * g1[iz+i]; +s[33] += g5[ix+i] * g8[iy+i] * g2[iz+i]; +s[34] += g4[ix+i] * g9[iy+i] * g2[iz+i]; +s[35] += g4[ix+i] * g8[iy+i] * g3[iz+i]; +s[36] += g3[ix+i] * g12[iy+i] * g0[iz+i]; +s[37] += g2[ix+i] * g13[iy+i] * g0[iz+i]; +s[38] += g2[ix+i] * g12[iy+i] * g1[iz+i]; +s[39] += g1[ix+i] * g14[iy+i] * g0[iz+i]; +s[40] += g0[ix+i] * g15[iy+i] * g0[iz+i]; +s[41] += g0[ix+i] * g14[iy+i] * g1[iz+i]; +s[42] += g1[ix+i] * g12[iy+i] * g2[iz+i]; +s[43] += g0[ix+i] * g13[iy+i] * g2[iz+i]; +s[44] += g0[ix+i] * g12[iy+i] * g3[iz+i]; +s[45] += g3[ix+i] * g8[iy+i] * g4[iz+i]; +s[46] += g2[ix+i] * g9[iy+i] * g4[iz+i]; +s[47] += g2[ix+i] * g8[iy+i] * g5[iz+i]; +s[48] += g1[ix+i] * g10[iy+i] * g4[iz+i]; +s[49] += g0[ix+i] * g11[iy+i] * g4[iz+i]; +s[50] += g0[ix+i] * g10[iy+i] * g5[iz+i]; +s[51] += g1[ix+i] * g8[iy+i] * g6[iz+i]; +s[52] += g0[ix+i] * g9[iy+i] * g6[iz+i]; +s[53] += g0[ix+i] * g8[iy+i] * g7[iz+i]; +s[54] += g7[ix+i] * g0[iy+i] * g8[iz+i]; +s[55] += g6[ix+i] * g1[iy+i] * g8[iz+i]; +s[56] += g6[ix+i] * g0[iy+i] * g9[iz+i]; +s[57] += g5[ix+i] * g2[iy+i] * g8[iz+i]; +s[58] += g4[ix+i] * g3[iy+i] * g8[iz+i]; +s[59] += g4[ix+i] * g2[iy+i] * g9[iz+i]; +s[60] += g5[ix+i] * g0[iy+i] * g10[iz+i]; +s[61] += g4[ix+i] * g1[iy+i] * g10[iz+i]; +s[62] += g4[ix+i] * g0[iy+i] * g11[iz+i]; +s[63] += g3[ix+i] * g4[iy+i] * g8[iz+i]; +s[64] += g2[ix+i] * g5[iy+i] * g8[iz+i]; +s[65] += g2[ix+i] * g4[iy+i] * g9[iz+i]; +s[66] += g1[ix+i] * g6[iy+i] * g8[iz+i]; +s[67] += g0[ix+i] * g7[iy+i] * g8[iz+i]; +s[68] += g0[ix+i] * g6[iy+i] * g9[iz+i]; +s[69] += g1[ix+i] * g4[iy+i] * g10[iz+i]; +s[70] += g0[ix+i] * g5[iy+i] * g10[iz+i]; +s[71] += g0[ix+i] * g4[iy+i] * g11[iz+i]; +s[72] += g3[ix+i] * g0[iy+i] * g12[iz+i]; +s[73] += g2[ix+i] * g1[iy+i] * g12[iz+i]; +s[74] += g2[ix+i] * g0[iy+i] * g13[iz+i]; +s[75] += g1[ix+i] * g2[iy+i] * g12[iz+i]; +s[76] += g0[ix+i] * g3[iy+i] * g12[iz+i]; +s[77] += g0[ix+i] * g2[iy+i] * g13[iz+i]; +s[78] += g1[ix+i] * g0[iy+i] * g14[iz+i]; +s[79] += g0[ix+i] * g1[iy+i] * g14[iz+i]; +s[80] += g0[ix+i] * g0[iy+i] * g15[iz+i]; +} +gout[n*81+0] = + s[0]; +gout[n*81+1] = + s[1]; +gout[n*81+2] = + s[2]; +gout[n*81+3] = + s[3]; +gout[n*81+4] = + s[4]; +gout[n*81+5] = + s[5]; +gout[n*81+6] = + s[6]; +gout[n*81+7] = + s[7]; +gout[n*81+8] = + s[8]; +gout[n*81+9] = + s[9]; +gout[n*81+10] = + s[10]; +gout[n*81+11] = + s[11]; +gout[n*81+12] = + s[12]; +gout[n*81+13] = + s[13]; +gout[n*81+14] = + s[14]; +gout[n*81+15] = + s[15]; +gout[n*81+16] = + s[16]; +gout[n*81+17] = + s[17]; +gout[n*81+18] = + s[18]; +gout[n*81+19] = + s[19]; +gout[n*81+20] = + s[20]; +gout[n*81+21] = + s[21]; +gout[n*81+22] = + s[22]; +gout[n*81+23] = + s[23]; +gout[n*81+24] = + s[24]; +gout[n*81+25] = + s[25]; +gout[n*81+26] = + s[26]; +gout[n*81+27] = + s[27]; +gout[n*81+28] = + s[28]; +gout[n*81+29] = + s[29]; +gout[n*81+30] = + s[30]; +gout[n*81+31] = + s[31]; +gout[n*81+32] = + s[32]; +gout[n*81+33] = + s[33]; +gout[n*81+34] = + s[34]; +gout[n*81+35] = + s[35]; +gout[n*81+36] = + s[36]; +gout[n*81+37] = + s[37]; +gout[n*81+38] = + s[38]; +gout[n*81+39] = + s[39]; +gout[n*81+40] = + s[40]; +gout[n*81+41] = + s[41]; +gout[n*81+42] = + s[42]; +gout[n*81+43] = + s[43]; +gout[n*81+44] = + s[44]; +gout[n*81+45] = + s[45]; +gout[n*81+46] = + s[46]; +gout[n*81+47] = + s[47]; +gout[n*81+48] = + s[48]; +gout[n*81+49] = + s[49]; +gout[n*81+50] = + s[50]; +gout[n*81+51] = + s[51]; +gout[n*81+52] = + s[52]; +gout[n*81+53] = + s[53]; +gout[n*81+54] = + s[54]; +gout[n*81+55] = + s[55]; +gout[n*81+56] = + s[56]; +gout[n*81+57] = + s[57]; +gout[n*81+58] = + s[58]; +gout[n*81+59] = + s[59]; +gout[n*81+60] = + s[60]; +gout[n*81+61] = + s[61]; +gout[n*81+62] = + s[62]; +gout[n*81+63] = + s[63]; +gout[n*81+64] = + s[64]; +gout[n*81+65] = + s[65]; +gout[n*81+66] = + s[66]; +gout[n*81+67] = + s[67]; +gout[n*81+68] = + s[68]; +gout[n*81+69] = + s[69]; +gout[n*81+70] = + s[70]; +gout[n*81+71] = + s[71]; +gout[n*81+72] = + s[72]; +gout[n*81+73] = + s[73]; +gout[n*81+74] = + s[74]; +gout[n*81+75] = + s[75]; +gout[n*81+76] = + s[76]; +gout[n*81+77] = + s[77]; +gout[n*81+78] = + s[78]; +gout[n*81+79] = + s[79]; +gout[n*81+80] = + s[80]; +}} +void int2e_ipvip1ipvip2_optimizer(CINTOpt **opt, int *atm, int natm, int *bas, int nbas, double *env) { +int ng[] = {1, 1, 1, 1, 4, 1, 1, 81}; +CINTall_2e_optimizer(opt, ng, atm, natm, bas, nbas, env); +} +int int2e_ipvip1ipvip2_cart(double *out, int *dims, int *shls, +int *atm, int natm, int *bas, int nbas, double *env, CINTOpt *opt, double *cache) { +int ng[] = {1, 1, 1, 1, 4, 1, 1, 81}; +CINTEnvVars envs; +CINTinit_int2e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout2e_int2e_ipvip1ipvip2; +envs.f_gout_simd1 = &CINTgout2e_int2e_ipvip1ipvip2_simd1; +return CINT2e_cart_drv(out, dims, &envs, opt, cache); +} // int2e_ipvip1ipvip2_cart +int int2e_ipvip1ipvip2_sph(double *out, int *dims, int *shls, +int *atm, int natm, int *bas, int nbas, double *env, CINTOpt *opt, double *cache) { +int ng[] = {1, 1, 1, 1, 4, 1, 1, 81}; +CINTEnvVars envs; +CINTinit_int2e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout2e_int2e_ipvip1ipvip2; +envs.f_gout_simd1 = &CINTgout2e_int2e_ipvip1ipvip2_simd1; +return CINT2e_spheric_drv(out, dims, &envs, opt, cache); +} // int2e_ipvip1ipvip2_sph +int int2e_ipvip1ipvip2_spinor(double complex *out, int *dims, int *shls, +int *atm, int natm, int *bas, int nbas, double *env, CINTOpt *opt, double *cache) { +int ng[] = {1, 1, 1, 1, 4, 1, 1, 81}; +CINTEnvVars envs; +CINTinit_int2e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout2e_int2e_ipvip1ipvip2; +envs.f_gout_simd1 = &CINTgout2e_int2e_ipvip1ipvip2_simd1; +return CINT2e_spinor_drv(out, dims, &envs, opt, cache, &c2s_sf_2e1, &c2s_sf_2e2); +} // int2e_ipvip1ipvip2_spinor +ALL_CINT(int2e_ipvip1ipvip2) +//ALL_CINT_FORTRAN_(cint2e_ipvip1ipvip2)