I found a bug in the nn program. In the case.struct I attach it generates a wrong case.struct_nn. I found that the problem is that, while looking for equivalent atoms, it does not check that both have the same number of shells.<br>
I added this check and now it works. The patch to be applied to nn.f is:<br><br>--- ../SRC_nn/nn.f 2007-11-09 06:56:36.000000000 -0300<br>+++ nn.f 2008-06-12 16:30:48.000000000 -0300<br>@@ -383,6 +383,11 @@<br> if(zz(i0).ne.zzo(j)) goto 501<br>
! compare atom with index i with all other atoms<br> ! equiv do 510 i1=1,min(ishell(i)-1,ishellmax)<br>+ if (ishell(i).ne.ishell(j)) then<br>+ write(66,559) i,j,ishell(i),ishell(j)<br>+ 559 format(' atom:',i4,' and ATOM:',i4,' differ in number of shells',i4,'ne',i4)<br>
+ goto 501<br>+ endif<br> do 510 i1=1,ishell(i)-1<br> if(abs(shdist(i,i1)-shdist(j,i1)).gt.dlimit.and.shdist(i,i1).lt.2.d000*max(a(1),a(2),a(3))) then<br> ! if(abs(shdist(i,i1)-shdist(j,i1)).gt.dlimit) then<br>
<br>