How to store data in loops?

Dear all,

First of all, thank you very much for your useful help.

My program look like this:

label loop1
apply strain (displace_box)
save potential energy
next n
jump in.file loop1

My problem is how can I store the potential energy in a file?

Thank you.


You could simply use the print command within
the loop, which will print it to the screen and log file.
If you tag the print line with a unique string, then
you can grep for it in the final log file.