########## 1. variable ##########
variable Rc equal 0.5 #radius of the centrail(big) particle
variable Ra equal 0.1 #radius of the small particle (asperities)
variable Na equal 16 #number of small particle
variable k equal (({Ra}/{Rc})^2)/2 #half of the radius ratio square
variable mc equal 1/({Na}*{k}+1) #mass of the central particle
variable ma equal (1-{mc})/{Na} #mass of the small particle
variable Dc equal 2*{Rc} #diameter of the central particle
variable Da equal 2*{Ra} #diameter of the small particle
variable dc equal {mc}/({Rc}^2)
variable da equal {ma}/({Ra}^2)
########## 2. basic settings ##########
dimension 2 #set dimension
atom_style sphere # Qinghao uses hybrid sphere dipole
boundary p p p #set the periodic boundary condition
comm_modify vel yes #ghost atoms store the velocity information
atom_modify map array
timestep 0.0001
fix prop all property/atom mol ghost yes
#set ghost atom store the molecule property
region box block 0 10 0 10 -0.25 0.25 units box #the box region
create_box 2 box #create two kinds of atoms in the box
shell mkdir dump #create folder for dumping
########## 3. pair settings ##########
pair_style gran/hertz/history 1e8 0 0 0 0 0 #set interaction
pair_coeff * * #the same interaction for all particles
########## 4. create molecule ##########
molecule allmol mol_rough1.txt #read molecule file
create_atoms 0 random 20 666 box mol allmol 4565 overlap 0.5 maxtry 20 units box #create one molecule in box
set type 1 diameter {Dc} #set diameter of the central atom
set type 2 diameter {Da} #set diameter of the small atom
set type 1 mass (v_mc) #set mass of the central atom
set type 2 mass (v_ma) #set mass of the small atom
########## 6. compute and thermo ##########
compute 1 all erotate/sphere #compute rotational kinetic energy
compute 2 all temp/sphere #compute rotational and translational kinetic energy
thermo_style custom step temp atoms vol c_2 #set thermo style
thermo_modify temp 2 #set temp compute
compute_modify 2 dynamic/dof yes
thermo 100 #set thermo step
########## 5. molecule settings ##########
velocity all create 1.0 5454654#add kinetic energy
velocity all zero linear
fix 1 all rigid/small molecule #temp 0.6 0.6 0.01 iso 0.001 0.001 0.1#set the molecule rigid
#fix 2 all nve/sphere disc #set nve and disc
fix f2d all enforce2d # ensure the forces are in 2D
#fix_modify 1 dynamic/dof no
########## 7. run ##########
dump 1 all custom 10 dump/tmp.*.dump mol id type radius mass xu yu zu vx vy vz omegax omegay omegaz
#set dump custom step file and style
dump_modify 1 format 6 %lf format 7 %lf format 9 %lf format 10 %lf
#set the precision
run 30000
unfix 1
unfix f2d
fix 1 all rigid/npt/small molecule temp 1.0 1.0 0.1 iso 0.001 0.001 1.0
fix_modify 1 dynamic/dof yes
run 20000
This is the in file. I want to use the rigid/npt/small command to shrink the box.Thus,the number density increases.But it always report the error “Temperature compute degrees of freedom < 0”.Sorry if this is a basic question,and thank you in advance.