Weight function for picking the most populated states. Trivial in single run mode, but multiple options exist in mneci
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | sign_curr(lenof_sign) | |||
integer, | intent(in) | :: | run |
pure function core_space_weight(sign_curr, run) result(sign_curr_real)
real(dp), intent(in) :: sign_curr(lenof_sign)
integer, intent(in) :: run
real(dp) :: sign_curr_real
#ifdef CMPLX_
sign_curr_real = sqrt(sum(abs(sign_curr(1::2)))**2 + sum(abs(sign_curr(2::2)))**2)
unused_var(run)
#else
if (tSignedRepAv) then
sign_curr_real = real(abs(sum(sign_curr)), dp)
else
if (run == GLOBAL_RUN) then
sign_curr_real = real(sum(abs(sign_curr)), dp)
else
sign_curr_real = mag_of_run(sign_curr, run)
end if
end if
#endif
end function core_space_weight