The Gromacs source code is available officially from www.gromacs.org, though some Linux distributions offer pre-compiled versions. In most high-performance computing settings, Gromacs is compiled from source code in order to link in hardware-specific libraries for things like internode communication and compiler-specific math libraries. For this introductory survey though, we can just run the precompiled version on a laptop. (If you have macOS, you might have to compile Gromacs from source.) In Ubuntu under WSL:
$ sudo apt install gromacs
Gromacs is a suite of tools that include an MD engine along with tools for system preparation and simulation analysis. All tools are invoked using the pre-command `gmx`. `gmx -help` will give a lot of information.
Before proceeding with a couple of practical examples, I must convey the importance of reading the documentation if you want to use Gromacs in your own research. The official Gromacs documentation is extensive, but accessible to beginners. The official tutorials by Justin Lemkul are also a must if you want to learn how to use Gromacs.
Like any MD simulation, using Gromacs breaks down into three main steps:
As may be inferred, the first step is often the most difficult. It usually requires a lot of care and thought to generate an initial condition for MD. Here we'll consider just two test cases for which this is not so difficult, but which illustrate the workflow.