From 792d548e12ff7e74003439a3f44a43a46033a2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=2E=20Sch=C3=A4fer?= Date: Mon, 26 Feb 2024 11:09:43 +0100 Subject: [PATCH] fixed bug where positions where not initialized for gas phase systems in ASE calc --- apax/md/ase_calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apax/md/ase_calc.py b/apax/md/ase_calc.py index 3a69d2e6..48e62516 100644 --- a/apax/md/ase_calc.py +++ b/apax/md/ase_calc.py @@ -150,8 +150,8 @@ def initialize(self, atoms): self.neighbor_fn = neighbor_fn if self.neigbor_from_jax: + positions = jnp.asarray(atoms.positions, dtype=jnp.float64) if np.any(atoms.get_cell().lengths() > 1e-6): - positions = jnp.asarray(atoms.positions, dtype=jnp.float64) box = atoms.cell.array.T inv_box = jnp.linalg.inv(box) positions = space.transform(inv_box, positions) # frac coords