Pressure Computation Confusion in lammps

Hi Lammps Users,

I posted this question to some MD forum, but did not get a reasonable solution in the past few days.So I have to inquire you personally even though you may name it as a non-trial problem, which is still on pressure computation comparison between one given by thermo command and the other calculated by myself based on data in separate dumped files.

The word file attached is derivation of formula I used to calculate temperature which is perfectly fitted with each other, while the excel include data and the procedure to calculate temperature, kinetic energy and pressure. In.job which is used to output those data is also attached. PDF version is also given. Hope you can give me a hand soon.

Thanks for your attention.
Best Wishes,

Formula.docx (14.9 KB)

Computation.xlsx (15.3 KB)

in.job (663 Bytes)

Formula.pdf (153 KB)

Computation.pdf (165 KB)

Dear Yijin,

First, your system length is less than potential cutoff radius. Second,
N in pressure calculation is not the number of particles. Third, tail
correction contributes to the pressure value calculated by LAMMPS but
does not affect the forces.

So, for correct comparison you should increase the system size, turn off
tail correction and modify the formula in excel spreadsheet.

Attached is the modified input script.

Best regards,

in.job (836 Bytes)