restart2data tool

Hello all,

I have compiled restart2data.cpp(21-sept12 version) and got the executable ( in my linux box without getting any compilation error ) but when i try to convert my binary restart file to data only the number of atom,atom type and mass are saving, others information ( e.g atom coordinates ) is missing. I am using pair_style eam/alloy, during the execution of restart2data.x showing

error : Cannot write pair_style eam/alloy to input file.

Generated data file as follows:

LAMMPS data file from restart file: timestep = 20000, procs = 1

256 atoms

1 atom types

-2.9915557368667821e-02 1.6229915557368720e+01 xlo xhi
-2.9915557368667821e-02 1.6229915557368720e+01 ylo yhi
-2.9915557368667821e-02 1.6229915557368720e+01 zlo zhi

Masses

1 26.982

;;;;;;;;end of the data file;;;;;;;;;;

so for in this situation what i have to do for further simulation run using this restart file (where some changes are necessary in the restart file for the next simulation) ?

Furthermore is there any other way to redefine (i want to change the bc after one simulation run ) boundary condition, where i am using read_restart ?

To get the answer of the above question I had some trial and error method and get some result interesting to me -----------

step1. i run some simulation with bc p p p and write restart (restart)
step2. read_restart restart
boundary p p s
.
.
error : boundary condition after simulation box is defined
( I think this error is logical )

step3: boundary p p s/fs
read_restart restart
;
;
write_restart restart2
simulation going on happily. So we may suppose that this simulation is going on with bc p p s/fs i.e bc p p p have been changed to p p s/fs.

step4 : read_restart restart2 # this restart2 file contained bc p p s/fs ( is it not so? )
:
:
:
fix … wall/piston or wall/reflect …

ERROR: Cannot use fix wall/reflect in periodic dimension (fix_wall_reflect.cpp:99)

So how can i solve this issue ? Using of restart2data and read_data was a option but there also facing another problem ( described in the starting of the mail ).
Surely anything regarding this is unclear to me or i am wrong in my logic, please let me know your opinion and way me out.

thanks in advance .

Best

Selesta

I can't comment on the exact problem you are having. However
generally whenever you are having trouble with the restart2data tool,
you can always make your own DATA file with a text editor yourself.
For the atom coordinates, you can copy them from the last frame of a
DUMP file, and paste the coordinates into the "Atoms" section of your
DATA file. Be careful to use the correct format which is compatible
with the atom_style you are using.

http://lammps.sandia.gov/doc/atom_style.html

If you have a data file already, then it is easy to cut and paste the
coordinates from the last frame of your dump file into your old data
file. You may need to use "awk" or a spreadsheet program to rearrange
the columns in the text file. Alternately, you can use pizza.py to do
this. Or you can use this:
http://sourceforge.net/mailarchive/message.php?msg_id=29864484
(Note: the "dump2data.py" file I posted here is not to be confused
with the script that comes with pizza.py. That was an unfortunate
choice of file name on my part.)

If you don't already have a DATA file, then look at some of the data
files included in the "examples" folder in your lammps directory.
(The "examples/peptide/data.peptide" example was very helpful for me.)

In summary, if you are having trouble, make your own DATA file
manually. I've had a lot of problems trying to extract information
from a restart file.

Good luck

Andrew

Hi everybody ,

I am happy to say that i have overcome my prior difficulties and my restart2data.x works fine for eam/alloy pair style,it writes in the following fashion and save atom coordinate,velocity etc… . Yet i face some problem, here it is -

The output from your 2 runs makes little sense as a continuation.
You must have changed some parameters in your input script,
like from unnormalized thermo output to normalized. I would try
restarting from the restart file to insure you can do it correctly.
Then convert to a data file and restart from that. The answers
should be nearly the same (within roundoff).

Steve

Hello Steve,

Really you say right, whenever i am restarting from my restart file then there is no problem,i see the continuation of the two run is much better rather than using data file(normalize thermo output). But my requirement is to change the bc after few run so when i redefine bc it denies.
i’m also denoting my previous mail body, please make some suggestion —

I have compiled restart2data.cpp(21-sept12 version) and got the executable ( in my linux box without getting any compilation error ) but when i try to convert my binary restart file to data only the number of atom,atom type and mass are saving, others information ( e.g atom coordinates ) is missing. I am using pair_style eam/alloy, during the execution of restart2data.x showing

error : Cannot write pair_style eam/alloy to input file.

Generated data file as follows:

LAMMPS data file from restart file: timestep = 20000, procs = 1

256 atoms

1 atom types

-2.9915557368667821e-02 1.6229915557368720e+01 xlo xhi
-2.9915557368667821e-02 1.6229915557368720e+01 ylo yhi
-2.9915557368667821e-02 1.6229915557368720e+01 zlo zhi

Masses

1 26.982

;;;;;;;;end of the data file;;;;;;;;;;

so for in this situation what i have to do for further simulation run using this restart file (where some changes are necessary in the restart file for the next simulation) ?

Furthermore is there any other way to redefine (i want to change the bc after one simulation run ) boundary condition, where i am using read_restart ?

To get the answer of the above question I had some trial and error method and get some result interesting to me -----------

step1. i run some simulation with bc p p p and write restart (restart)
step2. read_restart restart
boundary p p s
.
.
error : boundary condition after simulation box is defined
( I think this error is logical )

step3: boundary p p s/fs
read_restart restart
;
;
write_restart restart2
simulation going on happily. So we may suppose that this simulation is going on with bc p p s/fs i.e bc p p p have been changed to p p s/fs.

step4 : read_restart restart2 # this restart2 file contained bc p p s/fs ( is it not so? )
:
:
:
fix … wall/piston or wall/reflect …

ERROR: Cannot use fix wall/reflect in periodic dimension (fix_wall_reflect.cpp:99)

So how can i solve this issue ? Using of restart2data and read_data was a option but there also facing another problem ( described in the starting of the mail ).
Surely anything regarding this is unclear to me or i am wrong in my logic, please let me know your opinion and way me out.

thanks in advance .

Best

Selesta