anchor.diff:    function xc_index(funid, exponents)
       integer, intent(in) :: exponents(*)
       integer funid,xc_index, xcdind
  -!radovan: it's easier to start in fortran with 1
  -!         it would be possible to start with 0
  -!         but then we would allocate 0:length-1
  -!         instead of 1:length
  -!         i find 0:length-1 allocations error-prone
  -!   xc_index = xcdind(funid,exponents)
       xc_index = xcdind(funid,exponents) + 1
     end function xc_index
   
  
positive.code:   integer, parameter :: XC_D13 = 14
    integer, parameter :: XC_D04 = 15
  
  ! gga up to order 4
  ! only derivatives that are nonzero at closed-shell reference
  ! with XC_VARS_NS are here
    integer, parameter :: XC_D00000 =   1
  
negative.code: 
    subroutine xc_eval(funid, order, npoints, densities, results)
      integer, intent(in) :: funid, order, npoints
      double precision, intent(in) :: densities(:,:)
      double precision, intent(out) :: results(:,:)
      call xceval(funid,order,npoints,densities(1,1),densities(1,2),&
           results(1,1),results(1,2))
    end subroutine xc_eval
  
    subroutine xc_potential(funid, density, energy, potentials)
      integer, intent(in) :: funid    
      double precision, intent(in) :: density(:)
      double precision, intent(out) :: energy, potentials(:)
      call xcpotential(funid,density,energy,potentials)
  