Regarding the making a group of atoms immobile

Hello
Iam trying to make a group of atoms immobile which are in the region 4.371 5.629 4.371 5.629 4.371 5.629 units lattice through out the simulation but when iam visualizing with Ovito i can see them moving.Could yoou please let me know where iam i going wrong.The following is my code :

---------- Initialize Simulation ---------------------

clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array

---------- Create Atoms ---------------------

lattice fcc 4
region box block 0 10 0 10 0 10 units lattice
region nuc block 4.371 5.629 4.371 5.629 4.371 5.629 units lattice
create_box 4 box
lattice fcc 4 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 4 box
#replicate 20 20 20
set region box type/fraction 1 0.25 12541567
set region box type/fraction 2 0.25 12543796
set region box type/fraction 3 0.25 12541522
set region box type/fraction 4 0.25 12145
group nucleus region nuc

---------- Define Interatomic Potential ---------------------

pair_style eam/alloy
pair_coeff * * CoFeNiPd.set Co Fe Ni Pd
neighbor 2.0 bin
neigh_modify every 1 check yes
timestep 0.002 #from jafray 0.002 picometers
velocity all create 300 12345 mom yes rot yes

---------- calculatingcentro symmetry to know whether the atom is distorted or not---------------------

compute csym all centro/atom fcc
compute peratom all pe/atom
compute pattern all cna/atom 3.414
#reset_timestep 0
thermo 10
thermo_style custom step temp etotal ke pe lx ly lz press pxx pyy pzz enthalpy

---------- Run Minimization ---------------------

dump 2 all custom 50 dump.ten.* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 2 element Co Fe Ni Pd
fix 1 nucleus setforce 0 0 0
fix 2 all npt temp 300 2300 0.2 iso 0 0 1
run 300
undump 2
unfix 2

