ERROR: Per-atom energy was not tallied on needed timestep

Hello,

I am trying to use fix/bond react constrains section on map file and let a reaction happen when the total potential energy of the reaction site exceeds a certain value. To do that as the documentation suggests I have to compute the per atom potential energy (compute pe/atom) abd asign it ti an atom style variable and refer to that in the map file. When I try to implement that I get the ERROR Per-atom energy was not tallied on needed timestep. I have used the run 0 command to initialise the potential energy befor fix/bond react tries to use it but i still get the error. LAMMPS version is 29 Aug 2024. I attach my files.

PS: The nevery variable is set to 10 as I want the fix bond/react to be used every 10 time steps. When I change the thermo output to 1 the error does not exist until the time step 10. So the problem is something to do with the fix bond/react trying to acces the pe/atom values.

Thanks!
input_files.tar.gz (2.2 MB)

Jacob

Please see the response to this recent post: Tallying virial without thermo output

Hello Axel!

Thanks a lot. Resolved using the following commands

compute        2 all pe/atom
fix            per_atom_pot all ave/atom 1 1 1 c_2
variable       my_pe atom c_2