[lammps-users] How to get density fluctuation with time

Dear lammps user,

I am doing MD on a liquid.
I want to see the density fluctuation with time at different temperature/ pressure.
I cannot see any thermo_style command about density as an output.
I have the volume in the output and I know the mass, so I can calculate it.

But is there a command in LAMMPS that will give me the density.

Thank you very much.

Mousumi

You can use variable command within the input script to calculate the instanteneous density and print it out usng thermo_style custom.