|Gromacs| 2021.5 release notes
------------------------------

This version was released on January 14th, 2022. These release notes
document the changes that have taken place in |Gromacs| since the
previous 2021.4 version, to fix known issues. It also incorporates all
fixes made in version 2020.6 and earlier, which you can find described
in the :ref:`release-notes`.

.. Note to developers!
   Please use """"""" to underline the individual entries for fixed issues in the subfolders,
   otherwise the formatting on the webpage is messed up.
   Also, please use the syntax :issue:`number` to reference issues on GitLab, without
   a space between the colon and number!

Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Do not scale coordinates of frozen atoms during Parrinello-Rahman pressure coupling
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

When Parrinello-Rahman pressure coupling was used, the box scaling was applied to all the atoms,
causing frozen atoms to shift. The effect is more drastic towards the sides of the box and when the
pressure is changed significantly during the simulations. Now, the frozen atoms will be ignored by
the coupling and atoms with frozen dimensions shall keep such values.

:issue:`3075`

Properly account for DeltaH contribution from PME when running AWH with FEP
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The linear dHdL contribution from PME, when PME was calculated on GPU or on a separate PME
rank, was calculated too late to be taken into account for FEP steered by AWH.
Please verify your simulation results from simulations running FEP steered by AWH
with PME on GPU or using a separate PME rank.

:issue:`4294`

Fix reading of AWH user PMF reading with large PMF values
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
The reading of user supplied AWH input in mdrun with PMF values larger than
88 kT would cause mdrun to exit with an assertion failure. Now values up to
700 kT are allowed and exceeding those causes an exit with a clear error message.

:issue:`4299`

Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^

``gmx make_edi`` now closes its output file properly
""""""""""""""""""""""""""""""""""""""""""""""""""""

Previously the file was not closed explicitly, leaving the result up
to the runtime environment. Now it will work with all environments.

Out-of-bounds, overflow and incorrect outputs fixes in ``gmx spatial``
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

There were several issues with memory management in ``gmx spatial``, which were addressed:
1. Out-of-bound memory writes.
2. Confusing error message when the coordinate is exactly on the boundary (happens with .xtc files).
3. Norm could become negative due to integer overflow.
4. Having negative ``-ign`` (default ``-1``) led to incorrect number of grid points
5. The coordinates of the grid points were incorrect especially when ``-ign`` is non-zero.
6. Norm calculation was incorrect.
7. Default ``-nab`` value is increased from 4 to 16.

:issue:`3214`

Fixes that affect portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Miscellaneous
^^^^^^^^^^^^^
Performance improvements when running on Ampere-class Nvidia GPUs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Improved performance of the short-ranged non-bonded kernels by up to 12%.

:issue:`3873`

