diff --git a/source/KKRnano/source/ProcessKKRresults_mod.F90 b/source/KKRnano/source/ProcessKKRresults_mod.F90 index 35814f530ed649520e0fa64ccbf9d9576e57909d..a9a84435d0913edad7388202992966a3df91d002 100644 --- a/source/KKRnano/source/ProcessKKRresults_mod.F90 +++ b/source/KKRnano/source/ProcessKKRresults_mod.F90 @@ -451,6 +451,7 @@ module ProcessKKRresults_mod double precision :: chrgNt_local double precision :: new_fermi double precision :: CHRGSEMICORE !< total semicore charge over all atoms + double precision :: fsemicore_in integer :: ila, r1fu integer :: num_local_atoms @@ -659,7 +660,12 @@ module ProcessKKRresults_mod ! --> Sum up semicore charges from different MPI ranks call sumChargeSemi_com(CHRGSEMICORE, mp%mySEComm) ! --> Recalculate the semicore contour factor FSEMICORE - if (mp%isMasterRank) call calcFactorSemi(CHRGSEMICORE, emesh%FSEMICORE, params%fsemicore) + if(iter==1) then + fsemicore_in = params%fsemicore + else + fsemicore_in = emesh%FSEMICORE + endif + if (mp%isMasterRank) call calcFactorSemi(CHRGSEMICORE, emesh%FSEMICORE, fsemicore_in) endif emesh%E2 = new_fermi ! Assumes that for every atom the same Fermi correction