File format for output

Dear Lammps Users

Is there a way in which I can ouput a dump file or a fix print to a file having a filename of the following format

filename.${firsttimestep}.txt

By firsttimestep I mean the timestep at which the simulation began (for instance it will be 1 if it is the first simulation or say 100000 if my first run ended in that timestep). The reason I require this is that, it avoids prinitng a large number of files if I use a * and also avoids overwriting the previous files, if I simply use “filename.txt”. This will make sure that I have x number of files where x corresponds to the number of times I have ran the scripts. I am not sure whether there is any other elegant way of doing this.

Thanks in advance

Regards

Vaidyanathan M S

you can define a variable which stores step information and use that to save the filename

something like

variable firsttimestep equal step # I think this should work.

and then use this variable in your filename.

Regards,
Vikas

Hi,

maybe you can use external variable for this purpose (-v key in command line)? It may be substituted as a part of filename in lammps script.

Regards,
Oleg.

12.09.13, 19:47, "Vaidyanathan M.S" <[email protected]>":

Dear Vikas/Oleg,

Vikas, it worked!! Thanks alot.

Oleg, I wanted LAMMPS to read the steps by itself rather than me inputting it every time. I am not sure whether it can be achieved using -v command line option.

Thanks alot for the advice

Regards

Vaidyanathan M S