anchor.diff:    implicit none
     character(len=36)        :: filename 
     integer                  :: i,j
  +  character(len=3)         :: reference
   
     filename = trim(mol_name) // ".xyz"
   
  
positive.code:   read(10,*) natoms
    call allocate_geo
  
    read(10,*) charge, mult
  
    do i=1,natoms
      read(10,*) atom(i),xyz(i,1),xyz(i,2),xyz(i,3)
  
negative.code:   enddo
    nel = nel - charge
  
    if(spins == 1)then
      if(mod(nel,2) == 0)then
        even = .true.
        noccA = nel/2 + (mult-1)/2
        noccB = nel/2 - (mult-1)/2
      else
        write(*,*) "  !Error! RHF calc impossible with even no of electrons "
        call exit(666)
      endif
    elseif(spins == 2)then
      if(mod(nel,2) == 0)then
        even = .true.
        noccA = nel/2 + (mult-1)/2
        noccB = nel/2 - (mult-1)/2
        if(mod(mult,2) == 0)then
          write(*,*) "  !Error! Even no of electrons and mult ", mult," is impossible"
          call exit(666)
        endif
      else
        even = .false.
        noccA = nel/2 + 1 + (mult-1)/2
        noccB = nel/2 - (mult-1)/2
        if(mod(mult,2) == 1)then
          write(*,*) "  !Error! Odd no of electrons and mult ", mult," is impossible"
          call exit(666)
        endif
      endif
    endif
  
    write(*,*) "  No of electrons   = ", nel 
    write(*,*) "  No of occ orbs(A) = ", noccA 
    write(*,*) "  No of occ orbs(B) = ", noccB
    write(*,*) ""
  
  
  