Skip to content

Commit

Permalink
Clean up before exiting plumed
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Oct 21, 2024
1 parent f6904b8 commit 65c8670
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ipi/engine/forcefields.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,12 @@ def __init__(
self.masses = dstrip(myatoms.m)
self.lastq = np.zeros(3 * self.natoms)
self.system_force = None # reference to physical force calculator
softexit.register_function(self.softexit)

def softexit(self):
"""Takes care of cleaning up upon softexit"""

self.plumed.finalize()

def evaluate(self, r):
"""A wrapper function to call the PLUMED evaluation routines
Expand Down

0 comments on commit 65c8670

Please sign in to comment.