Dear developers,
Recently I try to do the Coulomb truncation for a 2D system, but Abinit 6.2.2 complains about the surface is not in x-y plane (though I do set vcutgeo= 1 1 0). I checked the m_coulombian.F90, and it seems that some typos exist in the codes between line 373 and 379. They change the Vcp%pdir to be "1 1 1", which should be "1 1 0". This happens because the variable in the if condition is incorrect, I think. I revised it (see below) and the code finally work.
Sincerely,
Guangfu Luo
------------------possible bug in m_coulombian.F90 (line 373-379)---------------
do ii=1,3
check=Vcp%vcutgeo(ii)
if (ABS(test)>zero) then ! Use Rozzi"s method with a finite surface along x-y
Vcp%pdir(ii)=1
if (test<zero) Vcp%alpha(ii)=normv(check*rprimd(:,ii),rmet,'R')
end if
end do
------------------possible revision of m_coulombian.F90 (line 373-379)----------
do ii=1,3
check=Vcp%vcutgeo(ii)
if (ABS(check)>zero) then
Vcp%pdir(ii)=1
if (check<zero) Vcp%alpha(ii)=normv(check*rprimd(:,ii),rmet,'R')
end if
end do
m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1 1 0
Re: m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1
Hello,
ok, thanks. I think you are correct, have incorporated this in 6.2.3, and asked the authors to check.
Cheers
Matthieu
ok, thanks. I think you are correct, have incorporated this in 6.2.3, and asked the authors to check.
Cheers
Matthieu
Matthieu Verstraete
University of Liege, Belgium
University of Liege, Belgium
Re: m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1
Thanks for this update. I'm having trouble installing 6.4, but was able to recompile 6.2.2 with this change and it worked like a dream once I implemented it.