Problem regarding compute group/group

Hello,

LAMMPS version: 23 Jun 2022. I am trying to calculate interaction energy using compute group/group command as follows:

Case-1:
compute 1 graphite group/group PVA kspace yes
compute 2 PVA group/group PVA kspace yes
fix energy all ave/time 10000 10 100000 c_1 c_2 file energy.txt

When I use 2 fix/ave to get the output (Case-2), I get a different answer (different energy output) and a warning “WARNING: Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero (src/compute_group_group.cpp:143)”

Case-2:
compute 1 graphite group/group PVA kspace yes
compute 2 PVA group/group PVA kspace yes
fix energy1 all ave/time 10000 10 100000 c_1 file energy1.txt
fix energy2 all ave/time 10000 10 100000 c_2 file energy2.txt

If I use only one of the computes (either compute 1 or compute 2) in the input script and use that in fix ave/time, result is the same as the Case-1 and there is no warning. I wanted to know if there is any difference in the Case-1 and Case-2 due to which I get different results and a warning in the Case-2?

Thank you

There are likely differences in your inputs elsewhere.