[lammps-users] question about fix freeze

Dear Steve and all,

I recently tried to use “fix freeze” command to speed up a packing generation process by removing all the kinetic energy from the system (at least this is what the word “freeze” suggests).

Well, that didn’t work out. Because instead of zeroing out all the velocities, fix freeze zeroing out all the forces and torques.

I was just wondering why it was implemented this way. Obviously, this could lead to a very non-physical situation, such as particles penetrating each other.

I would like to suggest zeroing out all the velocities instead of forces and torques.

Correct me if I’m wrong.



Dear Yzp,

It’s unclear what your question is. The velocity command can be used to set velocities to zero, thereby removing all kinetic energy from the system. If you want to remove some kinetic energy from the system, you can apply a fix temperature/rescale. If what you really want is a good packing configuration, you can do an energy minimization, which neglects kinetic energy, but moves the particles into physically reasonable positions.

Don’t rely on what you think the name of a command indicates, read the documentation. The fix freeze documentation clearly states “Description: Zero out the force and torque on a granular particle.” If you set the velocities to zero using the velocity command and then apply this fix, those particles will not move. However, in some cases, you might want a given particle to keep moving and exert forces on other particles, but be itself unaffected by the other particles. The fix freeze command makes this possible.


Fix freeze is meant to freeze wall atoms, i.e. hold them 100%
stationary. If you want to pack a collection of moving atoms,
don't freeze them. Since granular potentials have dissipative
terms, they will pack particles fine due to just gravity. E.g.
use LAMMPS to pour granular particles into a container
with frozen walls, and let them settle. They will end up
packed, at least to some extent. See examples/pour.