anchor.diff:          integer :: ir, ios, ierr
           logical :: t_exists
           integer :: active_basis_offset, rhf_fac
  -        integer, allocatable :: seen_ij(:), seen_iab(:,:)
  +        integer, allocatable :: seen_ijij(:), seen_iaib(:,:)
  +        logical, allocatable :: seen_iha(:)
   
           namelist /FCI/ norb, nelec, ms2, orbsym, uhf, isym, syml, symlz
   
  
positive.code: 
          ! From CAS work out the start of the active basis functions, the number
          ! of active basis functions and the number of active electrons.
          active_basis_offset = 2*(nel-cas(1)) 
          ! Note that nbasis is spin-orbitals whereas cas is in spatial orbitals
          nbasis = min(nbasis, 2*cas(2))
          nel = nel - ( nel - cas(1) )
          if (uhf) then
  
negative.code: 
          end do
  
          deallocate(seen_iha, stat=ierr)
          call check_deallocate('seen_iha', ierr)
          deallocate(seen_ijij, stat=ierr)
          call check_deallocate('seen_ijij', ierr)
          deallocate(seen_iaib, stat=ierr)
          call check_deallocate('seen_iaib', ierr)
  
          close(ir, status='keep')
  
  