# Odd behaviour with setforce and aveforce

I am doing a simulation of contact between two amorphous materials containing C and H modeled using the airebo potential. I apply a load to the top piece while the bottom piece is held rigid.

The general sequence of commands I use is as follows: (full input and small test coordinate system available upon request)

group topfix type 1 2 # this groups C (type 1) and H (type 2) atoms located at the top of the coordinate system into one group.

fix 2 topfix setforce 0.0 0.0 NULL # this zeros force in x and y.
fix 3 topfix aveforce NULL NULL v_load # this set the force to a variable I have defined elsewhere.

The odd thing is that all the H atoms move as one rigid body, and all the C atoms move as a separate rigid body. The H and C are not constrained to move together as one unit as one would expect from the group command. The result of the simulation is that all the H’s in the fixed region are ripped free (as a single unit) and the system is destroyed.

My guess is that since a constant force is being applied, the H being less massive are accelerating more? Would this be a bug, or just an unintended consequence of trying to lump particles of different mass together into one fix involving force?

At present my solution is to simply apply the fix to only the C atoms leaving the H atoms free to move. Though this creates some other minor problems. Alternatively, I could try to set the masses of all the atoms in the group to the average mass of the group.

Thanks,

Dave

My guess is that since a constant force is being applied, the H being less
massive are accelerating more? Would this be a bug, or just an unintended
consequence of trying to lump particles of different mass together into one
fix involving force?

You guess well. This is the expected behavior of fix aveforce.

Alternatively, I could try to set the masses of all the atoms in
the group to the average mass of the group.

You also suggest a perfect solution: since you want C and H atoms to
move as a rigid body, only the total mass of the group is relevant.

Best,
Laurent

My guess is that since a constant force is being applied, the H being less massive are accelerating more? Would this be a bug, or just an >unintended consequence of trying to lump particles of different mass together into one fix involving force?

yes, it applies ave force, not ave acceleration. I suppose we could
add an option to scale the applied force by each particle's mass.

Steve