Computed temperature for fix temp/rescale cannot be 0.0

echo screen
units metal
dimension 3
atom_style atomic
boundary f f f

##create atoms
region box block -500 500 -500 500 -500 500 units box
create_box 2 box

#create diamond sphere

lattice diamond 3.57
region s1 sphere -50.0 75 25 45 units box
region s2 block -100 -0 20 130.0 -40 25 units box
region se intersect 2 s1 s2

create_atoms 1 region se units box

three-layer si

lattice diamond 5.4
region b1 block 0 150 0 150 -41 0 units box
region b2 block 0 150 0 150 -120 -41 units box
region b3 block 0 150 0 150 -150 -120 units box
region b4 union 3 b1 b2 b3
create_atoms 2 region b4 units box

mass 1 12.0
mass 2 28.0

#set group exclude diamond
group JGS type 1
neighbor 2.0 bin
neigh_modify every 2 delay 10 check yes exclude group JGS JGS
#create three-layer
group Gui type 2
group layer1 region b1
group layer2 region b2
group layer3 region b3

#add interacions

pair_style tersoff
pair_coeff * * SiC.tersoff C Si

add dynamics

#fix 1 JGS move linear 1 0 0
velocity JGS set 1 NULL NULL
velocity layer2 create 293 12345 dist gaussian

compute mytemp layer2 temp/com

fix 10 JGS nve/noforce

fix 20 layer1 nve
fix 30 layer2 nve
fix 31 layer2 temp/rescale 1 293 293 1.0 1.0
fix_modify 31 temp mytemp
fix 40 layer3 nve/noforce

thermo 1
thermo_style custom step temp c_mytemp ke pe etotal enthalpy

dump 1 all custom 1 c.lammpstrj id type x y z
dump 2 Gui custom 1 Force.text id x y z fx fy fz
timestep 10
run 10
write_data data.csi
write_data restart.csi
I try to run it.but,It tell me “Computed temperature for fix temp/rescale cannot be 0.0”.i don’t know why. can you tell me how to deal with it.

Thread closed due to inactivity, please open a new thread to address related issues.