GMX-INSERT-MOLECULES(1)

πŸ’– GMX-INSERT-MOLECULES(1) πŸ’–

okay bestie, welcome to the GROMACS manual page for gmx-insert-molecules β€” yes that's the title, that's the manual name, we're doing this 🫢


✨ NAME ✨

gmx-insert-molecules β€” insert molecules into existing vacancies πŸŽ€


🌸 SYNOPSIS 🌸

          gmx insert-molecules [-f [<.gro/.g96/...>]] [-ci [<.gro/.g96/...>]]
                       [-ip [<.dat>]] [-n [<.ndx>]] [-o [<.gro/.g96/...>]]
                       [-replace <selection>] [-sf <file>] [-selrpos <enum>]
                       [-box <vector>] [-nmol <int>] [-conc <real>]
                       [-try <int>] [-seed <int>] [-radius <real>]
                       [-scale <real>] [-dr <vector>] [-rot <enum>]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” gmx insert-molecules inserts -nmol copies of the system you specified in the -ci input file. and like, you can also figure out the number of copies from the concentration -conc in mol/liter plus the box volume, if that's more your vibe ✨

where do the insertions actually go? either into vacant space in the solute conformation you handed over with -f, or into an empty box given by -box. and if you specify both -f and -box? it behaves like -f, but it places a new box around the solute before insertions happen. also heads up: any velocities present are discarded 😭

ngl, you can also insert into a solvated configuration and replace solvent atoms with the inserted atoms πŸ’… for that, use -replace to specify a selection that identifies the atoms that can be replaced. the tool lowkey assumes that all molecules in this selection consist of single residues: each residue from this selection that overlaps with the inserted molecules will be removed instead of preventing insertion. periodt.

by default, the insertion positions are random (with the initial seed specified by -seed). the program iterates until -nmol molecules have been inserted in the box. molecules are not inserted where the distance between any existing atom and any atom of the inserted molecule is less than the sum based on the van der Waals radii of both atoms. there's a database (vdwradii.dat) of van der Waals radii that gets read by the program, and the resulting radii get scaled by -scale. if radii aren't found in the database, those atoms are assigned the (pre-scaled) distance -radius. ⚠️ and note that the usefulness of those radii depends on the atom names, and thus varies widely with force field. iykyk πŸ™ˆ

so a total of -nmol * -try insertion attempts are made before giving up. increase -try if you have several small holes to fill, bestie. option -rot specifies whether the insertion molecules are randomly oriented before insertion attempts πŸŒ€

alternatively β€” main character energy β€” the molecules can be inserted only at positions defined in positions.dat (-ip). that file should have 3 columns (x,y,z), that give the displacements compared to the input molecule position (-ci). hence, if that file should contain the absolute positions, the molecule must be centered on (0,0,0) before using gmx insert-molecules (e.g. from gmx editconf -center). comments in that file starting with # are ignored πŸ‘‘ option -dr defines the maximally allowed displacements during insertial trials. -try and -rot work as in the default mode (see above).


πŸ’… OPTIONS πŸ’…

πŸŽ€ Options to specify input files:

  • -f [<.gro/.g96/...>] (protein.gro) (Optional) β€” existing configuration to insert into: gro g96 pdb brk ent esp tpr
  • -ci [<.gro/.g96/...>] (insert.gro) β€” configuration to insert: gro g96 pdb brk ent esp tpr
  • -ip [<.dat>] (positions.dat) (Optional) β€” predefined insertion trial positions πŸ“
  • -n [<.ndx>] (index.ndx) (Optional) β€” extra index groups

🌈 Options to specify output files:

  • -o [<.gro/.g96/...>] (out.gro) β€” output configuration after insertion: gro g96 pdb brk ent esp

⭐ Other options:

  • -replace <selection> β€” atoms that can be removed if overlapping πŸ—‘οΈ
  • -sf <file> β€” provide selections from files
  • -selrpos <enum> (atom) β€” selection reference positions: atom, res_com, res_cog, mol_com, mol_cog, whole_res_com, whole_res_cog, whole_mol_com, whole_mol_cog, part_res_com, part_res_cog, part_mol_com, part_mol_cog, dyn_res_com, dyn_res_cog, dyn_mol_com, dyn_mol_cog
  • -box <vector> (0 0 0) β€” box size (in nm) πŸ“¦
  • -nmol <int> (0) β€” number of extra molecules to insert
  • -conc <real> (0) β€” concentration (in mol/liter) of extra molecules to insert. this overrides -nmol ⚠️
  • -try <int> (10) β€” try inserting -nmol times -try times
  • -seed <int> (0) β€” random generator seed (0 means generate) 🎲
  • -radius <real> (0.105) β€” default van der Waals distance
  • -scale <real> (0.57) β€” scale factor to multiply Van der Waals radii from the database in share/gromacs/top/vdwradii.dat. the default value of 0.57 yields density close to 1000 g/l for proteins in water πŸ’§
  • -dr <vector> (0 0 0) β€” allowed displacement in x/y/z from positions in -ip file
  • -rot <enum> (xyz) β€” rotate inserted molecules randomly: xyz, z, none

πŸ‘€ 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 version 2026.4, dated Oct 02, 2026, and it's the GMX-INSERT-MOLECULES(1) manual β€” slay, go fill those vacancies πŸ’–βœ¨

πŸ“¦ where this page comes from