From 35e0d833a3fe8db350a4de95a7a2fdca03d35921 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 6 Nov 2024 14:52:46 +0800 Subject: [PATCH] fix --- dpdata/plugins/abacus.py | 4 ++-- tests/abacus.scf/stru_test | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dpdata/plugins/abacus.py b/dpdata/plugins/abacus.py index 79ba3a4e..b40d9966 100644 --- a/dpdata/plugins/abacus.py +++ b/dpdata/plugins/abacus.py @@ -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. diff --git a/tests/abacus.scf/stru_test b/tests/abacus.scf/stru_test index e4036409..c3a1917d 100644 --- a/tests/abacus.scf/stru_test +++ b/tests/abacus.scf/stru_test @@ -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