[lammps-users] fix/langevin

Steve and all,

I wanted to dump the energy injected into the system by using fix/langevin command. Here is part of my script:

fix 1 all nve
fix 7 cold langevin 200. 200. 0.01 292292
fix 8 hot langevin 400. 400. 0.01 292292

thermo_style custom step temp pe pxx pyy pzz lx ly lz f_7 f_8

However, the f_7 and f_8 variables gave me “0”, which is supposed to be the energy injected into these two groups. I checked the “fix_langevin.cpp”. Looks like " compute_scalar()" does compute the energy. why no output? Was it a bug? Thanks,

cheers,
Ajing

From the fix langevin doc page:

The cummulative energy change due to this fix is stored as a scalar
quantity, which can be accessed by various output commands. The scalar
value calculated by this fix is "extensive", meaning it scales with
the number of atoms in the simulation. Note that use of this option
requires setting the tally keyword to yes.

You do not have the tally keyword in your commands.

Steve