I want to apply a restraining force in z direction (i.e. atoms would be allowed to move in z-direction, but pull back by the force) but as I do or intending to do that I get zero in the force in z, and in the dump file or in thermo style I am still getting the same so I guess I don’t get how to do it properly
this has been some of my attempts…
Apply forces
fix 1 all nvt temp 0.1 0.1 0.01
fix c group-c addforce 0 0 v_forcez #every 1
#fix 3 group-c smd/setvel NULL NULL 0.0
#set group group-c z 2.4216759
#set atom 2080 x 0.0 y 0.0 z 2.4216759
#velocity group-c set NULL NULL 0.0
#fix zzero group-c setforce NULL NULL 0.0
#fix c group-c setforce NULL NULL v_forcez