From 522c4a5505374b30682e44ad391d1e8d64ed5043 Mon Sep 17 00:00:00 2001 From: Haozhi Han Date: Thu, 29 Aug 2024 17:24:05 +0800 Subject: [PATCH] Revert "[pre-commit.ci lite] apply automatic fixes" This reverts commit e91428a3740d72e63c24be6092d56ccd9ac2ac07. --- .../module_deltaspin/spin_constrain.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp index a984d1dc83..0db7e352e3 100644 --- a/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp @@ -257,15 +257,12 @@ void SpinConstrain::set_target_mag() mag.x = element_data.target_mag_val * std::sin(radian_angle1) * std::cos(radian_angle2); mag.y = element_data.target_mag_val * std::sin(radian_angle1) * std::sin(radian_angle2); mag.z = element_data.target_mag_val * std::cos(radian_angle1); - if (std::abs(mag.x) < 1e-14) { + if (std::abs(mag.x) < 1e-14) mag.x = 0.0; -} - if (std::abs(mag.y) < 1e-14) { + if (std::abs(mag.y) < 1e-14) mag.y = 0.0; -} - if (std::abs(mag.z) < 1e-14) { + if (std::abs(mag.z) < 1e-14) mag.z = 0.0; -} } this->target_mag_[iat] = mag; }