Skip to content

Commit

Permalink
opt code
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel-Jia committed Oct 29, 2024
1 parent 461a4ed commit dec6350
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dpdata/plugins/abacus.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def register_mag_data(data):
deepmd_name="force_mag",
)
dpdata.LabeledSystem.register_data_type(dt)


def register_move_data(data):
if "move" in data:
dt = DataType(
"move",
Expand All @@ -84,6 +87,7 @@ class AbacusSCFFormat(Format):
def from_labeled_system(self, file_name, **kwargs):
data = dpdata.abacus.scf.get_frame(file_name)
register_mag_data(data)
register_move_data(data)
return data


Expand All @@ -95,6 +99,7 @@ class AbacusMDFormat(Format):
def from_labeled_system(self, file_name, **kwargs):
data = dpdata.abacus.md.get_frame(file_name)
register_mag_data(data)
register_move_data(data)
return data


Expand All @@ -106,4 +111,5 @@ class AbacusRelaxFormat(Format):
def from_labeled_system(self, file_name, **kwargs):
data = dpdata.abacus.relax.get_frame(file_name)
register_mag_data(data)
register_move_data(data)
return data

0 comments on commit dec6350

Please sign in to comment.