Error with variable command

Good day all!

I am trying to learn how to use the write_restart and read_restart commands so that I don’t have to rerun the equilibration portion of my lammps script every time I make a change.

Now, when I use the read_restart command, I get this error

ERROR: Invalid variable name in variable formula (…/variable.cpp:1552)

which I didnt get before when I ran the script as a whole - with the equilibration and deformation parts in one script. I’m a bit confused as to why this is happening? Is it something extra that I have to define since I am using read_restart?

I am attaching both the files. The equilibration file and the next file that reads the restart files.

Additionally, I am trying to get a Force vs Displacement graph from this and I was wondering if my approach is right? I computed the forces fx, fy, fz and used the compute reduce/sum command to get the forces along the x,y and z directions.

Thanks!

in.cugraph (1007 Bytes)

in.equilibration (1.2 KB)

Good day all!

I am trying to learn how to use the write_restart and read_restart
commands so that I don't have to rerun the equilibration portion of my
lammps script every time I make a change.

Now, when I use the read_restart command, I get this error

ERROR: Invalid variable name in variable formula (../variable.cpp:1552)

which I didnt get before when I ran the script as a whole - with the
equilibration and deformation parts in one script. I'm a bit confused as to
why this is happening? Is it something extra that I have to define since I
am using read_restart?

even without looking at the input, i can say that ​i don't think it has
anything to do with restarts.

please see here. ​http://lammps.sandia.gov/doc/Section_errors.html
this suggests that you try to define a variable, where the variable formula
refers to a non-existing variable.

when looking for errors, it is *stongly* recommended to run with -echo
screen or -echo both, so that you see how LAMMPS expands the input and at
which line exactly your input is failing.

​axel.​

Thank you for your reply. I tried using that command and I found my mistake. I hadn’t defined one variable and tried calling it. Thanks again!