GMX-GENION(1)

✨ GMX-GENION ✨

okay bestie, welcome to gmx-genion πŸ’– this is the GROMACS one, and she is the girl for sprinkling ions into your simulation box like glitter on a craft project ✨


🌸 NAME 🌸

gmx-genion β€” generate monoatomic ions on energetically favorable positions 🧚


πŸŽ€ SYNOPSIS πŸŽ€

gmx genion [-s [<.tpr>]] [-n [<.ndx>]] [-p [<.top>]]
           [-o [<.gro/.g96/...>]] [-np <int>] [-pname <string>]
           [-pq <int>] [-nn <int>] [-nname <string>] [-nq <int>]
           [-rmin <real>] [-seed <int>] [-conc <real>] [-[no]neutral]

πŸ’… DESCRIPTION πŸ’…

so what she does is: gmx genion randomly replaces solvent molecules with monoatomic ions πŸ”₯ random, but make it science.

the group of solvent molecules you pick has to be continuous and every single molecule in it has to have the same number of atoms β€” no chaotic mixed bags, bestie, she can't work with that 😭

then you gotta add the ion molecules to your topology file yourself, OR let the -p option do it for you automatically 🫢


the naming lore, pay attention πŸ‘‘

the ion molecule type, residue and atom names in all force fields are the capitalized element names without sign. this molecule name is what you hand over with -pname or -nname, and then the [molecules] section of your topology gets updated accordingly β€” either by hand or with -p.

⚠️ do NOT use an atom name instead, bestie. that is not the vibe. πŸ’€

ions that can have multiple charge states get the multiplicity added, without sign, for the uncommon states only ✨

and for the bigger ions β€” like sulfate, for example β€” we recommend using gmx insert-molecules instead πŸ™ˆ


✨ OPTIONS ✨

πŸ¦‹ Options to specify input files πŸ¦‹

  • -s [<.tpr>] (topol.tpr) β€” portable xdr run input file, aka the whole blueprint of your run πŸ’œ
  • -n [<.ndx>] (index.ndx) (Optional) β€” index file, if you have one πŸŽ€

🌈 Options to specify input/output files 🌈

  • -p [<.top>] (topol.top) (Optional) β€” topology file, she reads it and edits it, main character energy πŸ‘‘

πŸ“ Options to specify output files πŸ“

  • -o [<.gro/.g96/...>] (out.gro) β€” structure file: gro g96 pdb brk ent esp 🌸

πŸ’– Other options πŸ’–

  • -np <int> (0) β€” number of positive ions πŸ”₯
  • -pname <string> (NA) β€” name of the positive ion ✨
  • -pq <int> (1) β€” charge of the positive ion ⭐
  • -nn <int> (0) β€” number of negative ions πŸ’…
  • -nname <string> (CL) β€” name of the negative ion πŸ’œ
  • -nq <int> (-1) β€” charge of the negative ion 🧚
  • -rmin <real> (0.6) β€” minimum distance between ions and non-solvent πŸŽ€
  • -seed <int> (0) β€” seed for random number generator (0 means generate) 🎲
  • -conc <real> (0) β€” specify salt concentration (mol/liter). this will add sufficient ions to reach up to the specified concentration as computed from the volume of the cell in the input .tpr file. overrides the -np and -nn options πŸ‘€
  • -[no]neutral (no) β€” this option will add enough ions to neutralize the system. these ions are added on top of those specified with -np/-nn or -conc βš–οΈ

πŸ’€ KNOWN ISSUES πŸ’€

  • if you specify a salt concentration, existing ions are not taken into account. in effect, you therefore specify the amount of salt to be added πŸ™ˆ

🌟 SEE ALSO 🌟

more information about GROMACS is available at <http://www.gromacs.org/> 🌈


2026, GROMACS development team πŸ’–


and that's the whole page, bestie 🫢 this was GROMACS 2026.4, dated Oct 02, 2026 β€” go ionize something iconic πŸ’…βœ¨

πŸ“¦ where this page comes from