How to calculate specific heat at constant pressure

Dear LAMMPS users and developers,

I want to obtain the specific heat by calculating dH/dT under NPT ensemble.
I do not know how to calculate dH/dT in a proper way. I try to use finite difference to approximate derivative. However, I got a negative value no matter the difference formulas used including forward, backward and central difference.
I convert eV to J/mol as: enthalpy(in eV)*1.602176634e-19/(natoms/6.02214076e23)
The H-T and dH/dT-T relation in my simulation have been uploaded. The simulation temperature is 2000K. Could someone please give me some suggestions? Thanks for any help one can give.
image
image

Sorry, but you have put your question into the wrong category.
This is not a question about LAMMPS but rather about MD methodology and statistical thermodynamics. I don’t even want to get into the question how applicable classical MD parameterizations studying properties over such a wide temperature range are and other issues related to the details of your simulation (system size, averaging, equilibration, convergence etc.).

You should try a different category here (e.g. science-talk) or a forum like physics-exchange.