anchor.diff:              !deallocate(tmp3)
               !deallocate(X)
               
  -            call zinit_sfun(ry(i), ry(i), ra(i), ry(i), ry(i), phinew(i)%p, phitmp)
  -           sz = ry(i)*ry(i)
  +            call zinit_sfun(ry(i), ry(i), ra(i), rnew, rnew, phinew(i)%p, phitmp)
  +            !sz = rnew * ry(i)
               !allocate(X(sz,sz))
               !allocate(tmp1(sz))
               !do j = 1,sz
  
positive.code:     call init_seed()
      ermax = 0d0
      swp = 1
      do while (swp .eq. 1)
         !True iteration when started from the left:
         !move (US), move S, next core
  
negative.code:           else !i == 1 
              call zcopy(ry(i)*n(i)*ry(i+1),curcr,1,crnew(i)%p,1) 
            end if
         end if
  
  
  