[lammps-users] fix setforce commad for "freezing" surface atoms

Dear LAMMPS Team,

I am dealing with water molecules on a metal surface. Now I would like to freeze the metal atoms, but still want to keep the interaction with the water molecules and metal surface. Seems like when I use fix setforce 0 for the metal surface atoms, there seem to be no interaction between metal surface atoms and water. How can I freeze my surface atoms, but still have LJ interaction with water?

Sorry for the beginners question and thanks in advance.

Best,

Oskar

Dear LAMMPS Team,

I am dealing with water molecules on a metal surface. Now I would like to freeze the metal atoms, but still want to keep the interaction with the water molecules and metal surface. Seems like when I use fix setforce 0 for the metal surface atoms, there seem to be no interaction between metal surface atoms and water. How can I freeze my surface atoms, but still have LJ interaction with water?

Your assertion is incorrect. Interactions are computed and the water atoms will continue to feel the impact of the metal atoms. Only the forces of those metal atoms due to the water atoms or the other metal atoms will be reset. Fix setforce is applied after the normal computation of interactions and tallying of forces.

But in general, keep in mind that a) a simpler approach to immobilize atoms is to not include them in time integration and b) a more physically meaningful approach to limit the motion of atoms is to use a restraining force via fix spring/self. The latter will still allow thermal motion of the atoms and thus avoid unphysical effects from having immobilized atoms, which are effectively atoms at zero kelvin, cooling down nearby non-immobilized atoms.

Axel.