Skip to content

Commit

Permalink
fix mcgn test
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Nov 29, 2023
1 parent 6085953 commit 4c2a354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/wavefunction/test_slater_mgcn_graph_jastrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_kinetic_energy(self):
assert torch.allclose(eauto.data, ejac.data, rtol=1e-4, atol=1e-4)

def test_gradients_wf(self):
grads = self.wf.gradients_jacobi_no_backflow(self.pos, sum_grad=False).squeeze()
grads = self.wf.gradients_jacobi(self.pos, sum_grad=False).squeeze()
grad_auto = self.wf.gradients_autograd(self.pos)

assert torch.allclose(grads.sum(), grad_auto.sum())
Expand All @@ -166,7 +166,7 @@ def test_gradients_wf(self):
assert torch.allclose(grads, grad_auto)

def test_gradients_pdf(self):
grads_pdf = self.wf.gradients_jacobi_no_backflow(self.pos, pdf=True)
grads_pdf = self.wf.gradients_jacobi(self.pos, pdf=True)
grads_auto = self.wf.gradients_autograd(self.pos, pdf=True)

assert torch.allclose(grads_pdf.sum(), grads_auto.sum())
Expand Down

0 comments on commit 4c2a354

Please sign in to comment.