I am new to lammps, I am simulating a membrane and gas molecules in the surroundings, I want to know what is the necessary force to maintain a position in z, for which I am fixing a group of molecules that I call c and calculating what is the force necessary to maintain in that position for which I am using addforce, but when I add addforce at the time of printing the force in z it appears zero, does anyone know how I can solve this?
compute cforcex group-c property/atom fx
compute cforcey group-c property/atom fy
compute cforcez group-c property/atom fz
variable forcex equal -fx[2080]
variable forcey equal -fy[2080]
variable forcez equal -fz[2080]
dump 4 group-c custom 100 final.dump id type x y z c_cforcex c_cforcey c_cforcez
variable posx equal x[2080]
variable posy equal y[2080]
variable posz equal z[2080]
# Thermodynamic properties
thermo_style custom step temp pe ke etotal press density v_forcex v_forcey v_forcez v_posx v_posy v_posz
thermo 100
# Apply forces
fix 1 all nvt temp 0.1 0.1 0.01
fix c-group group-c addforce 0 0 v_forcez every 1
I have try to put the dump command before add force or thermostyle command before add force but I got zero for the force in the z direcction, which is no true