|
1 |
| -# Docker files for GROMACS |
| 1 | +# GROMACS |
2 | 2 |
|
3 |
| -This repository hosts [Docker](https://www.docker.com/) recipes for [GROMACS](http://manual.gromacs.org/documentation/). |
| 3 | +[](https://hub.docker.com/r/gromacs/gromacs/ "gromacs/gromacs") |
4 | 4 |
|
5 |
| -Build with [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) |
| 5 | +[GROMACS](http://www.gromacs.org/) is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. |
6 | 6 |
|
| 7 | +It is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological systems, e.g. polymers. |
7 | 8 |
|
8 |
| -## Building |
| 9 | +This is a Docker image of GROMACS, which - if used with [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) - can provide hardware acceleration using NVIDIA GPUs. |
| 10 | + |
| 11 | +## Tags |
| 12 | + |
| 13 | +Docker image tags correspond to the official [Gromacs releases](http://manual.gromacs.org/documentation/). Note that the tags without a minor version number (e.g. `2019`) are not updated for new minor versions (e.g. `2019.1`), as `2019` and `2019.1` are distinct GROMACS versions (`2019` ~= `2019.0`). |
| 14 | + |
| 15 | +Feel free to raise a [pull request](https://github.com/bioexcel/gromacs-docker/pulls) to add a new release by updating `GROMACS_VERSION` and `GROMACS_MD5`. |
| 16 | + |
| 17 | + |
| 18 | +## Running |
| 19 | + |
| 20 | +Docker requires [binding](https://docs.docker.com/storage/bind-mounts/) of any directory that the container should have access to. The flag `-it` is also recommended for any interactive steps. All GROMACS commands are executed as `gmx MODULE`, each module provides their own help: |
| 21 | + |
| 22 | + docker run gromacs/gromacs gmx help commands |
| 23 | + docker run gromacs/gromacs gmx help pdb2gmx |
| 24 | + |
| 25 | +The below highlights this using an example of using `pdb2gmx` from the tutorial [KALP15 in DPPC](http://www.mdtutorials.com/gmx/membrane_protein/01_pdb2gmx.html): |
| 26 | + |
| 27 | + mkdir $HOME/data ; cd $HOME/data |
| 28 | + wget http://www.mdtutorials.com/gmx/membrane_protein/Files/KALP-15_princ.pdb |
| 29 | + docker run -v $HOME/data:/data -w /data -it gromacs/gromacs gmx pdb2gmx -f KALP-15_princ.pdb -o KALP-15_processed.gro -ignh -ter -water spc |
| 30 | + |
| 31 | + |
| 32 | +It is beyond the scope of this README file to document GROMACS usage. For further information see: |
| 33 | + |
| 34 | +* http://manual.gromacs.org/documentation/ |
| 35 | +* http://www.mdtutorials.com/gmx/ |
| 36 | + |
| 37 | + |
| 38 | +### Hardware-acceleration |
| 39 | + |
| 40 | +The command `gmx` in this container image will attempt to [detect](https://github.com/bioexcel/gromacs-docker/blob/dev/gmx-chooser) your CPU's AVX/SSE flags to use the corresponding optimized `gmx` binary. |
| 41 | + |
| 42 | +If you have an NVIDIA GPU, some GROMACS modules (in particular `mdrun`) can benefit hugely from hardware acceleration by using [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) which takes care of mapping the GPU device files. Simply replace `docker` above with `nvidia-docker` in the commands above. |
| 43 | + |
| 44 | +### Other distributions |
| 45 | + |
| 46 | +A pre-compiled GROMACS distribution using OpenCL acceleration is available from [BioConda](https://anaconda.org/bioconda/gromacs). |
| 47 | + |
| 48 | +The corresponding [BioContainers](https://quay.io/repository/biocontainers/gromacs?tab=tags) Docker image can be used instead of this image, but that will not be able to provide GPU acceleration without additional binding of OpenCL folders. |
| 49 | + |
| 50 | +Debian/Ubuntu [include GROMACS](https://packages.ubuntu.com/search?keywords=gromacs) with variants for different hardware, but these may not be the latest version. |
| 51 | + |
| 52 | +In many cases compiling GROMACS from [source code](http://manual.gromacs.org/current/download) for your particular OS/hardware will provide additional performance gains. See the [installation guide](http://manual.gromacs.org/current/install-guide/index.html) for details. |
9 | 53 |
|
10 |
| -```shell |
11 |
| -nvidia-docker build -t gromacs . |
12 |
| -``` |
13 |
| - |
14 | 54 | ## License
|
15 | 55 |
|
16 | 56 | GROMACS is free software, distributed under the [GNU Lesser General
|
17 |
| -Public License (LGPL) Version 2.1]() or (at your option) any later |
18 |
| -version. |
| 57 | +Public License (LGPL) Version 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) or (at your option) any later version. See [COPYING](COPYING) for details. |
| 58 | + |
| 59 | +This Docker image is based on the image [nvidia/cuda](https://hub.docker.com/r/nvidia/cuda) that includes the [CUDA](http://docs.nvidia.com/cuda) runtime by NVIDIA. By downloading these images, you agree to the terms of the [license agreements](http://docs.nvidia.com/cuda/eula/index.html) for the included NVIDIA software. |
| 60 | + |
| 61 | +Other open source dependencies include: |
| 62 | + |
| 63 | +* [fftw](http://www.fftw.org/) [GPL 2.0 or later](https://github.com/FFTW/fftw3/blob/master/COPYING) |
| 64 | +* [libgomp1](https://packages.ubuntu.com/xenial/libgomp1) |
| 65 | +* [openmpi](https://packages.ubuntu.com/xenial/openmpi-bin) |
| 66 | +* [python](https://packages.ubuntu.com/xenial/python/) |
| 67 | + |
| 68 | +## Contribute |
| 69 | + |
| 70 | +Contributions welcome! |
| 71 | + |
| 72 | +The source code for GROMACS is available from http://manual.gromacs.org/current/download and is maintained at https://github.com/gromacs/gromacs |
| 73 | + |
| 74 | +The `Dockerfile` that made this container image is maintained at https://github.com/bioexcel/gromacs-docker |
| 75 | +Please submit any pull request to the `dev` branch as the `master` branch correspond to the `latest` Docker tag. |
| 76 | + |
| 77 | + |
| 78 | +## Contact us |
19 | 79 |
|
20 |
| -See [COPYING](COPYING) for details. |
| 80 | +Subscribe to the [GROMACS mailing list](http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List) for any questions. |
0 commit comments