Skip to content

Commit

Permalink
Avoid duplicate records for minimisation protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Mar 20, 2023
1 parent 457e70d commit ef978ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/BioSimSpace/Process/_amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,13 @@ def stdout(self, n=10):
# Split the line using whitespace.
data = line.upper().split()

# The file hasn't been updated.
if (
"NSTEP" in self._stdout_dict
and data[0] == self._stdout_dict["NSTEP"][-1]
):
return

# Add the timestep and energy records to the dictionary.
self._stdout_dict["NSTEP"] = data[0]
self._stdout_dict["ENERGY"] = data[1]
Expand Down
7 changes: 7 additions & 0 deletions python/BioSimSpace/Sandpit/Exscientia/Process/_amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,13 @@ def stdout(self, n=10):
# Split the line using whitespace.
data = line.upper().split()

# The file hasn't been updated.
if (
"NSTEP" in self._stdout_dict
and data[0] == self._stdout_dict["NSTEP"][-1]
):
return

# Add the timestep and energy records to the dictionary.
self._stdout_dict["NSTEP"] = data[0]
self._stdout_dict["ENERGY"] = data[1]
Expand Down

0 comments on commit ef978ea

Please sign in to comment.