From 8fead8334c3d67af75acdb22a771adf2cd4f4e57 Mon Sep 17 00:00:00 2001 From: NicoRenaud Date: Mon, 17 Aug 2020 15:00:37 +0200 Subject: [PATCH] syntax fix --- h5x/baseimport.py | 7 +++++++ qmctorch/sampler/hamiltonian.py | 6 +++--- qmctorch/wavefunction/wf_orbital.py | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/h5x/baseimport.py b/h5x/baseimport.py index f6ba1840..9640e217 100644 --- a/h5x/baseimport.py +++ b/h5x/baseimport.py @@ -1,2 +1,9 @@ from qmctorch.utils import ( plot_energy, plot_data, plot_block, plot_walkers_traj) +import matplotlib.pyplot as plt +import numpy as np + +print(r" ____ __ ______________ _") +print(r" / __ \ / |/ / ___/_ __/__ ________/ / ") +print(r"/ /_/ / / /|_/ / /__ / / / _ \/ __/ __/ _ \ ") +print(r"\___\_\/_/ /_/\___/ /_/ \___/_/ \__/_//_/ ") diff --git a/qmctorch/sampler/hamiltonian.py b/qmctorch/sampler/hamiltonian.py index aabbb60b..c4e284c9 100644 --- a/qmctorch/sampler/hamiltonian.py +++ b/qmctorch/sampler/hamiltonian.py @@ -46,7 +46,7 @@ def log_func(func): return lambda x: -torch.log(func(x)) def __call__(self, pdf, pos=None, with_tqdm=True): - """Generate walkers followinf HMC + """Generate walkers following HMC Arguments: pdf {callable} -- density to sample @@ -102,7 +102,7 @@ def __call__(self, pdf, pos=None, with_tqdm=True): def _step(U, get_grad, epsilon, L, qinit): '''Propagates all the walkers over on traj Args: - pdf (callable): the target dist + U (callable): the target pdf get_grad (callable) : get the value of the target dist gradient epsilon (float) : step size L (int) : number of steps in the traj @@ -137,7 +137,7 @@ def _step(U, get_grad, epsilon, L, qinit): p = -p # current energy term - Enew = U(q) + 0.5 * (p**2).sum(1) + Enew = U(q) + 0.5 * (p*pS).sum(1) # metropolix accept/reject eps = torch.rand(Enew.shape) diff --git a/qmctorch/wavefunction/wf_orbital.py b/qmctorch/wavefunction/wf_orbital.py index e390f97a..96b2a16e 100644 --- a/qmctorch/wavefunction/wf_orbital.py +++ b/qmctorch/wavefunction/wf_orbital.py @@ -353,7 +353,7 @@ def geometry(self, pos): def gto2sto(self, plot=False): """Fits the AO GTO to AO STO. - The sto have only one basis function per ao + The SZ sto tht have only one basis function per ao """ assert(self.ao.radial_type.startswith('gto'))