[lammps-users] Time average question

Dear lammps-users,

I'm new user of LAMMPS and I have some problems with the time average properties. For example, If I perform one NPT simulation, how can I get the average density of the system? Is there any command can compute the time average except that to print thermo output every step and use the "thermo-style" output option?

Any advice and suggestion would be great appreciated.
Thanks in advance.


    [email protected]\.\.\.432\.\.\.

The themo_style custom command does have a few options for
time-averaged quantities - like eave, pave, etc

There is also the fix ave/time which will time average the
quantity computed by any "compute" defined in LAMMPS.
It would be simple for you to add a "compute" that calculated
density. I suppose we should add a generic "compute" that
calculates a user-defined formula, like we did for fix ave/spatial
and compute variable/atom.


Just posted a patch that adds a "compute variable" command
that does this - i.e. allows you to time-average any quantity
you can define via a LAMMPS variable equation, like