nn666
August 22, 2024, 5:23am
1
For lammps- reaxff force field - already optimized - Uniaxial stretching polymer
fix 1 all npt temp 300 300 0.1 y 0 0 1 z 0 0 1 drag 1
variable srate equal 1.0e10
variable srate1 equal “v_srate / 1.0e12”
fix 2 all deform 1 x erate ${srate1} units box remap x
ERROR: Illegal variable command: expected 3 arguments but found 4 (src/variable.cpp:447)
how to deal with it? which is the wrong argument?
Please always report which LAMMPS version you are using and what platform you are on?
Do you see any warnings in the output?
When I copy your two variable lines into an input with the 27 June 2024 version of LAMMPS, I don’t get an error, but the following warnings:
WARNING: Detected non-ASCII characters in input. Will try to continue by replacing with ASCII equivalents where known. (src/input.cpp:478)
It looks like your second variable command has non-ASCII characters as double quotes.
nn666
August 22, 2024, 7:16am
3
Thank you for answer! I have entered the correct double quotes already.
There is a new peoblem.
I dont know if it is the problem that i mentioned before which has 4 arguments not 3, or fix 2 has some problems.
This unreadable, please read the forum guidelines and learn how to correctly quote input file
This is a different problem. Just read the error message and study the LAMMPS documentation
ERROR: Illegal variable command: expected 3 arguments but found 5 (src/variable.cpp:449)
Last command: variable depth equal 85 - v_displace
can someone help me to solve this problem?
This kind of problem was reported and answered very recently: Why does my LAMMPS script fail with 'Illegal variable command