Skip to content

Commit

Permalink
Merge pull request #232 from apax-hub/nl_gas_fix
Browse files Browse the repository at this point in the history
fixed bug where positions where not initialized for gas phase systems
  • Loading branch information
M-R-Schaefer authored Feb 27, 2024
2 parents 240eaf5 + 792d548 commit 864558c
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 864558c

Please sign in to comment.