From 5ef3a24d118e7bf2df4fe1ee877947f8834fff75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Mon, 8 Jun 2026 08:43:28 +0200 Subject: [PATCH 1/7] Update LAMMPS to latest version --- .ci_support/environment-lammps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_support/environment-lammps.yml b/.ci_support/environment-lammps.yml index 26a589c3c..169556599 100644 --- a/.ci_support/environment-lammps.yml +++ b/.ci_support/environment-lammps.yml @@ -1,4 +1,4 @@ channels: - conda-forge dependencies: -- lammps =2024.08.29=*openmpi* +- lammps =2025.07.22 From 5553aeae23bbec2c5d1383cf114c0e74d1547f24 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 08:51:47 +0200 Subject: [PATCH 2/7] Update environment-lammps.yml --- .ci_support/environment-lammps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_support/environment-lammps.yml b/.ci_support/environment-lammps.yml index 169556599..e5f0e6d37 100644 --- a/.ci_support/environment-lammps.yml +++ b/.ci_support/environment-lammps.yml @@ -1,4 +1,4 @@ channels: - conda-forge dependencies: -- lammps =2025.07.22 +- lammps =2025.07.22=*openmpi* From d556dd506f1aef3e8b25c6cf445824e29bdde22c Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 11:50:20 +0200 Subject: [PATCH 3/7] in create_atoms() change id to atomid --- src/structuretoolkit/analyse/snap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structuretoolkit/analyse/snap.py b/src/structuretoolkit/analyse/snap.py index faeb4acba..ea969df7c 100644 --- a/src/structuretoolkit/analyse/snap.py +++ b/src/structuretoolkit/analyse/snap.py @@ -268,7 +268,7 @@ 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, + atomid=None, type=(len(elem_all) * c_int)(*elem_all), x=(len(positions) * c_double)(*positions), v=None, From f837d0bdcd7671764e414614c68ba7ddb41bd7f6 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 11:52:57 +0200 Subject: [PATCH 4/7] in create_atoms() change type to atype --- src/structuretoolkit/analyse/snap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structuretoolkit/analyse/snap.py b/src/structuretoolkit/analyse/snap.py index ea969df7c..7dedaea85 100644 --- a/src/structuretoolkit/analyse/snap.py +++ b/src/structuretoolkit/analyse/snap.py @@ -269,7 +269,7 @@ def _set_ase_structure(lmp, structure: Atoms): lmp.create_atoms( n=len(structure), atomid=None, - type=(len(elem_all) * c_int)(*elem_all), + atype=(len(elem_all) * c_int)(*elem_all), x=(len(positions) * c_double)(*positions), v=None, image=None, From 74f1cfa412c250d9d93ec3468928f399907b8a1a Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 11:57:31 +0200 Subject: [PATCH 5/7] Use extract_atom() rather than extract_atom_iarray() --- src/structuretoolkit/analyse/snap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structuretoolkit/analyse/snap.py b/src/structuretoolkit/analyse/snap.py index 7dedaea85..582f3f403 100644 --- a/src/structuretoolkit/analyse/snap.py +++ b/src/structuretoolkit/analyse/snap.py @@ -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").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").flatten() lmp_volume = lmp.get_thermo("vol") # Extract Bsum From 24a9becb795d06f3e557b343fe401a949469b8f5 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 12:37:50 +0200 Subject: [PATCH 6/7] Add debug print statement --- src/structuretoolkit/analyse/snap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structuretoolkit/analyse/snap.py b/src/structuretoolkit/analyse/snap.py index 582f3f403..6079313ff 100644 --- a/src/structuretoolkit/analyse/snap.py +++ b/src/structuretoolkit/analyse/snap.py @@ -548,6 +548,7 @@ def _extract_computes_snap( np.ndarray: Output of the LAMMPS compute command """ lmp_atom_ids = lmp.numpy.extract_atom(name="id").flatten() + print(lmp_atom_ids) cond = bool(np.all(lmp_atom_ids == 1 + np.arange(num_atoms))) assert cond, "LAMMPS seems to have lost atoms" From e1758613c51ce4b659a7b6df435b8e97e6a43c0b Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Jun 2026 12:44:07 +0200 Subject: [PATCH 7/7] fix nelem --- src/structuretoolkit/analyse/snap.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/structuretoolkit/analyse/snap.py b/src/structuretoolkit/analyse/snap.py index 6079313ff..5bb53f507 100644 --- a/src/structuretoolkit/analyse/snap.py +++ b/src/structuretoolkit/analyse/snap.py @@ -547,13 +547,12 @@ def _extract_computes_snap( Returns: np.ndarray: Output of the LAMMPS compute command """ - lmp_atom_ids = lmp.numpy.extract_atom(name="id").flatten() - print(lmp_atom_ids) + 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(name="type").flatten() + lmp_types = lmp.numpy.extract_atom(name="type", nelem=num_atoms).flatten() lmp_volume = lmp.get_thermo("vol") # Extract Bsum