Skip to content

Commit

Permalink
Bugfix for breit integral
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Mar 24, 2018
1 parent 308cf1c commit ee6c43b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Version 3.0.11 (2018-03-23):
* Fix breit integrals
Version 3.0.10 (2018-03-20):
* New integrals
<i | r p | j>,
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
libcint
=======

version 3.0.10
2018-03-20
version 3.0.11
2018-03-23


What is libcint
Expand Down
12 changes: 10 additions & 2 deletions src/breit.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ FINT int2e_breit_##X##_spinor(double complex *out, FINT *dims, FINT *shls, \
CINTOpt *opt, double *cache) \
{ \
return _int2e_breit_drv(out, dims, shls, atm, natm, bas, nbas, env, opt, cache, \
1, &int2e_##X##_spinor, \
ncomp_tensor, &int2e_##X##_spinor, \
&int2e_gauge_r1_##X##_spinor, &int2e_gauge_r2_##X##_spinor); \
} \
FINT cint2e_breit_##X(double complex *out, FINT *shls, \
FINT cint2e_breit_##X##_spinor(double complex *out, FINT *shls, \
FINT *atm, FINT natm, FINT *bas, FINT nbas, double *env, \
CINTOpt *opt) \
{ \
Expand Down Expand Up @@ -84,6 +84,14 @@ static FINT _int2e_breit_drv(double complex *out, FINT *dims, FINT *shls,
CINTOpt *opt, double *cache, int ncomp_tensor,
int (*f_gaunt)(), int (*f_gauge_r1)(), int (*f_gauge_r2)())
{
if (out == NULL) {
FINT cache_size1 = (*f_gauge_r1)(NULL, NULL, shls,
atm, natm, bas, nbas, env, NULL, cache);
FINT cache_size2 = (*f_gauge_r2)(NULL, NULL, shls,
atm, natm, bas, nbas, env, NULL, cache);
return MAX(cache_size1, cache_size2);
}

FINT counts[4];
counts[0] = CINTcgto_spinor(shls[0], bas);
counts[1] = CINTcgto_spinor(shls[1], bas);
Expand Down

0 comments on commit ee6c43b

Please # to comment.