How to deal with external forces for every atom in GROMACS?

GROMACS version:2022.4
GROMACS modification: No

Hi,
I’m trying to simulate a molecule in an external force field, for this reason I would like to know if is it possible to assign a different force (or acceleration) to every atom.
I looked at “pull code” and “accelerate” option in mdp input file, but it seems to me that’s only possible to assign an acceleration to a group, and not to single atoms.
How can I solve it?

Thanks to everyone

Hi Leonardo,

Yes, both accelerate and pull work with groups. Therefore I think there’s no way to apply an external force on a single atom, unless that atom is defined as its own group.

I have been looking at the accelerate code recently and it doesn’t seem too complex, though. So maybe you could try to implement this feature yourself.