write_data or write_restart

Dear Lammps Users,

I have a question about write_data or write_restart. When I use restart command, the restart files can be generated as a function of timesteps which I define. For example, if I want to generate restart files every 10000 steps during total 1000000 steps, it is fine. Since restart2data.cpp is no longer provided due to write_data command, how to convert the restart file to data file.

What I tried is the following command lines in my input file. But there was error.

restart 10000 restart.PT.*

read_restart restart.PT.10000 remap

write_data data.PT.10000

Error: Illegal read_restart command (…/read_restart: cpp76)

Lammps was built with MPIIO package.

Thanks.

James

You can duplicate what restart2data used to do by running

LAMMPS with the -r command line switch and giving it

2 filenames (restart and data).

I imagine you are getting the error with read_restart file remap,

because the addititon of the remap option is fairly new and
you are using an older version of the code.

The manual on the web site always reflects the most
current version of the code.

Steve

Hi Steve,

Is this command working fine in version Feb 2014?

mpirun -np 64 -r restart.PT.* data.PT.* -in in.foo

Does this command create restart and data files every 10000 steps when I have “restart 10000 restart.PT.*” command in the input file?

Thanks.

James

Hi Steve,

   Is this command working fine in version Feb 2014?

mpirun -np 64 -r restart.PT.* data.PT.* -in in.foo

Does this command create restart and data files every 10000 steps when I
have "restart 10000 restart.PT.*" command in the input file?

no. it will only convert your restart into a data file and then quit.
it will not read your input script.

axel.

Hi Axel,

Do you mean that

  1. Once restart files are created by “restart 10000 restart.PT.*” command in the current simulation

  2. then, in the next simulation, one (or many) of restart file (e.g., restart.PT.10000) can be converted like

“mpirun -np 64 -restart restart.PT.10000 data.PT.10000 lmp.foo -in in.foo”

Is it correct?

Thanks.

James

Hi Axel,

   Do you mean that

1) Once restart files are created by "restart 10000 restart.PT.*" command in
the current simulation

2) then, in the next simulation, one (or many) of restart file (e.g.,
restart.PT.10000) can be converted like

     "mpirun -np 64 -restart restart.PT.10000 data.PT.10000 lmp.foo -in
in.foo"

Is it correct?

how about simply reading the documentation and making an experiment
with a test file? too simple?

axel.

Hi Axel,

I think that you are a little skeptical to users who are not familiar with LAMMPS. In the previous reply, “YES” is the much better answer than “how about simply reading the documentation and making an experiment with a test file? too simple?”.

Do you think why I asked it in mailing-list about the topic? After many trials, I asked. Even if something is simple for you, if others is not familiar with it, that is difficult for others.

Anyway, my question has been solved with “mpirun -np 64 lmp.foo -restart restart.PT.10000 data.PT.10000 -in in.foo”

Thanks.

James

Hi Axel,

    I think that you are a little skeptical to users who are not familiar
with LAMMPS. In the previous reply, "YES" is the much better answer than
"how about simply reading the documentation and making an experiment with a
test file? too simple?".

emphatically, NO. get more familiar with LAMMPS. learn better how to
teach yourself. learn how to experiment and verify things. do not
offload this to other people. this will not only help you with LAMMPS,
but with research in general.

    Do you think why I asked it in mailing-list about the topic? After many
trials, I asked. Even if something is simple for you, if others is not
familiar with it, that is difficult for others.

i am very aware of this. i do a *lot* of training and am very
observant of what "works" and what doesn't. i reassure you. what may
be irritating to you, is actually what works the best for people in
your situation. it doesn't bother me, if you don't like it, but
particularly that is what gets you "over the hump".

Anyway, my question has been solved with "mpirun -np 64 lmp.foo -restart
restart.PT.10000 data.PT.10000 -in in.foo"

there you go. you found it yourself and didn't need me to tell you.
you just proved my point. thanks.

btw: i already told you that the -in flag is completely useless in this context.

> Hi Axel,
>
> I think that you are a little skeptical to users who are not familiar
> with LAMMPS. In the previous reply, "YES" is the much better answer than
> "how about simply reading the documentation and making an experiment
with a
> test file? too simple?".

emphatically, NO. get more familiar with LAMMPS. learn better how to
teach yourself. learn how to experiment and verify things. do not
offload this to other people. this will not only help you with LAMMPS,
but with research in general.

