From ab6d974d755a628045762bb16e40722bb60ba57b Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Wed, 24 Aug 2022 12:02:53 -0700 Subject: [PATCH] Release v5.1.5 Add new integrals --- CMakeLists.txt | 2 +- ChangeLog | 3 +++ README.md | 4 ++-- include/cint_funcs.h | 6 +++++ scripts/auto_intor.cl | 8 +++++++ src/autocode/int3c1e.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 725ad01..30168be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.5) project (qcint C) set(qcint_VERSION_MAJOR "5") set(qcint_VERSION_MINOR "1") -set(qcint_VERSION_PATCH "4") +set(qcint_VERSION_PATCH "5") set(qcint_VERSION_TWEAK "0") set(qcint_VERSION "${qcint_VERSION_MAJOR}.${qcint_VERSION_MINOR}.${qcint_VERSION_PATCH}") set(qcint_SOVERSION "${qcint_VERSION_MAJOR}") diff --git a/ChangeLog b/ChangeLog index e8f9d4f..89ca9a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Version 5.1.5 (2022-08-24): + * New integral int3c1e_ip1 + Version 5.1.4 (2022-06-25): * Add new integrals int1e_r4 diff --git a/README.md b/README.md index 2979230..351fbb7 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ qcint (quick libcint) An optimized libcint branch for X86 platform -version 5.1.4 -2022-06-25 +version 5.1.5 +2022-08-24 What is qcint diff --git a/include/cint_funcs.h b/include/cint_funcs.h index 2382e48..6b00d2b 100644 --- a/include/cint_funcs.h +++ b/include/cint_funcs.h @@ -1060,6 +1060,12 @@ extern CINTIntegralFunction int3c1e_iprinv_cart; extern CINTIntegralFunction int3c1e_iprinv_sph; extern CINTIntegralFunction int3c1e_iprinv_spinor; +/* 3-center 1-electron integral <(NABLA i) (j) (k)> */ +extern CINTOptimizerFunction int3c1e_ip1_optimizer; +extern CINTIntegralFunction int3c1e_ip1_cart; +extern CINTIntegralFunction int3c1e_ip1_sph; +extern CINTIntegralFunction int3c1e_ip1_spinor; + /* */ extern CINTOptimizerFunction int1e_ipipipnuc_optimizer; extern CINTIntegralFunction int1e_ipipipnuc_cart; diff --git a/scripts/auto_intor.cl b/scripts/auto_intor.cl index 94cee9d..ed9599d 100644 --- a/scripts/auto_intor.cl +++ b/scripts/auto_intor.cl @@ -215,6 +215,14 @@ (gen-cint "int3c1e.c" '("int3c1e_p2" ( \, \, p dot p)) '("int3c1e_iprinv" ( p \, \| rinv \| )) + '("int3c1e_ip1" ( nabla \, \,)) +) + +(gen-cint "deriv3.c" + '("int1e_ipipipnuc" ( nabla nabla nabla \| nuc \| )) + '("int1e_ipipiprinv" ( nabla nabla nabla \| rinv \| )) + '("int1e_ipipnucip" ( nabla nabla \| nuc \| nabla )) + '("int1e_ipiprinvip" ( nabla nabla \| rinv \| nabla )) ) (gen-cint "deriv3.c" diff --git a/src/autocode/int3c1e.c b/src/autocode/int3c1e.c index 805a2f4..3d2601c 100644 --- a/src/autocode/int3c1e.c +++ b/src/autocode/int3c1e.c @@ -152,3 +152,56 @@ return CINT3c1e_spinor_drv(out, dims, &envs, opt, cache, &c2s_sf_3c2e1i); } // int3c1e_iprinv_spinor ALL_CINT(int3c1e_iprinv) //ALL_CINT_FORTRAN_(cint3c1e_iprinv) +static void CINTgout1e_int3c1e_ip1(double *RESTRICT gout, +double *RESTRICT g, int *RESTRICT idx, CINTEnvVars *envs, int count) { +CINTg3c1e_ovlp(g, envs, count); +int nf = envs->nf; +int nfc = nf * 3; +int ix, iy, iz, n; +DECLARE_GOUT; +double *RESTRICT g0 = g; +double *RESTRICT g1 = g0 + envs->g_size * 3 * SIMDD; +__MD r1; +__MD rs[3]; +G1E_D_I(g1, g0, envs->i_l+0, envs->j_l, envs->k_l); +for (n = 0; n < nf; n++) { +ix = idx[0+n*3]; +iy = idx[1+n*3]; +iz = idx[2+n*3]; +rs[0] = MM_LOAD(g1+ix*SIMDD) * MM_LOAD(g0+iy*SIMDD) * MM_LOAD(g0+iz*SIMDD); +rs[1] = MM_LOAD(g0+ix*SIMDD) * MM_LOAD(g1+iy*SIMDD) * MM_LOAD(g0+iz*SIMDD); +rs[2] = MM_LOAD(g0+ix*SIMDD) * MM_LOAD(g0+iy*SIMDD) * MM_LOAD(g1+iz*SIMDD); +r1 = + rs[0]; GOUT_SCATTER(gout, n*3+0, r1); +r1 = + rs[1]; GOUT_SCATTER(gout, n*3+1, r1); +r1 = + rs[2]; GOUT_SCATTER(gout, n*3+2, r1); +}} +void int3c1e_ip1_optimizer(CINTOpt **opt, int *atm, int natm, int *bas, int nbas, double *env) { +int ng[] = {1, 0, 0, 0, 1, 1, 1, 3}; +CINTall_3c1e_optimizer(opt, ng, atm, natm, bas, nbas, env); +} +CACHE_SIZE_T int3c1e_ip1_cart(double *out, int *dims, int *shls, +int *atm, int natm, int *bas, int nbas, double *env, CINTOpt *opt, double *cache) { +int ng[] = {1, 0, 0, 0, 1, 1, 1, 3}; +CINTEnvVars envs; +CINTinit_int3c1e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout1e_int3c1e_ip1; +return CINT3c1e_drv(out, dims, &envs, opt, cache, &c2s_cart_3c1e); +} // int3c1e_ip1_cart +CACHE_SIZE_T int3c1e_ip1_sph(double *out, int *dims, int *shls, +int *atm, int natm, int *bas, int nbas, double *env, CINTOpt *opt, double *cache) { +int ng[] = {1, 0, 0, 0, 1, 1, 1, 3}; +CINTEnvVars envs; +CINTinit_int3c1e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout1e_int3c1e_ip1; +return CINT3c1e_drv(out, dims, &envs, opt, cache, &c2s_sph_3c1e); +} // int3c1e_ip1_sph +CACHE_SIZE_T int3c1e_ip1_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, 0, 0, 0, 1, 1, 1, 3}; +CINTEnvVars envs; +CINTinit_int3c1e_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env); +envs.f_gout = &CINTgout1e_int3c1e_ip1; +return CINT3c1e_spinor_drv(out, dims, &envs, opt, cache, &c2s_sf_3c2e1); +} // int3c1e_ip1_spinor +ALL_CINT(int3c1e_ip1) +//ALL_CINT_FORTRAN_(cint3c1e_ip1)