From a35f79e3f2010fbf98ea6fdeb1a4967e272622b4 Mon Sep 17 00:00:00 2001 From: samwaseda Date: Fri, 27 Oct 2023 09:47:49 +0000 Subject: [PATCH] correct direction and pass dx --- pyiron_contrib/atomistics/atomistics/master/qha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyiron_contrib/atomistics/atomistics/master/qha.py b/pyiron_contrib/atomistics/atomistics/master/qha.py index b6b689b25..cb3600a7e 100644 --- a/pyiron_contrib/atomistics/atomistics/master/qha.py +++ b/pyiron_contrib/atomistics/atomistics/master/qha.py @@ -103,7 +103,7 @@ def get_unique_indices(self, positive=True): def get_displacements(self, positive=True): ind_x, ind_y = self.get_unique_indices(positive=positive) displacements = np.zeros((len(ind_x),) + self.structure.positions.shape) - displacements[np.arange(len(ind_x)), ind_x, ind_y] = 1 + displacements[np.arange(len(ind_x)), ind_x, ind_y] = -1 + 2 * positive return displacements @property @@ -405,6 +405,7 @@ def hessian(self): include_zero_displacement=self.input["include_zero_displacement"], second_order=self.input["second_order"], symprec=self.input["symprec"], + dx=self.input["displacement"] ) return self._hessian