I am not sure what you are talking about. If someone himself found the
solution after many trials, why they need this useful mailing list to ask
what they do not know.
I understand you point learning something new. "No pain, no gain". I am not
pointing out your mind but your reply to others. For example, you do not
need to say, "too simple?" Please learn how to treat answer the question
generously, not to discipline others.

I think that you may be angry because I say "Please learn how to treat
answer the question generously, not to discipline others." OR, you just
enjoy others reaction to your skeptical answers.

> Do you think why I asked it in mailing-list about the topic? After
many
> trials, I asked. Even if something is simple for you, if others is not
> familiar with it, that is difficult for others.

i am very aware of this. i do a *lot* of training and am very
observant of what "works" and what doesn't. i reassure you. what may
be irritating to you, is actually what works the best for people in
your situation. it doesn't bother me, if you don't like it, but
particularly that is what gets you "over the hump".

> Anyway, my question has been solved with "mpirun -np 64 lmp.foo -restart
> restart.PT.10000 data.PT.10000 -in in.foo"

there you go. you found it yourself and didn't need me to tell you.
you just proved my point. thanks.

  Again, if I found it myself, why I ask the problem in the mailing list. I
already suggested "A POSSIBLE SOLUTION" in the previous mail. If it is ok,
you just simply say "Yes, it will work" is the much better answer.

btw: i already told you that the -in flag is completely useless in this
context.>

This is the most useful answer with your three replies.

If you want to discuss something about the difference between your mind and
my thought in this topic. Please send me a personal email not in mailing
list because the solution is found.

Thanks.
James

...

I am not sure what you are talking about. If someone himself found the
solution after many trials, why they need this useful mailing list to ask
what they do not know.

this mailing list is not a replacement for a tutor.

I understand you point learning something new. "No pain, no gain". I am not
pointing out your mind but your reply to others. For example, you do not
need to say, "too simple?" Please learn how to treat answer the question
generously, not to discipline others.

that doesn't work. i have observed that people seem to understand too
friendly answers to questions that they *should* be able to find out
by themselves (and in that respect it doesn't matter how often or how
long your tried) as an encouragement to ask more questions and without
making as much of an effort by themselves.

please note that i do not use that kind of provocative language
immediately, but rather in exactly those cases where people keep
asking questions instead of following the advice that they have been
given and work things out on their own. it is often that kind of
language that motivates people to try harder and then they figure it
out. this is the desired effect

I think that you may be angry because I say "Please learn how to treat
answer the question generously, not to discipline others." OR, you just
enjoy others reaction to your skeptical answers.

i am not angry, but with many years of educating people about how to
do computing with scientific software have some experience in what
achieves the right effect, even if it is at the price of irritating
some people.

feel free to prove me wrong and show me that one can help people
effectively in your way. answer as many questions as i do and make
people understand as much as i do. please keep in mind you are not
entitled to any kind of service here. it is all done on a voluntary
basis. nobody forces you to read what i write.

  Again, if I found it myself, why I ask the problem in the mailing list. I
already suggested "A POSSIBLE SOLUTION" in the previous mail. If it is ok,
you just simply say "Yes, it will work" is the much better answer.

no, it is not. the next time you run into a problem, you will ask
again. if i make you find it out by yourself, however, you will be
more likely to find the solution yourself the next time around. please
keep in mind that the purpose of the mailing list is not be a
replacement for a tutor or adviser. your problem is a problem that is
well documented and thus you *should* find the solution yourself. thus
it means that you need to practice teaching yourself. most definitely
people here dislike to get asked whether something will work or not.
that is most easily found out by trying it. that is called "an
experiment" or "the scientific method": experiment, observe, draw
conclusions.

ask questions about things that are not properly documented or
problematic or show incorrect behavior in LAMMPS, and you will be
treated very friendly and supportively, especially if you do provide
all the required information.

anyway, i consider this part of the discussion now closed.

axel.

I think Axel’s point is that if you read the manual on the -r command line switch, it
will likely answer your various Qs, because it says:

-restart restartfile *remap* datafile keyword value ... 

Convert the restart file into a data file and immediately exit. This is the same operation as if the following 2-line input script were run:

read_restart restartfile *remap*
write_data datafile keyword value ... 

If you did in fact read the manual and it didn't make sense, then post
a follow-up Q.  But it helps if you say you read the manual
and ask for clarification of some issue.

Steve