[lammps-users] involk the PE variable during minimization

Hi steve and all,

I want to print potential energy “pe” at the end of each minimization so that I can do data analysis more convenient. However, seems this variable cannot be accessed by the following method:

This is my input script:

hi AC
  you need to put curly braces around variables that have more than one letter in their name e.g.
print ${pe}


AJING CAO wrote:

Thanks, Resse and Zhunyong, for your suggestion.
But it does not work. Seems “pe” is a special global thermal variable that can not be invoked by “print” command?
Waiting Steve to solve my puzzle.



"pe" is not a variable name, it's a thermo keyword
Try this:

variable myPe equal pe
print ${myPe}

Also the minimizer prints out the PE when it ends.