write_data command

please always reply to the mailing list, and not only individual people. thanks.

Which means I need to compile the SVN under unix system and after that follow the SVN download instruction?

you only need to compile one file, restart2data.cpp, but it has to be
on the same OS and with the same compiler settings as the LAMMPS
version was compiled with that was used to generate the restart file.
restart files are not portable between different operating systems and
build environments.

you can also see the revision history through the git2web interface
and download each individual version from here:

http://git.lammps.org/git/?p=lammps-ro.git;a=history;f=tools/restart2data.cpp;h=1866d7186750af1a6659fc3862c7826bba4a953d;hb=32a2028114e5dfcd811d3e402ae117f58797d9ca

Sorry, one more question, to compile the restart2data.cpp, is there header for the file necessarily? Thanks.

Sorry, one more question, to compile the restart2data.cpp, is there header for the file necessarily? Thanks.

what header file? from where?

please re-read what i wrote. that should cover everything.

Hi, since I found the restart2data.cpp inside the folder tools, I just put it into folder src and compiple it. When I compile the restart2data.cpp under the same modules in version lammps_7May11, there exists those sentences:
restart2data.cpp(3367): warning #181: argument is incompatible with corresponding format string conversion
          tag[i],type[i],vfrac[i],rmass[i],x[i],y[i],z[i],ix,iy,iz);
                                                          ^

restart2data.cpp(3367): warning #267: the format string requires additional arguments
          tag[i],type[i],vfrac[i],rmass[i],x[i],y[i],z[i],ix,iy,iz);
                                                                  ^

restart2data.cpp(3419): warning #267: the format string requires additional arguments
    fprintf(fp," \-1\.16e -1.16e %-1.16e",vfrac[i],rmass[i]);

I don't think it was compiled successfully. And there is error:

restart2data.o: In function `main':
restart2data.cpp:(.text+0x0): multiple definition of `main'
main.o:main.cpp:(.text+0x0): first defined here
make[1]: *** [../lmp_ary6] Error 1
make[1]: Leaving directory `/nv/hp1/hhuang67/lammps_oldversion/lammps-7May11/src/Obj_ary6'
make: *** [ary6] Error 2

How I deal with that? Thanks.

Leave restart2data.cpp in the folder it was in and compile
it there. It is a stand-alone program with its own main().

See tools/README for intstructions.

Steve

I compile the Lammps under intel compiler and restart2data under gcc, since gcc and intel are conflict I wonder if I run lammps but called the command restart2data at the same time. By the way, when I compile there are 2 lines warnings:

restart2data.cpp: In function âvoid header(FILE*, Data&)â:
restart2data.cpp:444: warning: deprecated conversion from string constant to âcharâ
restart2data.cpp:456: warning: deprecated conversion from string constant to âchar
â

You don’t have to worry about the warnings nor about the compilers. As Steve already said, restart2data.cpp is a stand-alone code that has nothing to do with how LAMMPS was compiled and ran - it only cares about the binary restart file.

Ray