Apply radial force to a group of atoms

Hi ,

    I got stuck once i am trying to apply radial force to a group of
atoms. To visualize the problem in a detail let me state in a brief.
Say ,I have 3 concentric circles with radii A,B,C (A<B<C) and
(B-A)<<(C-B). So, there is a thinner inner region in a circular shell.
Now I have some atoms in that thin region (A<r<B) and I want to apply
a radial force to each of the atoms.
I have tried with "fix setforce" command. But its not working as per my
problem demands. Can you please help me out . Thanks in advance.


With fix setforce, you can define an atom-style variable
that calculates the distance of an atom from the center point
(of your concentric circles) and scales that distance by some
pre-factor you define to get a force magnitude. Then use
3 atom style variables which become args to fix setforce
for x y z force, each of which takes that magnitude and the
component of it in the direction towards the center point.

Just like you are writing computer code to do it.

Or you could look at fix wall/region and use a spherical
wall to push particles inward.