anchor.diff:      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
  
positive.code:           else !i == 1 
              call zcopy(ry(i)*n(i)*ry(i+1),curcr,1,crnew(i)%p,1) 
            end if
            
         end if
  
  
  
negative.code:             !deallocate(tmp1)
              !anorm = znormest(ry(i+1)*ry(i+1), 4, zsfun_matvec, zsfun_matvec_transp)
              anorm = 1d0
              call zexp_mv(ry(i)*rnew, 30, -tau, R, Stmp, eps, anorm, zsfun_matvec)
              !print *,Stmp(1:4)/R(1:4)
              !read(*,*)
              !print *,'step in R-matrix',i
              !call zcopy(ry(i)*rnew,R,1,Stmp,1)
              call zgemm('n','n',ry(i-1)*n(i-1),rnew,ry(i),ONE,crnew(i-1)%p,ry(i-1)*n(i-1),Stmp,ry(i),ZERO,curcr,ry(i-1)*n(i-1))
              ry(i) = rnew
              call zcopy(ry(i-1)*n(i-1)*ry(i),curcr,1,crnew(i-1)%p,1)
              if ( size(phinew(i)%p) < ry(i)*ry(i)*ra(i) ) then
                  deallocate(phinew(i)%p)
  