So I’ve installed the “LAMMPS 64-bit 22Jul2025 with Python” version of Lammp for Windows.
When I run
C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\Examples\mliap>python mliap_pytorch_ACE.py
I’m seeing this stupid error:
Traceback (most recent call last):
File "C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\Python\lammps\mliap\loader.py", line 65, in activate_mliappy
loader = DynamicLoader(module_name,library,api_version)
File "C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\Python\lammps\mliap\loader.py", line 34, in __init__
initfunc = getattr(library,attr)
File "C:\Python313\Lib\ctypes\__init__.py", line 403, in __getattr__
func = self.__getitem__(name)
File "C:\Python313\Lib\ctypes\__init__.py", line 408, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'PyInit_mliap_model_python_couple' not found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\Examples\mliap\mliap_pytorch_ACE.py", line 73, in <module>
lammps.mliap.activate_mliappy(lmp)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\Python\lammps\mliap\loader.py", line 73, in activate_mliappy
raise ImportError("Could not load ML-IAP python coupling module.") from ee
ImportError: Could not load ML-IAP python coupling module.
Total wall time: 0:00:00
When I run lmp -h
I am seeing:
Installed packages:
AMOEBA ASPHERE ATC AWPMD BOCS BODY BPM BROWNIAN CG-DNA CG-SPICA CLASS2 COLLOID
COLVARS COMPRESS CORESHELL DIELECTRIC DIFFRACTION DIPOLE DPD-BASIC DPD-MESO
DPD-REACT DPD-SMOOTH DRUDE EFF ELECTRODE EXTRA-COMMAND EXTRA-COMPUTE
EXTRA-DUMP EXTRA-FIX EXTRA-MOLECULE EXTRA-PAIR FEP GPU GRANULAR INTERLAYER
KOKKOS KSPACE LEPTON MACHDYN MANIFOLD MANYBODY MC MDI MEAM MESONT MGPT MISC
**ML-HDNNP ML-IAP ML-POD ML-RANN ML-SNAP ML-UF3** MOFFF MOLECULE MOLFILE OPENMP
OPT ORIENT PERI PHONON PLUGIN POEMS PTM PYTHON QEQ QTB REACTION REAXFF REPLICA
RHEO RIGID SHOCK SMTBQ SPH SPIN SRD TALLY UEF VORONOI YAFF
where lmp
outputs C:\Users\strun\AppData\Local\LAMMPS 64-bit 22Jul2025 with Python\bin\lmp.exe
I’ve also tried various complete restarts.
I know it’s missing this, but I don’t know how I can compile and provide that to it.
I’ve tried setting system and user environment variables.
I’ve been trying to build lammps on Windows and Linux with the ML-IAP package installed but that is apparently too hard for me after trying for ~5 hours?
I’ve tried using different python versions (3.10, 3.12, 3.13) to run the example script, but the issue persists.
Can anyone help me?
I wouldn’t ask if I hadn’t thoroughly failed.
Big thanks in advance.