Skip to content

Commit

Permalink
fixed bug where positions where not initialized for gas phase systems…
Browse files Browse the repository at this point in the history
… in ASE calc
  • Loading branch information
M-R-Schaefer committed Feb 26, 2024
1 parent 240eaf5 commit 792d548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apax/md/ase_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 792d548

Please sign in to comment.