anchor.diff:          !  * NELEC: number of electrons in system.
           !  * MS2: spin polarisation.
           !  * ORBSYM: array containing symmetry label of each orbital.  See
  -        !    symmetry notes.
  +        !    symmetry notes below and in pg_symmetry.
           !  * UHF: true if FCIDUMP file was produced from an unrestricted
           !    Hartree-Fock calculation.  See note on basis indices below.
  -        !  * ISYM: unused.  Defined solely for compatibility with NECI FCIDUMP files.
  +        !  * ISYM: currently unused.  Defined solely for compatibility with NECI
  +        !    FCIDUMP files.  Gives the symmetry of the wavefunction formed by
  +        !    occupied the NELEC lowest energy spin-orbitals.
  +        !  * SYML: currently unused.  Defined solely for compatibility with NECI
  +        !    FCIDUMP files.  Array containing L (angular momentum) for each orbital.
  +        !    Set to -1 if L is not a good quantum number.
  +        !  * SYMLZ: currently unused.  Defined solely for compatibility with NECI
  +        !    FCIDUMP files.  Array containing Lz (angular momentum along the
  +        !    z-axis) for each orbital.
  +        !    For example d_xz would have L=2 and Lz=1, and dyz L=2, Lz=-1.
   
           ! Integrals:
           !  * if i = j = a = b = 0, E_core = x , where E_core contains the
  
positive.code:         read (ir, FCI)
  
          if (uhf) then
              nbasis = norbs
          else
              nbasis = 2*norbs
          end if
  
          allocate(basis_fns(nbasis), stat=ierr)
          call check_allocate('basis_fns', nbasis, ierr)
  
          ! avoid annoying compiler warnings over unused variables in FCI namelist
          ! that are present for NECI compatibility.
          isym = 0
  
          ! read integrals and eigenvalues
          do 
              ! loop over lines.
              read (ir,*) x, i, a, j, b
              if (ios < 0) exit ! end of file
          end do
  
          if (ios > 0) call stop_all('read_input','Problem reading input.')
          close(ir, status='keep')
  
      end subroutine read_in_fcidump
  
  end module read_in
  
negative.code: use const
  
  implicit none
  
  real(p) :: Ecore
  
  contains
  
  