[lammps-users] Fixing atoms using "setforce to zero" does not work


I’m doing a simulation of TiO2 (I want it to be fixed in space) with water and ions. To make sure the atoms of TiO2 are not moving during the simulations, I used the following commands:

velocity tio2 set 0.0 0.0 0.0 units box
fix 5 tio2 setforce 0.0 0.0 0.0

The TiO2 membrane remains fixed for about 1 ps (950 time steps) and then suddenly the atoms of TiO2 start to move around! I have the entire input file below. Any help is appreciated!

units real
dimension 3
boundary p p p
atom_style full
neigh_modify delay 0 every 1 check yes #exclude type 1 1 exclude type 2 2 exclude type 1 2
processors * * *

variable timecoef equal 1.00
variable T equal 300
variable thermo_itv equal 50
variable seed equal 2012

atom definition:

read_data input_234ions.lammps

you must be mixing something up or do not provide a complete input.

your atoms of type 1 and 2 cannot move because they are not part of the “fluidmols” group, which is the only group of atoms that is handled by a time integration fix and thus can move. your fix setforce command has no effect since those atoms are not even subject to time integration.