Is it possible to put the arbitrary distribution of electric field in a box simulation?

GROMACS version: any
GROMACS modification: Yes/No
Is it possible to put the arbitrary distribution of electric field in a box simulation?