m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1 1 0

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
Robin
Posts: 61
Joined: Thu Jan 14, 2010 3:18 am

m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1 1 0

Post by Robin » Thu Sep 02, 2010 2:42 am

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

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1

Post by mverstra » Sat Sep 04, 2010 9:04 am

Hello,

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

JEJohns
Posts: 55
Joined: Sun May 02, 2010 5:30 pm

Re: m_coulombian.F90 doesn't work for icutcoul=2, vcutgeo= 1

Post by JEJohns » Tue Oct 26, 2010 11:58 pm

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.

Locked