Out of range atoms error by doing rerun

Hello everyone,
I performed an NPT equilibration for 5 ns. My system consists of four different molecules, with one part of one molecule being rigid. Below are the fixes I used during the simulation:

fix 1 mol1 rigid/nvt molecule temp 298 298 100
fix 2 Flex shake 0.00001 50 0 b 37 a 73
fix 3 Flex npt temp 298 298 100 iso 1.0 1.0 1000

The simulation ran successfully, generating a trajectory file and a data file. I then attempted a rerun to calculate the interaction energies between two specific molecules using the following commands:

compute total_mol4_mol7 mol4 group/group mol7 pair yes kspace yes molecule inter
fix 1 all ave/time 1 1 1 c_total_mol4_mol7 file total_mol4_mol7.out
rerun NPT.lammpstrj every 1 skip 1 dump x y z ix iy iz box yes scaled yes format native

However, the rerun fails immediately with the following error message:

ERROR on proc 4: Out of range atoms - cannot compute PPPM (…/pppm.cpp:1887)

Could this issue be related to the fact that the system might not have been fully equilibrated during the initial timesteps of the trajectory? If not, what might be the cause of this error, and how can I resolve it?

Any insights or suggestions would be greatly appreciated.

Thank you!