[lammps-users] sum all values in compute


I compute the pe/atom for a group and want to define the total pe of that group as the sum of these components to then
output that variable with thermo.

Is there an operation in variable that sums all values of a compute? (or would you consider adding that operation?)
What is the most efficient way to add all the values of a given compute into a global variable?

thanks for your help,

See the compute sum command.