Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sblackburn-mila committed Apr 5, 2024
1 parent 4cd3734 commit 6a39fd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crystal_diffusion/oracle/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def get_energy_and_forces_from_lammps(positions: np.ndarray,
n_atom = positions.shape[0]
assert atom_types.shape == (n_atom, ), f"Atom types should match the number of atoms. Got {atom_types.shape}."
lmp = lammps.lammps() # create a lammps run
assert np.allclose(box, np.diag(np.diag(box))), "only orthogonal LAMMPS box are valid"
lmp.command(f"region simbox block 0 {box[0, 0]} 0 {box[1, 1]} 0 {box[2, 2]}") # TODO what if box is not orthogonal
lmp.command("create_box 1 simbox")
lmp.command("pair_style sw")
Expand Down

0 comments on commit 6a39fd1

Please sign in to comment.