Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 6, 2024
1 parent d0cc5f9 commit 35e0d83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dpdata/plugins/abacus.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
@Format.register("stru")
class AbacusSTRUFormat(Format):
def from_system(self, file_name, **kwargs):
data = dpdata.abacus.scf.get_frame(file_name)
data = dpdata.abacus.scf.get_frame_from_stru(file_name)
register_mag_data(data)
return dpdata.abacus.scf.get_frame_from_stru(file_name)
return data

def to_system(self, data, file_name: FileType, frame_idx=0, **kwargs):
"""Dump the system into ABACUS STRU format file.
Expand Down
10 changes: 5 additions & 5 deletions tests/abacus.scf/stru_test
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Cartesian # Cartesian(Unit is LATTICE_CONSTANT)
C
0.0
1
5.192682633809 4.557725978258 4.436846615358 1 1 1
5.192682633809 4.557725978258 4.436846615358 1 1 1 mag 0.000000000000 0.000000000000 0.000000000000
H
0.0
4
5.416431453540 4.011298860305 3.511161492417 0 0 0
4.131588222365 4.706745191323 4.431136645083 1 0 1
5.630930319126 5.521640894956 4.450356541303 1 0 1
5.499851012568 4.003388899277 5.342621842622 0 1 1
5.416431453540 4.011298860305 3.511161492417 0 0 0 mag 0.000000000000 0.000000000000 0.000000000000
4.131588222365 4.706745191323 4.431136645083 1 0 1 mag 0.000000000000 0.000000000000 0.000000000000
5.630930319126 5.521640894956 4.450356541303 1 0 1 mag 0.000000000000 0.000000000000 0.000000000000
5.499851012568 4.003388899277 5.342621842622 0 1 1 mag 0.000000000000 0.000000000000 0.000000000000

0 comments on commit 35e0d83

Please sign in to comment.