Calculating Interaction Energy between an Atom/Molecule and Surface using LAMMPS

I am looking to create a LAMMPS script that can calculate the interaction energy between an atom or small molecule and a surface, at a fixed height, by varying the coordinates of that atom/small molecule along the plane of the surface. The goal is to obtain the potential energy of the compound. I plan to use a python script to change the solute coordinates and perform an NVE-type simulation. However, I will not integrate the solute coordinates. I would like to know if there is a more efficient protocol in LAMMPS and if my proposed approach seems reasonable.

The downside of your approach is that you have to do a “run 0” for each step to get the potential energy, which does the whole “run setup” including initializing the neighbor lists.
It would only be needed to update the neighbor lists after your moving atom/molecule has moved for a bit. So more efficient use would be to use the fix move command (and no other time integration fix so that all other atoms remain immobile) and then fix print to commit the data of the PES to a file.

Using the fix move sounds like a great idea to me. I hadn’t considered it before. However, I initially only used it for a single direction, thinking that applying it to a 2D structure would be complicated. But it’s a significant improvement from my original idea, which required initializing the script for each line and incrementing the lines. Upon further research, I discovered that there is a “variable” option that could potentially solve the problem of moving in both the x and y direction in a 2D case.