Skip to content

Commit

Permalink
Fix bug in df.incore and nr_direct_dot.c
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Sep 24, 2023
1 parent 94d6ea8 commit 4bb86e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyscf/df/incore.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def cholesky_eri(mol, auxbasis='weigend+etb', auxmol=None,
low = _eig_decompose(mol, j2c, lindep)
decompose_j2c = 'eig'
j2c = None
naoaux, naux = low.shape
naux, naoaux = low.shape
log.debug('size of aux basis %d', naux)
log.timer_debug1('2c2e', *t0)

Expand Down
2 changes: 1 addition & 1 deletion pyscf/df/lrdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def _angular_grids_legendre2d(n):
xs, wt = scipy.special.roots_legendre(m)
phi, wp = scipy.special.roots_legendre(m)
theta = np.arccos(xs)
phi += 1.
phi *= np.pi
phi += np.pi
wp *= np.pi
x = np.sin(theta[:,None]) * np.cos(phi)
y = np.sin(theta[:,None]) * np.sin(phi)
Expand Down
4 changes: 2 additions & 2 deletions pyscf/lib/vhf/nr_direct_dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void JKOperator_write_back(double *vjk, JKArray *jkarray, int *ao_loc,
j0 = ao_loc[jsh];
di = ao_loc[ish+1] - i0;
dj = ao_loc[jsh+1] - j0;
pd = data + (i0 - block_i0) * block_dj + (j0 - block_j0) * di;
pd = data + ((i0 - block_i0) * block_dj + (j0 - block_j0) * di) * ncomp;
pv = vjk + i0*vcol+j0 - voffset;
for (icomp = 0; icomp < ncomp; icomp++) {
for (i = 0; i < di; i++) {
Expand Down Expand Up @@ -190,7 +190,7 @@ static void JKOperator_sanity_check_s8(int *shls_slice)
out->key_counts++; \
} \
double *v = out->data + *_poutptr; \
v += (i##0-ao_off[i##SH]) * shape[j##SH] + (j##0-ao_off[j##SH]) * d##i;
v += ((i##0-ao_off[i##SH]) * shape[j##SH] + (j##0-ao_off[j##SH]) * d##i) * ncomp;

#define DECLARE(v, i, j) \
int ncomp = out->ncomp; \
Expand Down

0 comments on commit 4bb86e6

Please sign in to comment.