make ndx
From wiki.gromacs.org
Almost every GROMACS program can utilise an index group for its operating and make_ndx can generate the index file. Only required when special groups are required, deafult index groups already generated (entire system, 9 groups for proteins, and one for every other residue name).
Allows you to select on atom, residue and chain names and numbers (atom type when supplying run input file). You can use NOT, AND and OR, split groups into chains, residues or atoms, and delete and rename groups.
Typing "h" at the make_ndx prompt will give some good examples of how to use the tool. A common request across the gmx-users listserv is to provide examples of how to create special index groups. There are some examples in the list archive, but a concise presentation of a few is appropriate here. Since membranes tend to give the most issues, these examples are in the context of a fully-solvated, pure DPPC bilayer.
For tools like g_density, dividing the lipids into different regions is common. To create a group containing just headgroup atoms:
> a C1 | a C2 | a C3 | a N4 | a C5 | a C6 | a O7 | a P8 | a O9 | a O10 | a O11
This will be entered as Group 3, so, for convenience, you could enter the following:
> name 3 Headgroups
To analyze, for example, the properties of the headgroups of one leaflet, first create a group that contains just the lipids of the top leaflet (assuming a 128-lipid bilayer, this would correspond to residues 1-64).
> r 1-64
Found 3200 atoms with res.nr. in range 1-64
3 r_1-64 : 3200 atoms
> 3 & a C1 | a C2 | a C3 | a N4 | a C5 | a C6 | a O7 | a P8 | a O9 | a O10 | a O11
(some listing of how the groups are being merged)
4 r_1-64_&_C1_C2_C3_N4_C5_C6_O7_P8_O9_O10_O11: 704 atoms
> name 4 1-64_Headgroups
Another common question is about how to create the proper index group for deuterium order analysis. Many users will blindly run g_order on a membrane structure, and will be confronted with several errors because they have not specified the appropriate index groups. Each index file should contain only one acyl chain (again DPPC will be used here), and only the carbon atoms of the acyl chain.
$ make_ndx -f dppc128.pdb -o sn1.ndx
> a C34
> a C36
...
> a C50
After creating these groups, type Enter at the prompt to list all the groups present. You should see something like:
0 System : 17365 atoms
1 DPPC : 6400 atoms
2 SOL : 10965 atoms
3 C34 : 128 atoms
4 C36 : 128 atoms
5 C37 : 128 atoms
6 C38 : 128 atoms
7 C39 : 128 atoms
8 C40 : 128 atoms
9 C41 : 128 atoms
10 C42 : 128 atoms
11 C43 : 128 atoms
12 C44 : 128 atoms
13 C45 : 128 atoms
14 C46 : 128 atoms
15 C47 : 128 atoms
16 C48 : 128 atoms
17 C49 : 128 atoms
18 C50 : 128 atoms
Remove the unnecessary groups:
> del 0-2
> q
Again, different subsets of these atoms (i.e., separate leaflets) can be analyzed by specifying the appropriate residue range, as shown above.
[edit] References
- Manual:make ndx_3.3.2
- GROMACS Manual, Appendix D66
- make_ndx, Online Manual

