ERROR: Illegal fix restrain command (../fix_restrain.cpp:77)

Dear Lammps Experts,

I am currently using the newly released version of Lammps (MAY 2016), and trying to equilibirate my reactive system with fix restrain command implemented in Lammps. the force field I am using is ReaxFF. However, I constantly keep seeing this error and have no clue what causes this problem.

ERROR: Illegal fix restrain command (…/fix_restrain.cpp:77)

My input script includes too many fix restrain commands as the following:

fix 3 all restrain bond 301 302 50.0 50.0 0.945
fix_modify 3 energy yes

fix 4 all restrain bond 303 304 50.0 50.0 0.945
fix_modify 4 energy yes

.

.

.

.

fix 401 all restrain angle 295 296 297 50.0 50.0 103.9
fix_modify 401 energy yes

fix 402 all restrain angle 298 299 300 50.0 50.0 103.9
fix_modify 402 energy yes

Do I miss or misunderstand something? Thanks.

Dear Lammps Experts,

I am currently using the newly released version of Lammps (MAY 2016), and
trying to equilibirate my reactive system with fix restrain command
implemented in Lammps. the force field I am using is ReaxFF. However, I
constantly keep seeing this error and have no clue what causes this problem.

most likely some kind of typo.

axel.

BTW, there is no need to define hundreds of fixes for this. as shown
in the documentation, one fix restrain command can handle multiple
entries.

axel.

Thank you Axel for your advice and I will fix it in my input script. However, still I am getting the same error and I do not think it is a typo.

I deleted all of my fixes except the first one to check if it works but did not.

my current script is:

velocity all create 2500 3634555 mom yes dist gaussian

thermo 5
thermo_style custom step temp press pe ke etotal
thermo_modify line one

reset_timestep 0
timestep 0.01

fix 2 all nvt temp 2500.0 2500.0 50.00

fix 3 all restrain bond 301 302 50.0 50.0 0.945
fix_modify 3 energy yes

dump 1 all custom 50 dump.coordNVTspeciesrecog.1 id type x y z
dump_modify 1 format "dump_modify 1 sort id
run 20000000
fix 2 all nvt temp 2500.0 2500.0 50.00

I wonder if there is anything else that might cause this error?

Thank you Axel for your advice and I will fix it in my input script.
However, still I am getting the same error and I do not think it is a typo.

I deleted all of my fixes except the first one to check if it works but did
not.

[...]

my current script is:

fix 3 all restrain bond 301 302 50.0 50.0 0.945
fix_modify 3 energy yes

[...]

I wonder if there is anything else that might cause this error?

it must be due to incorrect input. possibly you could have non-ASCII
characters in that line.
the check on line 77 that throws the error checks for having a
sufficient number of arguments.
LAMMPS can get confused, if you blank characters are not real spaces,
e.g. due to cut-n-paste from a program that modifies text for
typesetting purposes (most modern web-browsers do).

if i take the in.reaxc.rdx example bundled with LAMMPS and insert the
command (full input is attached):

fix r1 all restrain bond 1 6 10.0 10.0 1.0 &
                                bond 1 17 10.0 10.0 1.0 &
                                bond 1 2 10.0 10.0 1.0 &
                                bond 1 16 10.0 10.0 1.0 &
                                bond 2 3 10.0 10.0 1.0 &
                                bond 2 7 10.0 10.0 1.0

there is no problem.

axel.

in.reaxc-restrain.rdx (1.59 KB)