Gromacs
- class Gromacs(data_dir: Path, output_dir: Path)[source]
Bases:
objectRuns GROMACS commands in a docker container.
Note you have to create a docker image of gromacs/gromacs. If you are running windows you need to install Docker Desktop first https://www.docker.com/products/docker-desktop/
You then download the DOCKERFILE details for GROMACS by typing the following commands in a terminal to use the canonical Gromacs container:
git clone https://github.com/bioexcel/gromacs-docker
And then build the image by typing: cd gromacs-docker docker build .
subsequent calls to “docker run –rm -it gromacs/gromacs” will use the image you just built and give you an interactive terminal, and delete the container when you exit.
- run_simulation(mdp_file: str, gro_file: str, top_file: str, tpr_file: str, block: bool = True)[source]
Runs a GROMACS simulation using the given mdp, gro, and top files.
- Parameters:
mdp_file (str) – the name of the parameter file
gro_file (str) – the name of the molecular structure file
top_file (str) – the name of the topology file
tpr_file (str) – the name of the portable binary run input file
block (bool, optional) – if True, then wait until the simulation has finished, otherwise run in the background, defaults to True