Closed WHUweiqingzhou closed 6 months ago
Good question.
This function only used for the special case: antiferromagnetism with NSPIN=4
In most of case, the local magnetic moment on grid point can be defined as mag(r) = (rho_x, rho_y, rho_z)
, and when rotate the quantization axis toward mag'(r) = (0, 0, rho'_z)
, the rho'_z
can be sqrt(|mag(r)|^2)
, which is always positive.
But error occurred with antiferromagnetism
case that some local magnetic moment on different grid point would have same norm with opposite direction, which usually will not arise naturally without initial antiferromagnetism atomic settings. In this case, cal_ux()
will define a positive direction, and the antiferromagnetism
will be calculated correctly.
In conclusion, this method for calculating magnetization density with noncollinear spin can work, but it dependent on the user's initial magnetic moment Settings, very unreliable!!!
I plan to refactor this method in future.
@dyzheng Thanks! I get it.
Details
During SCF,
atoms[it].m_loc_[ia]
is not updated, andcal_ux
run at each iteration. Is it correct?Have you read FAQ on the online manual http://abacus.deepmodeling.com/en/latest/community/faq.html
Task list for Issue attackers (only for developers)