Skip to content

Commit

Permalink
Release v6.1.0
Browse files Browse the repository at this point in the history
Add new integral int1e_grids_ipip
  • Loading branch information
sunqm committed Nov 11, 2023
1 parent 1d64a6f commit ea3857f
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.5)
project (cint C)
set(cint_VERSION_MAJOR "6")
set(cint_VERSION_MINOR "0")
set(cint_VERSION_MINOR "1")
set(cint_VERSION_PATCH "0")
set(cint_VERSION_TWEAK "0")
set(cint_VERSION "${cint_VERSION_MAJOR}.${cint_VERSION_MINOR}.${cint_VERSION_PATCH}")
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 6.1.0 (2023-11-10):
* New second order derivative integrals int1e_grids_ipip

Version 6.0.0 (2023-09-17):
* Add polynomial root finder using the eigenvalue algorithm
* Fitting Rys roots of SR integrals with Chebyshev polynomials
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
libcint
=======

version 6.0.0
2023-09-17
version 6.1.0
2023-11-10


What is libcint
Expand Down
63 changes: 47 additions & 16 deletions include/cint_funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,24 @@ extern CINTIntegralFunction int1e_ipiprinvip_cart;
extern CINTIntegralFunction int1e_ipiprinvip_sph;
extern CINTIntegralFunction int1e_ipiprinvip_spinor;

/* <NABLA NABLA i|RINV |NABLA NABLA j> */
extern CINTOptimizerFunction int1e_ipiprinvipip_optimizer;
extern CINTIntegralFunction int1e_ipiprinvipip_cart;
extern CINTIntegralFunction int1e_ipiprinvipip_sph;
extern CINTIntegralFunction int1e_ipiprinvipip_spinor;

/* <NABLA NABLA NABLA i|RINV |NABLA j> */
extern CINTOptimizerFunction int1e_ipipiprinvip_optimizer;
extern CINTIntegralFunction int1e_ipipiprinvip_cart;
extern CINTIntegralFunction int1e_ipipiprinvip_sph;
extern CINTIntegralFunction int1e_ipipiprinvip_spinor;

/* <NABLA NABLA NABLA NABLA i|RINV |j> */
extern CINTOptimizerFunction int1e_ipipipiprinv_optimizer;
extern CINTIntegralFunction int1e_ipipipiprinv_cart;
extern CINTIntegralFunction int1e_ipipipiprinv_sph;
extern CINTIntegralFunction int1e_ipipipiprinv_spinor;

/* <NABLA i| 1/r_{grids} |j> */
extern CINTOptimizerFunction int1e_grids_ip_optimizer;
extern CINTIntegralFunction int1e_grids_ip_cart;
Expand All @@ -1108,20 +1126,33 @@ extern CINTIntegralFunction int1e_grids_spvsp_cart;
extern CINTIntegralFunction int1e_grids_spvsp_sph;
extern CINTIntegralFunction int1e_grids_spvsp_spinor;

/* <NABLA NABLA i|RINV |NABLA NABLA j> */
extern CINTOptimizerFunction int1e_ipiprinvipip_optimizer;
extern CINTIntegralFunction int1e_ipiprinvipip_cart;
extern CINTIntegralFunction int1e_ipiprinvipip_sph;
extern CINTIntegralFunction int1e_ipiprinvipip_spinor;
/* <NABLA NABLA i| 1/r_{grids} |j> */
extern CINTOptimizerFunction int1e_grids_ipip_optimizer;
extern CINTIntegralFunction int1e_grids_ipip_cart;
extern CINTIntegralFunction int1e_grids_ipip_sph;
extern CINTIntegralFunction int1e_grids_ipip_spinor;

/* <NABLA i|RINV |R j> */
extern CINTOptimizerFunction int1e_iprinvr_optimizer;
extern CINTIntegralFunction int1e_iprinvr_cart;
extern CINTIntegralFunction int1e_iprinvr_sph;
extern CINTIntegralFunction int1e_iprinvr_spinor;

/* <NABLA i|RINV |NABLA R NABLA j> */
extern CINTOptimizerFunction int1e_iprinviprip_optimizer;
extern CINTIntegralFunction int1e_iprinviprip_cart;
extern CINTIntegralFunction int1e_iprinviprip_sph;
extern CINTIntegralFunction int1e_iprinviprip_spinor;

