diff --git a/qmctorch/scf/calculator/adf.py b/qmctorch/scf/calculator/adf.py index baabf9db..ebe262fa 100644 --- a/qmctorch/scf/calculator/adf.py +++ b/qmctorch/scf/calculator/adf.py @@ -26,7 +26,7 @@ def __init__(self, atoms, atom_coords, basis, scf, units, molname, savefile): 'CVB1', 'CVB2', 'CVB3'] self.additional_basis_path = os.path.join(os.path.dirname( - os.path.abspath(__file__)), 'atomicdata/adf/') + os.path.abspath(__file__)), 'atomicdata/adf/') self.adf_version = 'adf2020+' self.job_name = ''.join(self.atoms) + '_' + self.basis_name @@ -94,8 +94,7 @@ def get_plams_settings(self): for at in self.atoms: if at not in parsed_atoms: basis_path = os.path.join(self.additional_basis_path, self.basis_name.upper(), at) - atomtype = "Symbol={at} File={path}".format(at=at, - path=basis_path) + atomtype = f"Symbol={at} File={basis_path}" sett.input.adf.basis.peratomtype = atomtype parsed_atoms.append(at) else: @@ -247,7 +246,7 @@ def __init__(self, atoms, atom_coords, basis, scf, units, molname, savefile): self.adf_version = 'adf2019' self.job_name = ''.join(self.atoms) + '_' + self.basis_name - self.output_file = self.job_name + '.t21' + self.output_file = self.job_name + '.t21' def get_plams_molecule(self): """Returns a plams molecule object.""" diff --git a/qmctorch/solver/solver.py b/qmctorch/solver/solver.py index f642823a..b43d0fdf 100644 --- a/qmctorch/solver/solver.py +++ b/qmctorch/solver/solver.py @@ -413,9 +413,9 @@ def evaluate_grad_manual(self, lpos): if self.loss.method in ['energy', 'weighted-energy']: - ''' Get the gradient of the total energy - dE/dk = < (dpsi/dk)/psi (E_L - ) > - ''' + # Get the gradient of the total energy + # dE/dk = < (dpsi/dk)/psi (E_L - ) > + # compute local energy and wf values _, eloc = self.loss(lpos, no_grad=no_grad_eloc) diff --git a/qmctorch/utils/hdf5_utils.py b/qmctorch/utils/hdf5_utils.py index 220bd3e9..87036463 100644 --- a/qmctorch/utils/hdf5_utils.py +++ b/qmctorch/utils/hdf5_utils.py @@ -249,6 +249,7 @@ def insert_data(obj, parent_grp, obj_name): insert_fn(obj, parent_grp, obj_name) # insert_type(obj, parent_grp, obj_name) except Exception as expt_message: + print(expt_message) print_insert_error(obj, obj_name) diff --git a/qmctorch/utils/plot_data.py b/qmctorch/utils/plot_data.py index 0c6d06d7..7a5a4ce0 100644 --- a/qmctorch/utils/plot_data.py +++ b/qmctorch/utils/plot_data.py @@ -75,7 +75,7 @@ def plot_walkers_traj(eloc, walkers='mean'): nstep, nwalkers = eloc.shape celoc = np.cumsum(eloc, axis=0).T celoc /= np.arange(1, nstep + 1) - + if walkers is not None: if walkers == 'all':