anchor.diff:          opts = aot_table_top(lua_state)
           lanczos = aot_exists(lua_state, opts, 'lanczos')
           call read_fci_in(lua_state, opts, sys%basis, fci_in, use_sparse_hamil)
  -        call read_reference_t(lua_state, opts, sys, ref)
  +        call read_reference_t(lua_state, opts, ref, sys)
           call warn_unused_args(lua_state, keys, opts)
           call aot_table_close(lua_state, opts)
   
  
positive.code:         call read_semi_stoch_in(lua_state, opts, qmc_in, semi_stoch_in)
          call read_restart_in(lua_state, opts, restart_in)
          call read_load_bal_in(lua_state, opts, load_bal_in)
          call read_reference_t(lua_state, opts, sys, reference)
  
          call get_qmc_state(lua_state, have_restart_state, qmc_state_restart)
  
  
negative.code:         !    lua_state: flu/Lua state to which the HANDE API is added.
          ! In:
          !    opts: handle for the table containing the reference table.
          !    sys (optional): sys_t object describing the system of interest.  Used to default to
          !        full space if present.
          !    ref_table_name (optional): name of table holding reference info.  Default: reference.
          ! Out:
          !    ref: reference_t object contianing the input options describing the
          !        reference.  Note that ex_level is set to the number of electrons
          !        if not provided (incl. if the reference table is not present in
          !        opts) and sys is present and -1 otherwise.
  
          use flu_binding, only: flu_State
          use aot_vector_module, only: aot_get_val
          use aot_table_module, only: aot_get_val, aot_exists, aot_table_open, aot_table_close
          use errors, only: stop_all
  
          use lua_hande_utils, only: warn_unused_args
          use reference_determinant, only: reference_t
  