Updating thermo_pe every timestep

Dear LAMMPS users,

What would be the most neat and efficient way to make LAMMPS update the thermo_pe inbuilt compute every timestep? I need this because I am accessing this compute via an external driver, using lammps_extract_compute(), which does not itself cause thermo_pe to update.

I was using the rather annoying:

thermo_style custom pe
thermo 1

But would now like an option that leaves all output channels unaffected. Perhaps the run every command could be of use, but without having to print anything?

Thanks,

Gil Rutter
University of Warwick

You can mute the screen output by using the following line in your
external driver source.

lmp->screen = NULL;

log file printing can be avoided with the line below added to the
lammps input file:

log none

Carlos

Dear Carlos,

Thanks, but I’d like to leave the screen output available and open for other purposes.

Regards,

Gil

You need to have some command in your input script
that is using the poteng every step. E.g. you could
define a fix ave/time command that time averages it
(via a variable) every step. Or a print command (to a file)
that printed it out every step. The former is preferable
since you need not do any I/O.

Steve