Skip to content

Commit 142ffc0

Browse files
committed
Merge branch 'refactor_spin' of github.com:dyzheng/abacus-develop into refactor_spin
2 parents 078c9fe + d729b0c commit 142ffc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/module_hamilt_lcao/module_deltaspin/basic_funcs.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ void print_2d(const std::string info, const std::vector<ModuleBase::Vector3<doub
142142
for (const auto &row : array)
143143
{
144144
iat += 1;
145-
if (nspin == 2) ofs << FmtCore::format("ATOM %6d %20.10f\n", iat, row.z*unit_convert);
146-
else if (nspin == 4) ofs << FmtCore::format("ATOM %6d %20.10f %20.10f %20.10f\n", iat, row.x*unit_convert, row.y*unit_convert, row.z*unit_convert);
145+
if (nspin == 2) { ofs << FmtCore::format("ATOM %6d %20.10f\n", iat, row.z*unit_convert);
146+
} else if (nspin == 4) { ofs << FmtCore::format("ATOM %6d %20.10f %20.10f %20.10f\n", iat, row.x*unit_convert, row.y*unit_convert, row.z*unit_convert);
147+
}
147148
}
148149
}

0 commit comments

Comments
 (0)