I used your spc/e code and data file and ran both.
I then used your data file in my code ( using your parameters),
and got identical output values. So the code is ok.
The “nan” error was from overlapping water molecules I created randomly; ( somehow, the same random
data worked when pair_coeff * * was non zero ).
No “nan” error occurred, when I created water molecules on a uniform grid without overlap.
Thanks again for the spc/e bench mark link.
regards
shankar