# How should I understand the fix rigid / fix setforce command

Hello, I used mw potential function to calculate static contact angle in NVT ensemble. The velocity bottom set 0.0 0.0 0.0 and fix 1 bottom setforce 0 0 0 commands are used to eliminate interaction between substrates. After energy minimization, relaxation causes the droplet atoms to scatter. Why?

units metal
dimension 3
atom_style atomic
boundary p p p
neighbor 3 bin
neigh_modify delay 0 every 1 check yes
region box block 0 480 0 480 0 240 units box
create_box 2 box
mass 1 18.0154
mass 2 28
pair_style hybrid sw lj/cut 10.0
pair_coeff * * sw mW.sw mW NULL
pair_coeff 2 2 lj/cut 0.000000 0.000000 10.0
pair_coeff 1 2 lj/cut 0.006 3.2 10.0
lattice fcc 4 orient x -1 -1 2 orient y 1 -1 0 orient z 1 1 1 origin 0 0 0.5
region bottom block INF INF INF INF 0 20 units box
create_atoms 2 region bottom
group bottom region bottom
group bottom type 2
region liquid block 195 285 195 285 30 120 units box
create_atoms 1 random 24368 724890 liquid
group liquid type 1
velocity liquid create 300.0 45632
velocity bottom set 0.0 0.0 0.0
fix 1 bottom setforce 0.0 0.0 0.0
min_style cg
minimize 1.0e-12 1.0e-12 10000 10000
timestep 0.01 #10fs
thermo 100
thermo_style custom step temp pe ke etotal press vol density xlo xhi ylo yhi zlo zhi
dump 1 all custom 100 dump.StaticCA.*.gz id type x y z
fix 6 all nvt temp 300 300 1
run 10000

## How can these three commands be combined to achieve substrate fixation in NVT or NPT ensemble?

velocity bottom set 0.0 0.0 0.0 fix 1 bottom setforce 0 0 0 fix 2 bottom rigid

## Should I get the same result for whole fix 1 all NVT 300 300 1 and for part of it fix Liquid NVT 300 300 1?

• your `pair_coeff 2 2 lj/cut` setting is wasteful. You are computing all pairs up to the specified distance but then just apply an energy/force of zero. It would be more efficient to use `neigh_modify exclude type 2 2`
• to immobilize atoms during minimization, `fix setforce substrate 0.0 0.0 0.0` should be sufficient