From f4e9cd4422348014dd82ebb2fe7fedfa7694201c Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 3 Dec 2025 18:58:23 +0000 Subject: [PATCH 1/2] Update GROMACS NPT config to match sandpit. [closes #484] --- python/BioSimSpace/_Config/_gromacs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/BioSimSpace/_Config/_gromacs.py b/python/BioSimSpace/_Config/_gromacs.py index 78f572ef..c74889fa 100644 --- a/python/BioSimSpace/_Config/_gromacs.py +++ b/python/BioSimSpace/_Config/_gromacs.py @@ -186,8 +186,11 @@ def createConfig(self, version=None, extra_options={}, extra_lines=[]): protocol_dict["pcoupl"] = "c-rescale" else: protocol_dict["pcoupl"] = "berendsen" - # 1ps time constant for pressure coupling. - protocol_dict["tau-p"] = 1 + # Do the MC move every 100 steps to be the same as AMBER. + protocol_dict["nstpcouple"] = 100 + # 4ps time constant for pressure coupling. The tau-p has to be + # 10 times larger than nstpcouple * dt (4 fs) + protocol_dict["tau-p"] = 4 # Pressure in bar. protocol_dict["ref-p"] = ( f"{self._protocol.getPressure().bar().value():.5f}" From e3add889df85247aaa0767abb1ccd3bbe65367b2 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 3 Dec 2025 19:46:57 +0000 Subject: [PATCH 2/2] Correctly scale tau-p according to dt and nstpcouple. --- python/BioSimSpace/Sandpit/Exscientia/Protocol/_config.py | 5 ++--- python/BioSimSpace/_Config/_gromacs.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/python/BioSimSpace/Sandpit/Exscientia/Protocol/_config.py b/python/BioSimSpace/Sandpit/Exscientia/Protocol/_config.py index 0bf0b7f4..7d3800d7 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/Protocol/_config.py +++ b/python/BioSimSpace/Sandpit/Exscientia/Protocol/_config.py @@ -535,9 +535,8 @@ def generateGromacsConfig( protocol_dict["pcoupl"] = "Berendsen" # Berendsen barostat. # Do the MC move every 100 steps to be the same as AMBER. protocol_dict["nstpcouple"] = 100 - # 4ps time constant for pressure coupling. - # As the tau-p has to be 10 times larger than nstpcouple * dt (4 fs) - protocol_dict["tau-p"] = 4 + # 25 times larger than nstpcouple * dt. + protocol_dict["tau-p"] = 2500 * timestep protocol_dict["ref-p"] = ( f"{self.protocol.getPressure().bar().value():.5f}" # Pressure in bar. ) diff --git a/python/BioSimSpace/_Config/_gromacs.py b/python/BioSimSpace/_Config/_gromacs.py index c74889fa..e158e5fb 100644 --- a/python/BioSimSpace/_Config/_gromacs.py +++ b/python/BioSimSpace/_Config/_gromacs.py @@ -188,9 +188,8 @@ def createConfig(self, version=None, extra_options={}, extra_lines=[]): protocol_dict["pcoupl"] = "berendsen" # Do the MC move every 100 steps to be the same as AMBER. protocol_dict["nstpcouple"] = 100 - # 4ps time constant for pressure coupling. The tau-p has to be - # 10 times larger than nstpcouple * dt (4 fs) - protocol_dict["tau-p"] = 4 + # 25 times larger than nstpcouple * dt. + protocol_dict["tau-p"] = 2500 * timestep # Pressure in bar. protocol_dict["ref-p"] = ( f"{self._protocol.getPressure().bar().value():.5f}"