[lammps-users] sum all values in compute

Hello,

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,
vale

See the compute sum command.

Steve