Hi LAMMPS users,
In my current project, I am using the python-LAMMPS interface from a python function embedded within my LAMMPS input script. This python function is called during each timestep and accesses/changes per-atom properties using the “lmp.gather_atoms()” and “lmp.scatter_atoms()” methods. I now want to access a per-atom potential energy variable (and corresponding per-atom id) in a similar fashion. I am accessing this atom style variable from within python via the “lmp.extract_variable()” method. However, I noticed that each processor seems to return a separate python list. Is there a way to retrieve the per-atom potential energy as a single list in python? If not, is there a way for me to combine these variables into a single variable? The python code is mpi4py enabled and I am running on LAMMPS version 20161117. Thanks for your help.
Ethan