Spatially Varying External Force

Hello,

Is there a way we can apply a spatially varying external force in
LAMMPS. I went through the manual if anything like this is possible
but couldn't find anything.
Any help is appreciated.

Apoorv

Hello,

Is there a way we can apply a spatially varying external force in
LAMMPS. I went through the manual if anything like this is possible
but couldn't find anything.

yes. this is possible using fix addforce. you can define an atom
style variable that computes the external force based on the
individual atom's position and then have it added to the total force.

cheers,
    axel.