[lammps-users] question regarding fix_aveforce command

Dear users,
I am simulating a nanoparticle (group of atoms in a bcc lattice) in a polymer matrix. Currently, I am annealing my system down to T=0.2 and using fix aveforce command to average out the force on the beads of the nanoparticle. I set the initial velocity to 0 for all the beads and expecting same motion of all of its beads during the simulation run (as all the beads of the NP will feel the same force).

However, I was tracking down the distance between 2 of its beads and I found that it is decreasing continously (please see attached file). I am wondering why the atoms are moving to a different degree if they are feeling the same force.

I would also like to mention that I tried annealing the system using fix rigid command. It worked well till T=0.3. However on further lowering the temperature, I observed huge fluctuation in the pressure values and temperature values ( thats why I switched to fix aveforce). (please see the figures for the reference)

I would appreciate any help with fix aveforce or fix rigid.






Are all of the atoms in your nanoparticles of the same mass? If not, they won’t be accelerated at the same rate even though the same force is applied. Also, are you using any other fixes that might be imposing additional forces?

As far as fix rigid is concerned, it looks like the dynamics went unstable. Time step too large? Perhaps the thermostat you were using made things go unstable. Which thermostat did you use?

You might consider sending your input script.


Dear Paul,
All the atoms of the NP are of same mass. I am also not using any other fix on the nanoparticle. I am attaching the input script along with this email. Please see if you find any discripency in it.

Just FYI, I tried running simulation using both fix npt polymer and fix npt all groups but got similar results. (the distance was fluctuating in both cases)

Also. I am running the simulation with fix rigid (with smaller timestep 0.002 instead of 0.005). will let you know what happens. Here, the distance between two atoms of the NP remains constant ( in the initial part of run where system is still stable).


in.anneal.p (1.34 KB)


It isn’t clear to me why you’re seeing atoms in the same NP move apart. Looks like you are indeed zeroing the velocities of each of the nanoparticle atoms and applying only the aveforce fix to the NP group. If your aren’t able to figure it out, and your data file isn’t too big, you could send along the data file so that we could take a closer look.

Note that when using fix rigid you should not apply a separate integration fix to those same atoms. Looks like you weren’t doing that, but you should make sure.