As an introduction to molecular dynamics, I am using LAMMPS via Atomify to compute the heat capacity of a Lennard-Jones fluid.
I have already implemented one method, which exploits the idea that Cv corresponds to the slope of the U-T curve.
However, I have encountered an issue with the second method, which relies on energy fluctuations in the canonical ensemble. The results I obtain deviate significantly from the standard values provided by my references. I am using a Nose-Hoover thermostat and working in the canonical ensemble.
It seems to my unexperienced self that energy does not fluctuate enough to get a desirable result. I don’t know where the problem is as I already managed to get it working for the first method.
I attach the results I got trying to compute it using energy fluctuations.
Cheers