From 90855ee53c6b9da9db0e0421da5044371c1ecd5b Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 5 Feb 2024 12:21:25 +0000 Subject: [PATCH 1/7] Add _generate_binary_run_file staticmethod. --- python/BioSimSpace/FreeEnergy/_relative.py | 23 +-- python/BioSimSpace/Process/_gromacs.py | 152 ++++++++++++++--- .../FreeEnergy/_alchemical_free_energy.py | 21 +-- .../Sandpit/Exscientia/Process/_gromacs.py | 154 +++++++++++++++--- 4 files changed, 269 insertions(+), 81 deletions(-) diff --git a/python/BioSimSpace/FreeEnergy/_relative.py b/python/BioSimSpace/FreeEnergy/_relative.py index 7c09f5169..44d7375d9 100644 --- a/python/BioSimSpace/FreeEnergy/_relative.py +++ b/python/BioSimSpace/FreeEnergy/_relative.py @@ -2060,9 +2060,7 @@ def _initialise_runner(self, system): extra_lines=self._extra_lines, property_map=self._property_map, ) - if self._setup_only: - del first_process - else: + if not self._setup_only: processes.append(first_process) # Loop over the rest of the lambda values. @@ -2139,30 +2137,19 @@ def _initialise_runner(self, system): f.write(line) mdp = new_dir + "/gromacs.mdp" - mdp_out = new_dir + "/gromacs.out.mdp" gro = new_dir + "/gromacs.gro" top = new_dir + "/gromacs.top" tpr = new_dir + "/gromacs.tpr" # Use grompp to generate the portable binary run input file. - command = "%s grompp -f %s -po %s -c %s -p %s -r %s -o %s" % ( - _gmx_exe, + first_process._generate_binary_run_file( mdp, - mdp_out, gro, top, - gro, tpr, - ) - - # Run the command. If this worked for the first lambda value, - # then it should work for all others. - proc = _subprocess.run( - _Utils.command_split(command), - shell=False, - text=True, - stdout=_subprocess.PIPE, - stderr=_subprocess.PIPE, + first_process._exe, + ignore_warnings=self._ignore_warnings, + show_errors=self._show_errors, ) # Create a copy of the process and update the working diff --git a/python/BioSimSpace/Process/_gromacs.py b/python/BioSimSpace/Process/_gromacs.py index 87b6bbdba..3e9bec127 100644 --- a/python/BioSimSpace/Process/_gromacs.py +++ b/python/BioSimSpace/Process/_gromacs.py @@ -421,40 +421,119 @@ def _generate_args(self): if isinstance(self._protocol, (_Protocol.Metadynamics, _Protocol.Steering)): self.setArg("-plumed", "plumed.dat") - def _generate_binary_run_file(self): - """Use grommp to generate the binary run input file.""" + @staticmethod + def _generate_binary_run_file( + mdp_file, + gro_file, + top_file, + tpr_file, + exe, + checkpoint_file=None, + ignore_warnings=False, + show_errors=True, + ): + """ + Use grommp to generate the binary run input file. + + Parameters + ---------- + + mdp_file : str + The path to the input mdp file. + + gro_file : str + The path to the input coordinate file. + + top_file : str + The path to the input topology file. + + tpr_file : str + The path to the output binary run file. + + exe : str + The path to the GROMACS executable. + + checkpoint_file : str + The path to a checkpoint file from a previous run. This can be used + to continue an existing simulation. Currently we only support the + use of checkpoint files for Equilibration protocols. + + ignore_warnings : bool + Whether to ignore warnings when generating the binary run file + with 'gmx grompp'. By default, these warnings are elevated to + errors and will halt the program. + + show_errors : bool + Whether to show warning/error messages when generating the binary + run file. + """ + + if not isinstance(mdp_file, str): + raise ValueError("'mdp_file' must be of type 'str'.") + if not _os.path.isfile(mdp_file): + raise IOError(f"'mdp_file' doesn't exist: '{mdp_file}'") + + if not isinstance(gro_file, str): + raise ValueError("'gro_file' must be of type 'str'.") + if not _os.path.isfile(gro_file): + raise IOError(f"'gro_file' doesn't exist: '{gro_file}'") + + if not isinstance(top_file, str): + raise ValueError("'top_file' must be of type 'str'.") + if not _os.path.isfile(top_file): + raise IOError(f"'top_file' doesn't exist: '{top_file}'") + + if not isinstance(tpr_file, str): + raise ValueError("'tpr_file' must be of type 'str'.") + + if not isinstance(exe, str): + raise ValueError("'exe' must be of type 'str'.") + if not _os.path.isfile(exe): + raise IOError(f"'exe' doesn't exist: '{exe}'") + + if checkpoint_file is not None: + if not isinstance(checkpoint_file, str): + raise ValueError("'checkpoint_file' must be of type 'str'.") + if not _os.path.isfile(checkpoint_file): + raise IOError(f"'checkpoint_file' doesn't exist: '{checkpoint_file}'") + + if not isinstance(ignore_warnings, bool): + raise ValueError("'ignore_warnings' must be of type 'bool'") + + if not isinstance(show_errors, bool): + raise ValueError("'show_errors' must be of type 'bool'") # Create the name of the output mdp file. mdp_out = ( - _os.path.dirname(self._config_file) - + "/%s.out.mdp" % _os.path.basename(self._config_file).split(".")[0] + _os.path.dirname(mdp_file) + + "/%s.out.mdp" % _os.path.basename(mdp_file).split(".")[0] ) # Use grompp to generate the portable binary run input file. - if self._checkpoint_file is not None: + if checkpoint_file is not None: command = "%s grompp -f %s -po %s -c %s -p %s -r %s -t %s -o %s" % ( - self._exe, - self._config_file, + exe, + mdp_file, mdp_out, - self._gro_file, - self._top_file, - self._gro_file, - self._checkpoint_file, - self._tpr_file, + gro_file, + top_file, + gro_file, + checkpoint_file, + tpr_file, ) else: command = "%s grompp -f %s -po %s -c %s -p %s -r %s -o %s" % ( - self._exe, - self._config_file, + exe, + mdp_file, mdp_out, - self._gro_file, - self._top_file, - self._gro_file, - self._tpr_file, + gro_file, + top_file, + gro_file, + tpr_file, ) # Warnings don't trigger an error. - if self._ignore_warnings: + if ignore_warnings: command += " --maxwarn 9999" # Run the command. @@ -469,7 +548,7 @@ def _generate_binary_run_file(self): # Check that grompp ran successfully. if proc.returncode != 0: # Handle errors and warnings. - if self._show_errors: + if show_errors: # Capture errors and warnings from the grompp output. errors = [] warnings = [] @@ -531,14 +610,32 @@ def addToConfig(self, config): super().addToConfig(config) # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + self._checkpoint_file, + self._ignore_warnings, + self._show_errors, + ) def resetConfig(self): """Reset the configuration parameters.""" self._generate_config() # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + self._checkpoint_file, + self._ignore_warnings, + self._show_errors, + ) def setConfig(self, config): """ @@ -556,7 +653,16 @@ def setConfig(self, config): super().setConfig(config) # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + self._checkpoint_file, + self._ignore_warnings, + self._show_errors, + ) def start(self): """ diff --git a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py index 0173acab4..9a2f9f63a 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py +++ b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py @@ -1373,7 +1373,7 @@ def _initialise_runner(self, system): extra_lines=self._extra_lines, ) - if self._setup_only: + if self._setup_only and not self._engine == "GROMACS": del first_process else: processes.append(first_process) @@ -1462,30 +1462,19 @@ def _initialise_runner(self, system): f.write(line) mdp = new_dir + "/gromacs.mdp" - mdp_out = new_dir + "/gromacs.out.mdp" gro = new_dir + "/gromacs.gro" top = new_dir + "/gromacs.top" tpr = new_dir + "/gromacs.tpr" # Use grompp to generate the portable binary run input file. - command = "%s grompp -f %s -po %s -c %s -p %s -r %s -o %s" % ( - self._exe, + first_process._generate_binary_run_file( mdp, - mdp_out, gro, top, - gro, tpr, - ) - - # Run the command. If this worked for the first lambda value, - # then it should work for all others. - proc = _subprocess.run( - _Utils.command_split(command), - shell=False, - text=True, - stdout=_subprocess.PIPE, - stderr=_subprocess.PIPE, + first_process._exe, + ignore_warnings=self._ignore_warnings, + show_errors=self._show_errors, ) # Create a copy of the process and update the working diff --git a/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py b/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py index 097f3074f..9be77cd62 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py +++ b/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py @@ -512,40 +512,119 @@ def _generate_args(self): if isinstance(self._protocol, (_Protocol.Metadynamics, _Protocol.Steering)): self.setArg("-plumed", "plumed.dat") - def _generate_binary_run_file(self): - """Use grommp to generate the binary run input file.""" + @staticmethod + def _generate_binary_run_file( + mdp_file, + gro_file, + top_file, + tpr_file, + exe, + checkpoint_file=None, + ignore_warnings=False, + show_errors=True, + ): + """ + Use grommp to generate the binary run input file. + + Parameters + ---------- + + mdp_file : str + The path to the input mdp file. + + gro_file : str + The path to the input coordinate file. + + top_file : str + The path to the input topology file. + + tpr_file : str + The path to the output binary run file. + + exe : str + The path to the GROMACS executable. + + checkpoint_file : str + The path to a checkpoint file from a previous run. This can be used + to continue an existing simulation. Currently we only support the + use of checkpoint files for Equilibration protocols. + + ignore_warnings : bool + Whether to ignore warnings when generating the binary run file + with 'gmx grompp'. By default, these warnings are elevated to + errors and will halt the program. + + show_errors : bool + Whether to show warning/error messages when generating the binary + run file. + """ + + if not isinstance(mdp_file, str): + raise ValueError("'mdp_file' must be of type 'str'.") + if not _os.path.isfile(mdp_file): + raise IOError(f"'mdp_file' doesn't exist: '{mdp_file}'") + + if not isinstance(gro_file, str): + raise ValueError("'gro_file' must be of type 'str'.") + if not _os.path.isfile(gro_file): + raise IOError(f"'gro_file' doesn't exist: '{gro_file}'") + + if not isinstance(top_file, str): + raise ValueError("'top_file' must be of type 'str'.") + if not _os.path.isfile(top_file): + raise IOError(f"'top_file' doesn't exist: '{top_file}'") + + if not isinstance(tpr_file, str): + raise ValueError("'tpr_file' must be of type 'str'.") + + if not isinstance(exe, str): + raise ValueError("'exe' must be of type 'str'.") + if not _os.path.isfile(exe): + raise IOError(f"'exe' doesn't exist: '{exe}'") + + if checkpoint_file is not None: + if not isinstance(checkpoint_file, str): + raise ValueError("'checkpoint_file' must be of type 'str'.") + if not _os.path.isfile(checkpoint_file): + raise IOError(f"'checkpoint_file' doesn't exist: '{checkpoint_file}'") + + if not isinstance(ignore_warnings, bool): + raise ValueError("'ignore_warnings' must be of type 'bool'") + + if not isinstance(show_errors, bool): + raise ValueError("'show_errors' must be of type 'bool'") # Create the name of the output mdp file. mdp_out = ( - _os.path.dirname(self._config_file) - + "/%s.out.mdp" % _os.path.basename(self._config_file).split(".")[0] + _os.path.dirname(mdp_file) + + "/%s.out.mdp" % _os.path.basename(mdp_file).split(".")[0] ) # Use grompp to generate the portable binary run input file. - if self._checkpoint_file is not None: + if checkpoint_file is not None: command = "%s grompp -f %s -po %s -c %s -p %s -r %s -t %s -o %s" % ( - self._exe, - self._config_file, + exe, + mdp_file, mdp_out, - self._gro_file, - self._top_file, - self._ref_file, - self._checkpoint_file, - self._tpr_file, + gro_file, + top_file, + gro_file, + checkpoint_file, + tpr_file, ) else: command = "%s grompp -f %s -po %s -c %s -p %s -r %s -o %s" % ( - self._exe, - self._config_file, + exe, + mdp_file, mdp_out, - self._gro_file, - self._top_file, - self._ref_file, - self._tpr_file, + gro_file, + top_file, + gro_file, + tpr_file, ) - # Warnings don't trigger an error. Set to a suitably large number. - if self._ignore_warnings: + # Warnings don't trigger an error. + if ignore_warnings: command += " --maxwarn 9999" # Run the command. @@ -560,7 +639,7 @@ def _generate_binary_run_file(self): # Check that grompp ran successfully. if proc.returncode != 0: # Handle errors and warnings. - if self._show_errors: + if show_errors: # Capture errors and warnings from the grompp output. errors = [] warnings = [] @@ -622,14 +701,32 @@ def addToConfig(self, config): super().addToConfig(config) # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + checkpoint_file=self._checkpoint_file, + ignore_warnings=self._ignore_warnings, + show_errors=self._show_errors, + ) def resetConfig(self): """Reset the configuration parameters.""" self._generate_config() # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + checkpoint_file=self._checkpoint_file, + ignore_warnings=self._ignore_warnings, + show_errors=self._show_errors, + ) def setConfig(self, config): """ @@ -647,7 +744,16 @@ def setConfig(self, config): super().setConfig(config) # Use grompp to generate the portable binary run input file. - self._generate_binary_run_file() + self._generate_binary_run_file( + self._config_file, + self._gro_file, + self._top_file, + self._tpr_file, + self._exe, + checkpoint_file=self._checkpoint_file, + ignore_warnings=self._ignore_warnings, + show_errors=self._show_errors, + ) def start(self): """ From ddc5785affd121c72c971307ec9e9a39499686d2 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 5 Feb 2024 15:36:00 +0000 Subject: [PATCH 2/7] Allow use of a separate file as a reference for position restraints. --- python/BioSimSpace/FreeEnergy/_relative.py | 1 + python/BioSimSpace/Process/_gromacs.py | 17 +++++++++++++++-- .../FreeEnergy/_alchemical_free_energy.py | 1 + .../Sandpit/Exscientia/Process/_gromacs.py | 17 +++++++++++++++-- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/python/BioSimSpace/FreeEnergy/_relative.py b/python/BioSimSpace/FreeEnergy/_relative.py index 44d7375d9..3a5eddff2 100644 --- a/python/BioSimSpace/FreeEnergy/_relative.py +++ b/python/BioSimSpace/FreeEnergy/_relative.py @@ -2146,6 +2146,7 @@ def _initialise_runner(self, system): mdp, gro, top, + gro, tpr, first_process._exe, ignore_warnings=self._ignore_warnings, diff --git a/python/BioSimSpace/Process/_gromacs.py b/python/BioSimSpace/Process/_gromacs.py index 3e9bec127..3e8239ad5 100644 --- a/python/BioSimSpace/Process/_gromacs.py +++ b/python/BioSimSpace/Process/_gromacs.py @@ -426,6 +426,7 @@ def _generate_binary_run_file( mdp_file, gro_file, top_file, + ref_file, tpr_file, exe, checkpoint_file=None, @@ -447,6 +448,10 @@ def _generate_binary_run_file( top_file : str The path to the input topology file. + ref_file : str + The path to the input reference coordinate file to be used for + position restraints. + tpr_file : str The path to the output binary run file. @@ -483,6 +488,11 @@ def _generate_binary_run_file( if not _os.path.isfile(top_file): raise IOError(f"'top_file' doesn't exist: '{top_file}'") + if not isinstance(ref_file, str): + raise ValueError("'ref_file' must be of type 'str'.") + if not _os.path.isfile(ref_file): + raise IOError(f"'ref_file' doesn't exist: '{ref_file}'") + if not isinstance(tpr_file, str): raise ValueError("'tpr_file' must be of type 'str'.") @@ -517,7 +527,7 @@ def _generate_binary_run_file( mdp_out, gro_file, top_file, - gro_file, + ref_file, checkpoint_file, tpr_file, ) @@ -528,7 +538,7 @@ def _generate_binary_run_file( mdp_out, gro_file, top_file, - gro_file, + ref_file, tpr_file, ) @@ -614,6 +624,7 @@ def addToConfig(self, config): self._config_file, self._gro_file, self._top_file, + self._gro_file, self._tpr_file, self._exe, self._checkpoint_file, @@ -630,6 +641,7 @@ def resetConfig(self): self._config_file, self._gro_file, self._top_file, + self._gro_file, self._tpr_file, self._exe, self._checkpoint_file, @@ -657,6 +669,7 @@ def setConfig(self, config): self._config_file, self._gro_file, self._top_file, + self._gro_file, self._tpr_file, self._exe, self._checkpoint_file, diff --git a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py index 9a2f9f63a..afcce7eff 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py +++ b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py @@ -1471,6 +1471,7 @@ def _initialise_runner(self, system): mdp, gro, top, + gro, tpr, first_process._exe, ignore_warnings=self._ignore_warnings, diff --git a/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py b/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py index 9be77cd62..303a22764 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py +++ b/python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py @@ -517,6 +517,7 @@ def _generate_binary_run_file( mdp_file, gro_file, top_file, + ref_file, tpr_file, exe, checkpoint_file=None, @@ -538,6 +539,10 @@ def _generate_binary_run_file( top_file : str The path to the input topology file. + ref_file : str + The path to the input reference coordinate file to be used for + position restraints. + tpr_file : str The path to the output binary run file. @@ -574,6 +579,11 @@ def _generate_binary_run_file( if not _os.path.isfile(top_file): raise IOError(f"'top_file' doesn't exist: '{top_file}'") + if not isinstance(ref_file, str): + raise ValueError("'ref_file' must be of type 'str'.") + if not _os.path.isfile(ref_file): + raise IOError(f"'ref_file' doesn't exist: '{ref_file}'") + if not isinstance(tpr_file, str): raise ValueError("'tpr_file' must be of type 'str'.") @@ -608,7 +618,7 @@ def _generate_binary_run_file( mdp_out, gro_file, top_file, - gro_file, + ref_file, checkpoint_file, tpr_file, ) @@ -619,7 +629,7 @@ def _generate_binary_run_file( mdp_out, gro_file, top_file, - gro_file, + ref_file, tpr_file, ) @@ -705,6 +715,7 @@ def addToConfig(self, config): self._config_file, self._gro_file, self._top_file, + self._ref_file, self._tpr_file, self._exe, checkpoint_file=self._checkpoint_file, @@ -721,6 +732,7 @@ def resetConfig(self): self._config_file, self._gro_file, self._top_file, + self._ref_file, self._tpr_file, self._exe, checkpoint_file=self._checkpoint_file, @@ -748,6 +760,7 @@ def setConfig(self, config): self._config_file, self._gro_file, self._top_file, + self._ref_file, self._tpr_file, self._exe, checkpoint_file=self._checkpoint_file, From 62763b65c6f59612269f15bfdf71eebb0cf07687 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 5 Feb 2024 20:01:48 +0000 Subject: [PATCH 3/7] Run pytest-black against Python 3.11. --- recipes/biosimspace/template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/biosimspace/template.yaml b/recipes/biosimspace/template.yaml index 50b670ded..2ee59d5f8 100644 --- a/recipes/biosimspace/template.yaml +++ b/recipes/biosimspace/template.yaml @@ -27,8 +27,8 @@ test: - SIRE_SILENT_PHONEHOME requires: - pytest - - black 23 # [linux and x86_64 and py==39] - - pytest-black # [linux and x86_64 and py==39] + - black 23 # [linux and x86_64 and py==311] + - pytest-black # [linux and x86_64 and py==311] - ambertools # [linux and x86_64] - gromacs # [linux and x86_64] imports: From d18da44b775026df40ec7721484ad09a2e5b81a2 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 6 Feb 2024 09:42:45 +0000 Subject: [PATCH 4/7] Forgot to use selector for running pytest-black. --- recipes/biosimspace/template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/biosimspace/template.yaml b/recipes/biosimspace/template.yaml index 2ee59d5f8..1703158b3 100644 --- a/recipes/biosimspace/template.yaml +++ b/recipes/biosimspace/template.yaml @@ -37,7 +37,7 @@ test: - python/BioSimSpace # [linux and x86_64 and py==39] - tests commands: - - pytest -vvv --color=yes --black python/BioSimSpace # [linux and x86_64 and py==39] + - pytest -vvv --color=yes --black python/BioSimSpace # [linux and x86_64 and py==311] - pytest -vvv --color=yes --import-mode=importlib tests about: From 4998dd2029eb0de1391c67746e46efa92ab0ec84 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 6 Feb 2024 10:53:29 +0000 Subject: [PATCH 5/7] Also need to add source files to selector. --- recipes/biosimspace/template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/biosimspace/template.yaml b/recipes/biosimspace/template.yaml index 1703158b3..121765664 100644 --- a/recipes/biosimspace/template.yaml +++ b/recipes/biosimspace/template.yaml @@ -34,7 +34,7 @@ test: imports: - BioSimSpace source_files: - - python/BioSimSpace # [linux and x86_64 and py==39] + - python/BioSimSpace # [linux and x86_64 and py==311] - tests commands: - pytest -vvv --color=yes --black python/BioSimSpace # [linux and x86_64 and py==311] From 4175229453cdfc5e4715bd8577165da91d71d7bb Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 6 Feb 2024 12:28:39 +0000 Subject: [PATCH 6/7] Pin to pytest 7 until pytest-black is updated. --- recipes/biosimspace/template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/biosimspace/template.yaml b/recipes/biosimspace/template.yaml index 121765664..940f55cc1 100644 --- a/recipes/biosimspace/template.yaml +++ b/recipes/biosimspace/template.yaml @@ -26,7 +26,7 @@ test: - SIRE_DONT_PHONEHOME - SIRE_SILENT_PHONEHOME requires: - - pytest + - pytest <8 - black 23 # [linux and x86_64 and py==311] - pytest-black # [linux and x86_64 and py==311] - ambertools # [linux and x86_64] From b7944d11fe59c7fbd2754bda093ec83e9d8dc27f Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 7 Feb 2024 09:06:31 +0000 Subject: [PATCH 7/7] Call staticmethod on class, not instance. --- python/BioSimSpace/FreeEnergy/_relative.py | 2 +- .../Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/BioSimSpace/FreeEnergy/_relative.py b/python/BioSimSpace/FreeEnergy/_relative.py index 3a5eddff2..8db00c5a8 100644 --- a/python/BioSimSpace/FreeEnergy/_relative.py +++ b/python/BioSimSpace/FreeEnergy/_relative.py @@ -2142,7 +2142,7 @@ def _initialise_runner(self, system): tpr = new_dir + "/gromacs.tpr" # Use grompp to generate the portable binary run input file. - first_process._generate_binary_run_file( + _Process.Gromacs._generate_binary_run_file( mdp, gro, top, diff --git a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py index afcce7eff..104408902 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py +++ b/python/BioSimSpace/Sandpit/Exscientia/FreeEnergy/_alchemical_free_energy.py @@ -1467,7 +1467,7 @@ def _initialise_runner(self, system): tpr = new_dir + "/gromacs.tpr" # Use grompp to generate the portable binary run input file. - first_process._generate_binary_run_file( + _Process.Gromacs._generate_binary_run_file( mdp, gro, top,