diff --git a/oommfc/drivers/mindriver.py b/oommfc/drivers/mindriver.py index 8745f2c..3e2b21d 100644 --- a/oommfc/drivers/mindriver.py +++ b/oommfc/drivers/mindriver.py @@ -58,11 +58,12 @@ class MinDriver(Driver): def _checkargs(self, **kwargs): pass # no kwargs should be checked + def check_system(self, system): """Checks the system has energy in it""" - if len(system.energy)==0: + if len(system.energy) == 0: raise AttributeError("System's energy is not defined") - + @property def _x(self): return "iteration" diff --git a/oommfc/drivers/timedriver.py b/oommfc/drivers/timedriver.py index d55f680..f0c819a 100644 --- a/oommfc/drivers/timedriver.py +++ b/oommfc/drivers/timedriver.py @@ -66,13 +66,14 @@ def _checkargs(self, **kwargs): if n <= 0: msg = f"Cannot drive with {n=}." raise ValueError(msg) + def check_system(self, system): """Checks the system has dynamics in it""" - if len(system.dynamics)==0: + if len(system.dynamics) == 0: raise AttributeError("System's dynamics is not defined") - if len(system.energy)==0: + if len(system.energy) == 0: raise AttributeError("System's energy is not defined") - + @property def _x(self): return "t"