From bcf673dad9732d1910f921f581540cc9a0e84507 Mon Sep 17 00:00:00 2001 From: Sam Waseda Date: Thu, 6 Jan 2022 22:21:19 +0100 Subject: [PATCH] small bugfixes --- tds/metadynamics_1d.py | 3 +-- tds/metadynamics_3d.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tds/metadynamics_1d.py b/tds/metadynamics_1d.py index 2d76313..30fdca9 100644 --- a/tds/metadynamics_1d.py +++ b/tds/metadynamics_1d.py @@ -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 @@ -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 diff --git a/tds/metadynamics_3d.py b/tds/metadynamics_3d.py index 8d9d6fc..4d7adac 100644 --- a/tds/metadynamics_3d.py +++ b/tds/metadynamics_3d.py @@ -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()