[lammps-users] lammps output

Dear All,

I would like to print out x pressure in a file during a loop (I am using minimization) but cannot find a good way. My script is in the format as:

LOOP START
MINIMIZE
LOOP END

The information is contained in thermo. As using “MINIMIZE”, “FIX PRINT” is no longer valid. Also, the log file contains too much information I do not need (I only need one parameter from thermo output). Any suggestion is welcome.

Regards,
ML

You can either include pxx in your thermo output. Or if you just
want it to print once per minimization (e.g. after the minimize),
you can just use the print command:

minimize ...
variable mypxx equal pxx
print "PXX = ${mypxx}"
end of loop

Thank you Steve. But by doing this, the structure of log file will be

processing information
my wanted information
lammps simulation information

processing information
my wanted information
lammps simulation information

I want my information to stay together so I do not need to copy and paste manually. Is there anyway to do this? Thank you.

Regards,
ML

The problem is that fixes that could do this, like fix print or fix ave/time,
don't operate during a minimize, since there is no concept of time.

If you're doing this: print "PXX = ${mypxx}" after every minimize in your loop,
then how about:
grep PXX log.lammps > mylines.txt

Steve