GROMACS Tutorial

Step One: Prepare the Hydrophobic Layer

The hydrophobic layer that will be generated in this tutorial will be composed of cyclohexane, modeled under the GROMOS96 43A1 force field. Use your favorite molecule-editing software to obtain a coordinate file. The topology is straightforward to produce, but can be generated from online servers like PRODRG, if you prefer. Be sure to assign zero charges to all the united CH2 atoms, rather than use the partial charges that PRODRG gives you. To save time, you can download my cylohexane coordinate file and topology.

There are two ways to construct the box. Method 1 randomly inserts molecules into a box of a given size, and Method 2 builds a grid of molecules in specified dimensions. Both methods are presented here.

Method 1. Random Insertion

You can use the insert-molecules module to insert molecules randomly into a box of fixed size. For instance, to build a 5-nm cubic box filled with cyclohexane, issue:

gmx insert-molecules -ci chx.gro -nmol 1200 -box 5 5 5 -o chx_box.gro

The value passed to the -nmol flag is somewhat arbitrary. You can set some large number, and insert-molecules will fit as many of those molecules into the box as possible. You are advised to try several (increasing) numbers to ensure that you are actually filling the box. Once the number of added molecules converges, you know you have added as many as possible. With the above command, I obtained a box with 1114 cyclohexane molecules. This was the procedure used in one of our recent papers.

Method 2. Specific Insertion

If you prefer a less haphazard way of building your box, you can use the genconf module to build a grid of molecules in specified dimensions. The advantage of Method 1 is that there is less artificial order in the system, speeding up equilibration. The advantage of Method 2 is that you have somewhat more control of how many molecules are added, and you know exactly where they will be. Issue the following:

gmx genconf -f chx.gro -nbox 8 8 8 -o chx_box.gro

This command will give you an output box containing 512 (83) cyclohexane molecules. It is not necessary to provide identical numbers in the x-, y-, and z-dimensions. You can build rectangular slabs of arbitrary size. For the purposes of this tutorial, however, a cubic box will suffice.

At this point, you should simulate the cyclohexane box such that its density stabilizes. Following steepest descent minimization, 100 ps each of NVT (298 K) and NPT equilibration (298 K, 1 bar), I was able to obtain a reasonable density with an additional 10 ns of simulation under these same NPT conditions. My equilibrated box (obtained from Method 1 above) can be downloaded here.

Back: Introduction Next: Construct The Box

Site design and content copyright Justin Lemkul
Problems with the site? Send them to the Webmaster