/* <i|RINV |NABLA NABLA R NABLA j> */
extern CINTOptimizerFunction int1e_rinvipiprip_optimizer;
extern CINTIntegralFunction int1e_rinvipiprip_cart;
extern CINTIntegralFunction int1e_rinvipiprip_sph;
extern CINTIntegralFunction int1e_rinvipiprip_spinor;

/* <NABLA NABLA i|RINV |R NABLA j> */
extern CINTOptimizerFunction int1e_ipiprinvrip_optimizer;
extern CINTIntegralFunction int1e_ipiprinvrip_cart;
extern CINTIntegralFunction int1e_ipiprinvrip_sph;
extern CINTIntegralFunction int1e_ipiprinvrip_spinor;

/* <NABLA NABLA NABLA i|RINV |NABLA j> */
extern CINTOptimizerFunction int1e_ipipiprinvip_optimizer;
extern CINTIntegralFunction int1e_ipipiprinvip_cart;
extern CINTIntegralFunction int1e_ipipiprinvip_sph;
extern CINTIntegralFunction int1e_ipipiprinvip_spinor;

/* <NABLA NABLA NABLA NABLA i|RINV |j> */
extern CINTOptimizerFunction int1e_ipipipiprinv_optimizer;
extern CINTIntegralFunction int1e_ipipipiprinv_cart;
extern CINTIntegralFunction int1e_ipipipiprinv_sph;
extern CINTIntegralFunction int1e_ipipipiprinv_spinor;
1 change: 1 addition & 0 deletions scripts/auto_intor.cl
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
'("int1e_grids_ip" ( nabla \| grids \| ))
'("int1e_grids_ipvip" ( nabla \| grids \| nabla ))
'("int1e_grids_spvsp" ( sigma dot p \| grids \| sigma dot p ))
'("int1e_grids_ipip" ( nabla nabla \| grids \| ))
)


