Skip to content

Commit

Permalink
small bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Jan 6, 2022
1 parent 7c33126 commit bcf673d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tds/metadynamics_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def __init__(self, project, job_name):
super().__init__(project, job_name)
self.input = DataContainer(table_name='input')
self.output = DataContainer(table_name='output')
self.input.n_print = 1000
self.input.update_every_n_steps = 100
self.input.sigma = 0.2
self.input.spacing = 0.25
Expand Down Expand Up @@ -89,7 +88,7 @@ def get_force(self, x):
index = np.rint(x / self.spacing).astype(int) % len(self.mesh)
dBds = self.output.dBds[index]
if self.input.use_gradient:
dx = self.mesh[index] - x
dx = x - self.mesh[index]
dx -= self.length * np.rint(dx / self.length)
dBds += dx * self.output.ddBdds[index]
return -dBds
Expand Down
4 changes: 2 additions & 2 deletions tds/metadynamics_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def run_static(self):
self.status.collect = True
self.ref_job.interactive_close()
self.output.x = self.unit_cell.x_lst
self.output.energy = self.unit_cell.B
self.output.energy = self.unit_cell.dBds
self.output.B = self.unit_cell.B
self.output.dBds = self.unit_cell.dBds
self.status.finished = True
self.to_hdf()

Expand Down

0 comments on commit bcf673d

Please sign in to comment.