illegal fix nvt/npt/nph

Dear all,

i get this error when i run the simulation for diamond216 structure using tersoff potential.

ERROR: Illegal fix nvt/npt/nph command (fix_nh.cpp:324)

Here is my input file.
Please help with what i am doing wrong.

units metal
dimension 3
atom_style atomic
boundary p p p
read_data diam216.data
neighbor 0.5 bin

neigh_modify delay 1
pair_style tersoff

pair_coeff * * C.tersoff C
thermo 10

timestep 0.001
dump 1 all custom 10 dump.lammpstrj id type x y z
velocity all create 300.0 13

fix 2 all temp/rescale 25 300.0 300.0 50 1.0

fix 3 all nvt temp 300.0 300.0 100.0

run 5000

unfix 2

unfix 3
fix 4 all npt temp 300.0 300.0 iso 1.0 1.0 10.0

run 50000

Dear all,

i get this error when i run the simulation for diamond216 structure using
tersoff potential.

ERROR: Illegal fix nvt/npt/nph command (fix_nh.cpp:324)

Here is my input file.
Please help with what i am doing wrong.

what is your LAMMPS version?
the syntax has changed some time ago.

please note, that you also are using temp/rescale
which is a *very* bad idea to be used alongside a
nose-hoover chain thermostat.

axel.