Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 20, 2023
1 parent 03cc010 commit 621d686
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dpdata/plugins/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
from dpdata.cp2k.output import Cp2kSystems
from dpdata.format import Format


string_warning = """
Hi, you got an error from dpdata,
Hi, you got an error from dpdata,
please check if your cp2k files include full information,
otherwise its version is not supported by dpdata.
Try use dpdata plugin from cp2kdata package,
for details, please refer to
https://robinzyb.github.io/cp2kdata/
"""


@Format.register("cp2k/aimd_output")
class CP2KAIMDOutputFormat(Format):
def from_labeled_system(self, file_name, restart=False, **kwargs):
try:
xyz_file = sorted(glob.glob(f"{file_name}/*pos*.xyz"))[0]
log_file = sorted(glob.glob(f"{file_name}/*.log"))[0]
return tuple(Cp2kSystems(log_file, xyz_file, restart))
except :
except:
raise PendingDeprecationWarning(string_warning)


Expand All @@ -45,4 +45,3 @@ def from_labeled_system(self, file_name, restart=False, **kwargs):
return data
except:
raise PendingDeprecationWarning(string_warning)

0 comments on commit 621d686

Please sign in to comment.