[in.simple.txt](https://github.com/user-attachments/files/21578962/in.simple.txt) As discussed with @jan-janssen, `LammpsLibrary` at the moment cannot be used as follows: ``` from pylammpsmpi import LammpsLibrary def callback(caller, ntimestep, nlocal, tag, x, f): lmp = caller[0] print(f"energy_pot = {lmp.get_thermo('pe')}") lmp = LammpsLibrary(cores=4, oversubscribe=False, working_directory=".", client=None, cmdargs=None) lmp.file("in.simple") lmp.fix(f"test all external pf/callback 1 1") lmp.set_fix_external_callback("test", callback, [lmp]) lmp.run(0) ``` The objective here is to use LAMMPS' `fix external` command to do some math in the `callback` function using properties from the LAMMPS instance. It works without any issues with `lammps.lammps`.