Expand Down
86 changes: 86 additions & 0 deletions src/autocode/int1e_grids1.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,89 @@ return CINT1e_grids_spinor_drv(out, dims, &envs, cache, &c2s_si_1e_grids);
} // int1e_grids_spvsp_spinor
ALL_CINT1E(int1e_grids_spvsp)
ALL_CINT1E_FORTRAN_(int1e_grids_spvsp)
/* <NABLA NABLA i| 1/r_{grids} |j> */
void CINTgout1e_int1e_grids_ipip(double *gout, double *g, FINT *idx, CINTEnvVars *envs, FINT gout_empty) {
FINT ngrids = envs->ngrids;
FINT bgrids = MIN(ngrids - envs->grids_offset, GRID_BLKSIZE);
FINT nrys_roots = envs->nrys_roots;
FINT nf = envs->nf;
FINT ix, iy, iz, n, i, ig;
double *g0 = g;
double *g1 = g0 + envs->g_size * 3;
double *g2 = g1 + envs->g_size * 3;
double *g3 = g2 + envs->g_size * 3;
double s[GRID_BLKSIZE * 9];
G1E_GRIDS_D_I(g1, g0, envs->i_l+1, envs->j_l);
G1E_GRIDS_D_I(g2, g0, envs->i_l+0, envs->j_l);
G1E_GRIDS_D_I(g3, g1, envs->i_l+0, envs->j_l);
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 < 9; i++) {
for (ig = 0; ig < bgrids; ig++) { s[ig+i*GRID_BLKSIZE] = 0; }}
for (i = 0; i < nrys_roots; i++) {
for (ig = 0; ig < bgrids; ig++) {
s[ig+GRID_BLKSIZE*0] += g3[ix+ig+i*GRID_BLKSIZE] * g0[iy+ig+i*GRID_BLKSIZE] * g0[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*1] += g2[ix+ig+i*GRID_BLKSIZE] * g1[iy+ig+i*GRID_BLKSIZE] * g0[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*2] += g2[ix+ig+i*GRID_BLKSIZE] * g0[iy+ig+i*GRID_BLKSIZE] * g1[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*3] += g1[ix+ig+i*GRID_BLKSIZE] * g2[iy+ig+i*GRID_BLKSIZE] * g0[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*4] += g0[ix+ig+i*GRID_BLKSIZE] * g3[iy+ig+i*GRID_BLKSIZE] * g0[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*5] += g0[ix+ig+i*GRID_BLKSIZE] * g2[iy+ig+i*GRID_BLKSIZE] * g1[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*6] += g1[ix+ig+i*GRID_BLKSIZE] * g0[iy+ig+i*GRID_BLKSIZE] * g2[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*7] += g0[ix+ig+i*GRID_BLKSIZE] * g1[iy+ig+i*GRID_BLKSIZE] * g2[iz+ig+i*GRID_BLKSIZE];
s[ig+GRID_BLKSIZE*8] += g0[ix+ig+i*GRID_BLKSIZE] * g0[iy+ig+i*GRID_BLKSIZE] * g3[iz+ig+i*GRID_BLKSIZE];
}};
if (gout_empty) {
for (ig = 0; ig < bgrids; ig++) {
gout[ig+bgrids*(n*9+0)] = + s[ig+GRID_BLKSIZE*0];
gout[ig+bgrids*(n*9+1)] = + s[ig+GRID_BLKSIZE*3];
gout[ig+bgrids*(n*9+2)] = + s[ig+GRID_BLKSIZE*6];
gout[ig+bgrids*(n*9+3)] = + s[ig+GRID_BLKSIZE*1];
gout[ig+bgrids*(n*9+4)] = + s[ig+GRID_BLKSIZE*4];
gout[ig+bgrids*(n*9+5)] = + s[ig+GRID_BLKSIZE*7];
gout[ig+bgrids*(n*9+6)] = + s[ig+GRID_BLKSIZE*2];
gout[ig+bgrids*(n*9+7)] = + s[ig+GRID_BLKSIZE*5];
gout[ig+bgrids*(n*9+8)] = + s[ig+GRID_BLKSIZE*8];
}} else {
for (ig = 0; ig < bgrids; ig++) {
gout[ig+bgrids*(n*9+0)] += + s[ig+GRID_BLKSIZE*0];
gout[ig+bgrids*(n*9+1)] += + s[ig+GRID_BLKSIZE*3];
gout[ig+bgrids*(n*9+2)] += + s[ig+GRID_BLKSIZE*6];
gout[ig+bgrids*(n*9+3)] += + s[ig+GRID_BLKSIZE*1];
gout[ig+bgrids*(n*9+4)] += + s[ig+GRID_BLKSIZE*4];
gout[ig+bgrids*(n*9+5)] += + s[ig+GRID_BLKSIZE*7];
gout[ig+bgrids*(n*9+6)] += + s[ig+GRID_BLKSIZE*2];
gout[ig+bgrids*(n*9+7)] += + s[ig+GRID_BLKSIZE*5];
gout[ig+bgrids*(n*9+8)] += + s[ig+GRID_BLKSIZE*8];
}}}}
void int1e_grids_ipip_optimizer(CINTOpt **opt, FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env) {
FINT ng[] = {2, 0, 0, 0, 2, 1, 0, 9};
CINTall_1e_grids_optimizer(opt, ng, atm, natm, bas, nbas, env);
}
CACHE_SIZE_T int1e_grids_ipip_cart(double *out, FINT *dims, FINT *shls,
FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env, CINTOpt *opt, double *cache) {
FINT ng[] = {2, 0, 0, 0, 2, 1, 0, 9};
CINTEnvVars envs;
CINTinit_int1e_grids_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env);
envs.f_gout = &CINTgout1e_int1e_grids_ipip;
return CINT1e_grids_drv(out, dims, &envs, cache, &c2s_cart_1e_grids);
} // int1e_grids_ipip_cart
CACHE_SIZE_T int1e_grids_ipip_sph(double *out, FINT *dims, FINT *shls,
FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env, CINTOpt *opt, double *cache) {
FINT ng[] = {2, 0, 0, 0, 2, 1, 0, 9};
CINTEnvVars envs;
CINTinit_int1e_grids_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env);
envs.f_gout = &CINTgout1e_int1e_grids_ipip;
return CINT1e_grids_drv(out, dims, &envs, cache, &c2s_sph_1e_grids);
} // int1e_grids_ipip_sph
CACHE_SIZE_T int1e_grids_ipip_spinor(double complex *out, FINT *dims, FINT *shls,
FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env, CINTOpt *opt, double *cache) {
FINT ng[] = {2, 0, 0, 0, 2, 1, 0, 9};
CINTEnvVars envs;
CINTinit_int1e_grids_EnvVars(&envs, ng, shls, atm, natm, bas, nbas, env);
envs.f_gout = &CINTgout1e_int1e_grids_ipip;
return CINT1e_grids_spinor_drv(out, dims, &envs, cache, &c2s_sf_1e_grids);
} // int1e_grids_ipip_spinor
ALL_CINT1E(int1e_grids_ipip)
ALL_CINT1E_FORTRAN_(int1e_grids_ipip)

0 comments on commit ea3857f

Please sign in to comment.