New User - dump in one file

Noel682's picture
Submitted by Noel682 on Fri, 10/23/2015 - 09:45

Hi Everyone,

I am new to LIGGGHTS. In my simulations I have calculated some variables (they are averaged values) and I would like to dump them in the dump file.
Among the tutorials, forum and manual I mostly see that LIGGGHTS dumps information in one file per timestep (100 files = 100 tsteps), but i would like to have one big file with each line representing each timestep.

Does anyone have any suggestion or example?

Greetings
Luca

aaigner's picture

aaigner | Fri, 10/23/2015 - 13:52

Hi Luca and Daniel,

one additional command is the fix print. Instead of the 'normal' print command, it can be used to write a line every few timesteps in a file. Usually I use it to write the output of fixes/computes, for instance fix massflow/mesh in a separate output file (as a whitespace seperated list).

Bests
Andreas

Noel682's picture

Noel682 | Fri, 10/23/2015 - 16:12

Hi Andreas and Daniel,

Thanks for your fast replies. I have read the two links and I have tried the fix print commands,

I have tried something like this:

fix extra all print 100 "Coords of marker atom = $x $y $z" file coord.txt

It all works, but when I want to write the value of a variable in the string , I write $namevariable (as in the manual), and I see an error in the terminal

This is the error I get
-------------------------------------------------------------------------------------------------------
ERROR on proc 0: Substitution for illegal variable (../input.cpp:498)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
-------------------------------------------------------------------------------------------------------

Do you know what am I doing wrong?

Greetings,
Luca

Luca

richti83's picture

richti83 | Mon, 10/26/2015 - 21:54

When the length of variable-name is greater than 1 you need to use {brackets}
eg:

fix extra print 100 ${namevariable}

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact