ERROR: Illegal fix halt command (../fix_halt.cpp:43)

Dear Lammps users,

I am deforming box at a constant strain rate in +z direction and after that I want to deform it in -z direction (Compress) till a certain variable is zero. I am using fix halt command to exit from the current run when variable v_strain >10.0 and for second condition I am using v_p4 <=0 to exist from next run. But I am getting “ERROR: Illegal fix halt command (…/fix_halt.cpp:43), Last command: fix 9 all halt 1 v_strain >10.0”. Could you please help? Below is the part of my script for deformation:-

# Uniaxial Tensile Deformation, LAMMPS (16 Mar 2018)

#Store final cell length for strain calculations
variable tmp equal "lz"
variable L0 equal ${tmp}
print "Initial Length, L0: ${L0}"

# DEFORMATION

reset_timestep	0
delete_bonds	all bond 0 remove
fix		4 all deform 1 z erate 1e-8 units box remap x           #Tensile deformation
fix	        5 all bond/break 1 1 21.0
fix	        6 all bond/break 1 2 14.68
fix	        7 all bond/break 1 3 14.89
dump		2 all atom 10000  dump.xyz_dfm.lmpstrj

# Output strain and stress info to file
# for units real, pressure is in [atm] = 100*1.01325 [kPa] = 1/10000 [GPa]
# p2, p3, p4 are in GPa

variable strain equal "((lz - v_L0)/v_L0)*100"
variable	lz1 equal lz
variable	lx1 equal lx
variable	ly1 equal ly
variable	Lx0 equal ${lx1}
variable	Ly0 equal ${ly1}
variable p1 equal "v_strain"
variable p2 equal "-pxx/10000*1.01325"
variable p3 equal "-pyy/10000*1.01325"
variable p4 equal "(-pzz*v_Lx0*v_Ly0)/(1.01325*10000)"

fix def1 all print 1000 "${p1} ${p2} ${p3} ${p4} ${lz1}" file fibril.def1.txt screen no


thermo_style	custom step temp v_strain v_p2 v_p3 v_p4 ke pe press lz f_5[1] f_5[2] f_6[1] f_6[2]
thermo 	1000
fix		9 all halt 1 v_strain >10.0
run		1100000
unfix 4
unfix 9
#change_box 	all set

write_restart 	restart.${simname}.3
fix		8 all deform 1 z erate -1e-8 units box remap x                 #Compression 
fix		10 all halt 1 v_p4 <=0.0
run		1000000	
write_restart 	restart.${simname}.4
unfix 8
unfix def1
unfix 1
unfix 2
undump 2

Thanks and regards,
Amir

As the error message says, your command is not consistent with how the documentation says you need to use it. Please check the docs again (hint: spaces matter!).

Thank you for the hint. There was space issue.

Regards,
-Amir