I have used the fix force to slab but atoms of carbon got minimized as the slab of carbon shrinks instead of shrinkage of the molten metal presented by water group. A kind of distortion of slab is present. The fixes are shown in script.
Thanks for Cooperation
in.vaq1 (1.19 KB)
Please always report which version of LAMMPS you are using.
Please also always use a meaningful subject line (this is common mailing list etiquette)
you need to spend more time learning the very basics how LAMMPS executes inputs.
order in the input file matters. you are doing the minimization before you enable fix setforce. thus the fix cannot have any effect.
please see: https://docs.lammps.org/Commands_input.html
also your input has syntax errors. please do not post scripts with obvious errors to the list.