Skip to content
Prev Previous commit
Update openpathsampling/engines/external_engine.py
Co-authored-by: sroet <sanderroet@hotmail.com>
  • Loading branch information
dwhswenson and sroet authored Oct 14, 2020
commit 0cb85b20ac72120bf0cfb6cad924808f243e099c
11 changes: 2 additions & 9 deletions openpathsampling/engines/external_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,10 @@ def __init__(self, engine):
descriptor=descriptor)

def to_dict(self):
dct = super(_InternalizedEngineProxy, self).to_dict()
dct['engine'] = self.engine
# We only need the engine to load again
dct = {'engine': self.engine}
return dct

@classmethod
def from_dict(cls, dct):
# ignore everything except the engine here
dct = {'engine': dct['engine']}
return super(_InternalizedEngineProxy, cls).from_dict(dct)

@property
def name(self):
return self.engine.name + " (internalized)"
Expand Down Expand Up @@ -321,4 +315,3 @@ def engine_command(self):
"""Generates a string for the command to run the engine."""
raise NotImplementedError()