GMX-GENRESTR(1)
β¨ gmx-genrestr β¨
okay bestie, so this is a page from the GROMACS manual β it lives in section 1 of the man pages, and it's literally all about the tool gmx-genrestr. buckle up π
π NAME π
gmx-genrestr β generate position restraints or distance restraints for index groups π«Ά
πΈ SYNOPSIS πΈ
gmx genrestr [-f [<.gro/.g96/...>]] [-n [<.ndx>]] [-o [<.itp>]]
[-of [<.ndx>]] [-fc <vector>] [-freeze <real>]
[-[no]disre] [-disre_dist <real>] [-disre_frac <real>]
[-disre_up2 <real>] [-cutoff <real>] [-[no]constr]
π¦ DESCRIPTION π¦
so gmx genrestr produces an #include file for a topology, and inside it is a list of atom numbers plus three force constants β one each for the x-, y-, and z-direction β all built from whatever is in the -f file. and if you don't wanna hand over three components? no biggie, you can just give a single isotropic force constant on the command line instead. slay. β¨
WARNING β οΈ position restraints are interactions within molecules, so they absolutely must be included inside the correct[ moleculetype ]block in the topology. the atom indices in the[ position_restraints ]block have to fall within the range of atom indices for that molecule type. and here's the tricky part β since the atom numbers in every moleculetype in the topology start at 1, but the numbers in the input file forgmx genrestrjust go consecutively from 1,gmx genrestrwill only produce a useful file for the first molecule. π you might wanna edit the resulting index file to remove the lines for later atoms, or build a suitable index group to feed intogmx genrestras input. your call, babe.
the -of option produces an index file that can be used for freezing atoms π§ β in that case, the input file must be a .pdb file, lowkey non-negotiable.
with the -disre option, it's a whole different vibe: instead of position restraints you get half a matrix of distance restraints. with this matrix β which you'd typically apply to Calpha atoms in a protein β you can maintain the overall conformation of a protein without tieing it to a specific position (which is what position restraints do). it's giving freedom with structure, fr fr. π
π OPTIONS π
π Options to specify input files:
-f [<.gro/.g96/...>](conf.gro) β the structure file. formats it knows:grog96pdbbrkentesptpr-n [<.ndx>](index.ndx) (Optional) β index file
π Options to specify output files:
-o [<.itp>](posre.itp) β the include file for topology-of [<.ndx>](freeze.ndx) (Optional) β index file
β Other options:
-fc <vector>(1000 1000 1000) β force constants, inkJ/mol nm^2-freeze <real>(0) β if you give the-ofoption, or this one, an index file gets written containing the atom numbers of all atoms that have a B-factor less than the level you give here-[no]disre(no) β generate a distance restraint matrix for all the atoms in index-disre_dist <real>(0.1) β distance range around the actual distance, for generating distance restraints-disre_frac <real>(0) β fraction of distance to be used as interval rather than a fixed distance. and heads up: if the fraction of the distance you specify here is less than the distance given in the previous option, then that one gets used instead. π-disre_up2 <real>(1) β distance between the upper bound for distance restraints, and the distance at which the force becomes constant (peep the manual for this one π)-cutoff <real>(-1) β only generate distance restraints for atom pairs within the cutoff, innm-[no]constr(no) β generate a constraint matrix rather than distance restraints. constraints of type 2 will be generated, and those do generate exclusions. π«£
π₯ SEE ALSO π₯
more tea about GROMACS is available at <http://www.gromacs.org/>. π«Ά
π COPYRIGHT π
2026, GROMACS development team
and that's the whole thing, bestie!! π this page was version 2026.4, dated Oct 02, 2026, straight from the GROMACS girlies themselves β go forth and restrain some atoms, you absolute icon πβ¨πΈπ
π¦ where this page comes from
- nixpkgs unstable: gromacs 2026.4
- ubuntu stonking: gromacs-data 2026.4-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms