Skip to content

Commit

Permalink
fix codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Apr 26, 2023
1 parent 1925bf2 commit 6463a85
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions qmctorch/scf/calculator/adf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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."""
Expand Down
6 changes: 3 additions & 3 deletions qmctorch/solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 - <E_L >) >
'''
# Get the gradient of the total energy
# dE/dk = < (dpsi/dk)/psi (E_L - <E_L >) >


# compute local energy and wf values
_, eloc = self.loss(lpos, no_grad=no_grad_eloc)
Expand Down
1 change: 1 addition & 0 deletions qmctorch/utils/hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion qmctorch/utils/plot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 6463a85

Please sign in to comment.