This repository contains implementations of the stochastic cell rescaling algorithm for GROMACS. Notice that the isotropic and semi-isotropic versions are included in the official GROMACS repository starting with GROMACS 2021. This means that, if you need one of these two algorithms and are using GROMACS >= v2021, there is no need to apply any patch. If you instead want to test the the anisotropic version, we provide a patch for GROMACS v2021.
The simplest way to include the implementation in your GROMACS copy is to run the following script in the gromacs root before compiling gromacs:
bash <(curl -s https://raw.githubusercontent.com/bussilab/crescale-gromacs/readme/patch-v2021.3)
Please replace v2021.3
with the exact version you are using. If you see an error such as
line 1: 400:: command not found
it means that this specific version is not supported. Please check below which gromacs versions are supported.
More info can be found in this repository.
Here we host the GROMACS implementation of the algorithm. This is a dummy branch that just contains this readme file. Several branches and tags can be found with the actual code:
- Tag v2019.4-crescale is the version used in this paper and is based on GROMACS 2019.4.1
- Tag v2019.6-crescale integrates GROMACS updates up to 2019.6.
- Tag v2020.2-crescale is based on GROMACS 2020.2.
- Tag v2020.3-crescale is based on GROMACS 2020.3.
- Tag v2020.6-crescale is based on GROMACS 2020.6.
- Tag v2021.2-crescale-anistropic is based on GROMACS 2021.2 and includes the anisotropic version of the barostat.
- Tag v2021.3-crescale-anistropic is based on GROMACS 2021.3 and includes the anisotropic version of the barostat.
- Branches release-2019, release-2020, release-2021, and master are in sync with the official GROMACS repository.
- Branch release-2019-crescale is based on branch release-2019.
- Branch release-2020-crescale is based on branch release-2020.
- Branch release-2021-crescale-anisotropic is based on branch release-2021 and includes the anisotropic version of the barostat.
- Branch master-crescale is based on branch master.
The changes in version 2019 are relatively small. The added code is basically a copy of the Berendsen code, with some modification. The changes in version 2020 are slighly more complicated since in this version the coordinate update might be done on the GPU only. In this case, it was necessary to add a function to allow scaling of the velocities to be performed on the GPU. Changes on master branch are similar and just required some adjustment to be compatible with master branch.
The anisotropic version of the barostat has been implemented for GROMACS 2021. The differences with respect to the already included isotropic version can be seen here. Important changes include: (a) the anisotropic barostat calculation (b), the addition of new input parameters for the deviatoric stress (c), the implementation of a transpose scaling matrix for velocities and (d) Gram-Schmidt rotation to align cell after it has been deformed.
1 There's a bug in the matrix inversion hard coded at these lines. The bug is harmless, since only diagonal terms are used in currently available schemes (anisotropic variant is not implemented). All the other tags and branches listed in this page use the gromacs routine to invert box matrices instead, which is correct.