GMX-SPATIAL(1)
π GMX-SPATIAL(1) β the gmx-spatial era π
okay bestie, welcome to the GROMACS manual, section 1, and today's main character is gmx-spatial π«Ά buckle up, we're doing spatial distribution functions and it's gonna be gorgeous.
β¨ NAME β¨
gmx-spatial β calculate the spatial distribution function π
β¨ SYNOPSIS β¨
gmx spatial [-s [<.tpr/.gro/...>]] [-f [<.xtc/.trr/...>]] [-n [<.ndx>]]
[-b <time>] [-e <time>] [-dt <time>] [-[no]w] [-[no]pbc]
[-[no]div] [-ign <int>] [-bin <real>] [-nab <int>]
β¨ DESCRIPTION β¨
so gmx spatial calculates the spatial distribution function and spits it out in a form that VMD can read as Gaussian98 cube format π¦β¨
real talk about the vibe: for a system of 32,000 atoms and a 50 ns trajectory, the SDF can be generated in about 30 minutes β and most of that time is dedicated to the two runs through trjconv that are required to center everything properly π it also takes a whole bunch of space (3 copies of the trajectory file, no cap). still, the pictures are pretty and very informative when the fitted selection is properly made π
what makes a good selection, you ask? 3-4 atoms in a widely mobile group (like a free amino acid in solution) works well, or you can select the protein backbone in a stable folded structure to get the SDF of solvent and look at the time-averaged solvation shell π
and here's the bonus content: it is also possible using this program to generate the SDF based on some arbitrary Cartesian coordinate π¦ to do that, simply omit the preliminary gmx trjconv steps. periodt.
usage (the ritual, in order) π―οΈ
- Use
gmx make_ndxto create a group containing the atoms around which you want the SDF gmx trjconv -s a.tpr -f a.tng -o b.tng -boxcenter tric -ur compact -pbc nonegmx trjconv -s a.tpr -f b.tng -o c.tng -fit rot+trans- run
gmx spatialon thec.tngoutput of step #3. - Load
grid.cubeinto VMD and view as an isosurface.
πΈ heads up: note that systems such as micelles will require gmx trjconv -pbc cluster between steps 1 and 2.
β οΈ Warnings β οΈ
The SDF will be generated for a cube that contains all bins that have some non-zero occupancy. However, the preparatory -fit rot+trans option to gmx trjconv implies that your system will be rotating and translating in space (in order that the selected group does not). Therefore the values that are returned will only be valid for some region around your central group/coordinate that has full overlap with system volume throughout the entire translated/rotated system over the course of the trajectory. It is up to the user to ensure that this is the case π¬ bestie, that's on you.
π Risky options π
To reduce the amount of space and time required, you can output only the coords that are going to be used in the first and subsequent run through gmx trjconv. However, be sure to set the -nab option to a sufficiently high value since memory is allocated for cube bins based on the initial coordinates and the -nab option value π§ don't say I didn't warn you.
β¨ OPTIONS β¨
π Options to specify input files:
-s[<.tpr/.gro/...>](topol.tpr) β Structure+mass(db):tpr gro g96 pdb brk entπ§¬-f[<.xtc/.trr/...>](traj.xtc) β Trajectory:xtc trr cpt gro g96 pdb tng h5mdποΈ-n[<.ndx>](index.ndx) (Optional) β Index file π
π οΈ Other options:
-b<time>(0) β Time of first frame to read from trajectory (default unit ps) β±οΈ-e<time>(0) β Time of last frame to read from trajectory (default unit ps) β±οΈ-dt<time>(0) β Only use frame when t MOD dt = first time (default unit ps) π-[no]w(no) β View output.xvg,.xpm,.epsand.pdbfiles π-[no]pbc(no) β Use periodic boundary conditions for computing distances π-[no]div(yes) β Calculate and apply the divisor for bin occupancies based on atoms/minimal cube size. Set as TRUE for visualization and as FALSE (-nodiv) to get accurate counts per frame π-ign<int>(-1) β Do not display this number of outer cubes (positive values may reduce boundary speckles;-1ensures outer surface is visible) π-bin<real>(0.05) β Width of the bins (nm) π-nab<int>(16) β Number of additional bins to ensure proper memory allocation π§
π KNOWN ISSUES π
- When the allocated memory is not large enough, an error may occur suggesting the use of the
-nab(Number of Additional Bins) option or increasing the-nabvalue. π memory said no.
π SEE ALSO π
More information about GROMACS is available at <http://www.gromacs.org/> π
π COPYRIGHT π
2026, GROMACS development team π
okay that's the whole page bestie, you ate that π and fr fr, this was GROMACS 2026.4, dated Oct 02, 2026 β mwah π β¨ slay π¦
π¦ 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