diff --git a/src/sisl/io/vasp/stdout.py b/src/sisl/io/vasp/stdout.py index c0f0e3759e..1ccdb27af8 100644 --- a/src/sisl/io/vasp/stdout.py +++ b/src/sisl/io/vasp/stdout.py @@ -14,27 +14,22 @@ __all__ = ["stdoutSileVASP", "outSileVASP"] +_A = SileVASP.InfoAttr + + @set_module("sisl.io.vasp") class stdoutSileVASP(SileVASP): """ Output file from VASP """ - def _setup(self, *args, **kwargs): - """ Ensure the class has a _completed tag """ - super()._setup(*args, **kwargs) - self._completed = None + _info_attributes_ = [ + _A("completed", r".*General timing and accounting", + lambda attr, match: lambda : True, default=lambda : False), + ] - def readline(self, *args, **kwargs): - line = super().readline(*args, **kwargs) - if "General timing and accounting" in line: - self._completed = True - return line - - @sile_fh_open() + @deprecation("stdoutSileVASP.completed is deprecated in favor of stdoutSileVASP.info.completed", "0.16.0") def completed(self): """ True if the line "General timing and accounting" was found. """ - if self._completed is not True: - self._completed = self.step_to("General timing and accounting")[0] - return self._completed + return self.info.completed() @sile_fh_open() def cpu_time(self, flag="General timing and accounting"):