Skip to content

Commit

Permalink
fix import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Mar 14, 2022
1 parent 4e35c32 commit 91958c1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions example/single_point/h2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from qmctorch.wavefunction.jastrows.elec_elec import JastrowFactor, PadeJastrowKernel
from qmctorch.sampler import Metropolis
from qmctorch.solver import SolverSlaterJastrow
from qmctorch.utils import plot_walkers_traj
from qmctorch.utils import set_torch_double_precision
set_torch_double_precision()

Expand All @@ -26,19 +25,19 @@
logspace=False)


pos = sampler(wf.pdf)
e, s, err = wf._energy_variance_error(pos)
# pos = sampler(wf.pdf)
# e, s, err = wf._energy_variance_error(pos)

# print data
print(' Energy : %f +/- %f' %
(e.detach().item(), err.detach().item()))
print(' Variance : %f' % s.detach().item())
# # print data
# print(' Energy : %f +/- %f' %
# (e.detach().item(), err.detach().item()))
# print(' Variance : %f' % s.detach().item())

# # solver
# solver = SolverSlaterJastrow(wf=wf, sampler=sampler)
# solver
solver = SolverSlaterJastrow(wf=wf, sampler=sampler)

# # single point
# obs = solver.single_point(logspace=True)
# single point
obs = solver.single_point()

# # reconfigure sampler
# solver.sampler.ntherm = 0
Expand Down

0 comments on commit 91958c1

Please sign in to comment.