write_data heat.dat
write_restart heating.rest
dump 3 all custom 50 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 3 element Co Fe Ni Pd
fix 3 all nvt temp 2300 2300 0.2 iso 0 0 1
run 500
undump 3
unfix 3
write_data 10homo.dat
write_restart 10homo.rest
dump 4 all custom 50 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 4 element Co Fe Ni Pd
fix 4 all nvt temp 2300 2200 0.2
run 500
undump 4
unfix 4
write_data 10p2200.dat
write_restart 10p2200.rest
dump 5 all custom 50 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 5 element Co Fe Ni Pd
fix 5 all nvt temp 2200 2100 0.2
run 500
undump 5
unfix 5
write_data 10p2100.dat
write_restart 10p2100.rest
dump 6 all custom 50 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 6 element Co Fe Ni Pd
fix 6 all nvt temp 2100 2000 0.2
run 500
undump 6
unfix 6
write_data 10p2000.dat
write_restart 10p2000.rest
dump 7 all custom 50 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 7 element Co Fe Ni Pd
fix 7 all nvt temp 2000 1900 0.2
run 500
undump 7
unfix 7
write_data 10p1900.dat
write_restart 10p1900.rest
dump 8 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 8 element Co Fe Ni Pd
fix 8 all nvt temp 1900 1800 0.2
run 500
undump 8
unfix 8
write_data 10p1800.dat
write_restart 10p1800.rest
dump 9 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 9 element Co Fe Ni Pd
fix 9 all nvt temp 1800 1700 0.2
run 500
undump 9
unfix 9
write_data 10p1700.dat
write_restart 10p1700.rest
dump 10 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 10 element Co Fe Ni Pd
fix 10 all nvt temp 1700 1600 0.2
run 500
undump 10
unfix 10
write_data 10p1600.dat
write_restart 10p1600.rest
dump 11 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 11 element Co Fe Ni Pd
fix 11 all nvt temp 1600 1500 0.2
run 500
undump 11
unfix 11
write_data 10p1500.dat
write_restart 10p1500.rest
dump 12 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 12 element Co Fe Ni Pd
fix 12 all nvt temp 1500 1400 0.2
run 500
undump 12
unfix 12
write_data 10p1400.dat
write_restart 10p1400.rest
dump 13 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 13 element Co Fe Ni Pd
fix 13 all nvt temp 1400 1300 0.2
run 500
undump 13
unfix 13
write_data 10p1300.dat
write_restart 10p1300.rest
dump 14 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 14 element Co Fe Ni Pd
fix 14 all nvt temp 1300 1200 0.2
run 500
undump 14
unfix 14
write_data 10p1200.dat
write_restart 10p1200.rest
dump 15 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 15 element Co Fe Ni Pd
fix 15 all nvt temp 1200 1100 0.2
run 500
undump 15
unfix 15
write_data 10p1100.dat
write_restart 10p1100.rest
dump 16 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 16 element Co Fe Ni Pd
fix 16 all nvt temp 1100 1000 0.2
run 500
undump 16
unfix 16
write_data 10p1000.dat
write_restart 10p1000.rest
dump 17 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 17 element Co Fe Ni Pd
fix 17 all nvt temp 1000 900 0.2
run 500
undump 17
unfix 17
write_data 10p900.dat
write_restart 10p900.rest
dump 18 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 18 element Co Fe Ni Pd
fix 18 all nvt temp 900 800 0.2
run 500
undump 18
unfix 18
write_data 10p800.dat
write_restart 10p800.rest
dump 19 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 19 element Co Fe Ni Pd
fix 19 all nvt temp 800 700 0.2
run 500
undump 19
unfix 19
write_data 10p700.dat
write_restart 10p700.rest
dump 20 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 20 element Co Fe Ni Pd
fix 20 all nvt temp 700 600 0.2
run 500
undump 20
unfix 20
write_data 10p600.dat
write_restart 10p600.rest
dump 21 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 21 element Co Fe Ni Pd
fix 21 all nvt temp 600 500 0.2
run 500
undump 21
unfix 21
write_data 10p500.dat
write_restart 10p500.rest
dump 22 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 22 element Co Fe Ni Pd
fix 22 all nvt temp 500 400 0.2
run 500
undump 22
unfix 22
write_data 10p400.dat
write_restart 10p400.rest
dump 23 all custom 500 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 23 element Co Fe Ni Pd
fix 23 all nvt temp 400 300 0.2
run 500
undump 23
unfix 23
write_data 10p300.dat
write_restart 10p300.rest
dump 24 all custom 250 dump.f* id type xs ys zs c_csym c_peratom c_pattern
dump_modify 24 element Co Fe Ni Pd
fix 24 all nvt temp 300 300 0.2
run 250
undump 24
unfix 24
write_data 300homo.dat
write_restart 300homo.rest
unfix 1

Sincerely
M.Maheshwari
School of Minerals,Metallurgical and Materials Engineering
Indian Institute of Technology,Bhubaneswar

What, according to Newton’s laws of motion, will happen, if you assign a velocity to a particle and then it experiences no forces?

Axel.

What, according to Newton’s laws of motion, will happen, if you assign a velocity to a particle and then it experiences no forces?
Axel.

Yep.

Generally speaking, fix setforce is not the most reliable way to immobilize particles in LAMMPS.

Every fix acts on a group of atoms that you want it to act upon. When you use fix nvt (or fix nve + fix langevin), omit the immobile atoms from the group of atoms that you want to move. This is the best way to immobilize particles in LAMMPS. In other words, create a group (using the group command) containing the atoms that you want to immobilize, and another group containing the mobile atoms. (One way to create the mobile group is to use the group command with the “subtract” keyword to subtract the immobile atoms from the “all” group.) Use this second group (the mobile group) with fix nvt (or fix nve, etc…)

If you are running simulations at constant pressure, then there are some additional issues to consider. There are some links to examples, as well as a long-winded (possibly incorrect) explanation at this link below:
https://lammps.sandia.gov/threads/msg46609.html

Cheers
Andrew