1GMX-DENSITY(1) GROMACS GMX-DENSITY(1)
2
3
4
6 gmx-density - Calculate the density of the system
7
9 gmx density [-f [<.xtc/.trr/...>]] [-n [<.ndx>]] [-s [<.tpr>]]
10 [-ei [<.dat>]] [-o [<.xvg>]] [-b <time>] [-e <time>]
11 [-dt <time>] [-[no]w] [-xvg <enum>] [-d <string>]
12 [-sl <int>] [-dens <enum>] [-ng <int>] [-[no]center]
13 [-[no]symm]
14
16 gmx density computes partial densities across the box, using an index
17 file.
18
19 For the total density of NPT simulations, use gmx energy instead.
20
21 Option -center performs the histogram binning relative to the center of
22 an arbitrary group, in absolute box coordinates. If you are calculating
23 profiles along the Z axis box dimension bZ, output would be from -bZ/2
24 to bZ/2 if you center based on the entire system. Note that this be‐
25 haviour has changed in GROMACS 5.0; earlier versions merely performed a
26 static binning in (0,bZ) and shifted the output. Now we compute the
27 center for each frame and bin in (-bZ/2,bZ/2).
28
29 Option -symm symmetrizes the output around the center. This will auto‐
30 matically turn on -center too. The binning is now always performed in
31 relative coordinates to account for changing box dimensions with pres‐
32 sure coupling, with the output scaled to the average box dimension
33 along the output axis.
34
35 Densities are in kg/m^3, and number densities or electron densities can
36 also be calculated. For electron densities, a file describing the num‐
37 ber of electrons for each type of atom should be provided using -ei.
38 It should look like:
39
40 2
41 atomname = nrelectrons
42 atomname = nrelectrons
43
44 The first line contains the number of lines to read from the file.
45 There should be one line for each unique atom name in your system. The
46 number of electrons for each atom is modified by its atomic partial
47 charge.
48
49 IMPORTANT CONSIDERATIONS FOR BILAYERS
50
51 One of the most common usage scenarios is to calculate the density of
52 various groups across a lipid bilayer, typically with the z axis being
53 the normal direction. For short simulations, small systems, and fixed
54 box sizes this will work fine, but for the more general case lipid bi‐
55 layers can be complicated. The first problem that while both proteins
56 and lipids have low volume compressibility, lipids have quite high area
57 compressiblity. This means the shape of the box (thickness and
58 area/lipid) will fluctuate substantially even for a fully relaxed sys‐
59 tem. Since GROMACS places the box between the origin and positive coor‐
60 dinates, this in turn means that a bilayer centered in the box will
61 move a bit up/down due to these fluctuations, and smear out your pro‐
62 file. The easiest way to fix this (if you want pressure coupling) is to
63 use the -center option that calculates the density profile with respect
64 to the center of the box. Note that you can still center on the bilayer
65 part even if you have a complex non-symmetric system with a bilayer
66 and, say, membrane proteins - then our output will simply have more
67 values on one side of the (center) origin reference.
68
69 Finally, large bilayers that are not subject to a surface tension will
70 exhibit undulatory fluctuations, where there are 'waves' forming in the
71 system. This is a fundamental property of the biological system, and
72 if you are comparing against experiments you likely want to include the
73 undulation smearing effect.
74
76 Options to specify input files:
77
78 -f [<.xtc/.trr/...>] (traj.xtc)
79 Trajectory: xtc trr cpt gro g96 pdb tng
80
81 -n [<.ndx>] (index.ndx) (Optional)
82 Index file
83
84 -s [<.tpr>] (topol.tpr)
85 Portable xdr run input file
86
87 -ei [<.dat>] (electrons.dat) (Optional)
88 Generic data file
89
90 Options to specify output files:
91
92 -o [<.xvg>] (density.xvg)
93 xvgr/xmgr file
94
95 Other options:
96
97 -b <time> (0)
98 Time of first frame to read from trajectory (default unit ps)
99
100 -e <time> (0)
101 Time of last frame to read from trajectory (default unit ps)
102
103 -dt <time> (0)
104 Only use frame when t MOD dt = first time (default unit ps)
105
106 -[no]w (no)
107 View output .xvg, .xpm, .eps and .pdb files
108
109 -xvg <enum> (xmgrace)
110 xvg plot formatting: xmgrace, xmgr, none
111
112 -d <string> (Z)
113 Take the normal on the membrane in direction X, Y or Z.
114
115 -sl <int> (50)
116 Divide the box in this number of slices.
117
118 -dens <enum> (mass)
119 Density: mass, number, charge, electron
120
121 -ng <int> (1)
122 Number of groups of which to compute densities.
123
124 -[no]center (no)
125 Perform the binning relative to the center of the (changing)
126 box. Useful for bilayers.
127
128 -[no]symm (no)
129 Symmetrize the density along the axis, with respect to the cen‐
130 ter. Useful for bilayers.
131
133 • When calculating electron densities, atomnames are used instead of
134 types. This is bad.
135
137 gmx(1)
138
139 More information about GROMACS is available at <‐
140 http://www.gromacs.org/>.
141
143 2022, GROMACS development team
144
145
146
147
1482022.3 Sep 02, 2022 GMX-DENSITY(1)