Skip to content

Commit

Permalink
filter the warning for save free energy data (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiki-tempula authored Apr 18, 2024
1 parent 70f309c commit 6778413
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions python/BioSimSpace/Sandpit/Exscientia/Process/_amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -2951,7 +2951,15 @@ def saveMetric(
f"{self.workDir()}/{self._name}.out",
T=self._protocol.getTemperature() / _Units.Temperature.kelvin,
)
if "u_nk" in energy and energy["u_nk"] is not None:
energy["u_nk"].to_parquet(path=f"{self.workDir()}/{u_nk}", index=True)
if "dHdl" in energy and energy["dHdl"] is not None:
energy["dHdl"].to_parquet(path=f"{self.workDir()}/{dHdl}", index=True)
with _warnings.catch_warnings():
_warnings.filterwarnings(
"ignore", message="The DataFrame has column names of mixed type."
)
if "u_nk" in energy and energy["u_nk"] is not None:
energy["u_nk"].to_parquet(
path=f"{self.workDir()}/{u_nk}", index=True
)
if "dHdl" in energy and energy["dHdl"] is not None:
energy["dHdl"].to_parquet(
path=f"{self.workDir()}/{dHdl}", index=True
)
16 changes: 12 additions & 4 deletions python/BioSimSpace/Sandpit/Exscientia/Process/_gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2898,10 +2898,18 @@ def saveMetric(
f"{self.workDir()}/{self._name}.xvg",
T=self._protocol.getTemperature() / _Units.Temperature.kelvin,
)
if "u_nk" in energy:
energy["u_nk"].to_parquet(path=f"{self.workDir()}/{u_nk}", index=True)
if "dHdl" in energy:
energy["dHdl"].to_parquet(path=f"{self.workDir()}/{dHdl}", index=True)
with _warnings.catch_warnings():
_warnings.filterwarnings(
"ignore", message="The DataFrame has column names of mixed type."
)
if "u_nk" in energy:
energy["u_nk"].to_parquet(
path=f"{self.workDir()}/{u_nk}", index=True
)
if "dHdl" in energy:
energy["dHdl"].to_parquet(
path=f"{self.workDir()}/{dHdl}", index=True
)


def _is_minimisation(config):
Expand Down

0 comments on commit 6778413

Please sign in to comment.