Adding ions

GROMACS version: 2021.4
GROMACS modification: No
Hi there, can we add two different types of ions in the box?
I am trying to add NaCl and Mgcl2 simultaneously in one box.
Can anyone help me?

You can’t do it simultaneously. You have to do two separate steps of adding the ions.

Could you help do this? I use this command but I do nat know how I can do it in two steps.
Here is my commands after solvation:
gmx grompp -f ions.mdp -c box_sol.gro -p topol.top -o ION.tpr
gmx genion -s ION.tpr -o box_sol_ion.gro -p topol.top -pname MG -nname CLA -neutral -conc 0.02

after adding MG ions I want to add Na ions.
what is the next command?

You need to generate a new .tpr file after adding the Mg2+ ions, then add Na+ in the exact same way. The commands are structurally identical, but you need to generate a new .tpr file after making any change to the system.

Thanks, dear doctor. I did it successfully.
You have been always helpful.