Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci_support/environment-lammps.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
channels:
- conda-forge
dependencies:
- lammps =2024.08.29=*openmpi*
- lammps =2025.07.22=*openmpi*
8 changes: 4 additions & 4 deletions src/structuretoolkit/analyse/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def _set_ase_structure(lmp, structure: Atoms):
elem_all = np.array([el_dict[el] + 1 for el in structure.get_chemical_symbols()])
lmp.create_atoms(
n=len(structure),
id=None,
type=(len(elem_all) * c_int)(*elem_all),
atomid=None,
atype=(len(elem_all) * c_int)(*elem_all),
x=(len(positions) * c_double)(*positions),
v=None,
image=None,
Expand Down Expand Up @@ -547,12 +547,12 @@ def _extract_computes_snap(
Returns:
np.ndarray: Output of the LAMMPS compute command
"""
lmp_atom_ids = lmp.numpy.extract_atom_iarray("id", num_atoms).flatten()
lmp_atom_ids = lmp.numpy.extract_atom(name="id", nelem=num_atoms).flatten()
cond = bool(np.all(lmp_atom_ids == 1 + np.arange(num_atoms)))
assert cond, "LAMMPS seems to have lost atoms"

# Extract types
lmp_types = lmp.numpy.extract_atom_iarray(name="type", nelem=num_atoms).flatten()
lmp_types = lmp.numpy.extract_atom(name="type", nelem=num_atoms).flatten()
lmp_volume = lmp.get_thermo("vol")

# Extract Bsum
Expand Down
Loading