anchor.diff:  
   contains
   
  +!--- Initialisation and finalisation of module-level variables ---
  +
       subroutine init_determinants()
   
           ! Initialise determinant information: number of determinants, how
  
positive.code:         end do
  
      end subroutine encode_det
  
      pure subroutine decode_det(f, occ_list)
  
  
negative.code: 
      end function det_compare
  
  !--- Output ---
  
      subroutine write_det(f, iunit, new_line)
  
          ! Write out a determinant as a list of occupied orbitals in the
          ! Slater determinant.
          ! In:
          !    f(basis_length): bit string representation of the Slater
          !        determinant.
          !    iunit (optional): io unit to which the output is written.
          !        Default: 6 (stdout).
          !    new_line (optional): if true, then a new line is written at
          !        the end of the list of occupied orbitals.  Default: no
          !        new line.
  
          use utils, only: int_fmt
  
          integer(i0), intent(in) :: f(basis_length)
          integer, intent(in), optional :: iunit
          logical, intent(in), optional :: new_line
          integer :: occ_list(nel), io, i
          character(4) :: fmt1
  
          if (present(iunit)) then
              io = iunit
          else
              io = 6
          end if
  
          call decode_det(f, occ_list)
          fmt1 = int_fmt(nbasis,1)
  
          write (io,'("|")', advance='no')
          do i = 1, nel
              write (io,'('//fmt1//')', advance='no') occ_list(i)
          end do
          write (io,'(1X,">")', advance='no')
          if (present(new_line)) then
              if (new_line) write (io,'()')
          end if
  
      end subroutine write_det
  
  end module determinants
  