anchor.diff:          use lua_hande_utils, only: warn_unused_args
           use qmc_data, only: qmc_in_t, restart_in_t, load_bal_in_t, reference_t
           use qmc, only: init_proc_pointers
  -        use system, only: sys_t
  -
  -
  -        use calc, only: calc_type, dmqmc_calc
  +        use system, only: sys_t, heisenberg, read_in, ueg
  +
  +        use calc, only: calc_type, dmqmc_calc, doing_dmqmc_calc, dmqmc_energy_squared
  +        use checking, only: check_allocate
  +        use real_lattice, only: create_next_nearest_orbs
           use system, only: set_spin_polarisation
   
           integer(c_int) :: nresult
  
positive.code:         ! load balancing not implemented in DMQMC--just use defaults.
          call warn_unused_args(lua_state, keys, opts)
          call aot_table_close(lua_state, opts)
  
          calc_type = dmqmc_calc
          call init_proc_pointers(sys, qmc_in, reference, dmqmc_in)
  
negative.code:         type(load_bal_in_t) :: load_bal_in
          type(reference_t) :: reference
  
          integer :: opts, ierr
          character(10), parameter :: keys(8) = [character(10) :: 'sys', 'qmc', 'dmqmc', 'ipdmqmc', 'operators', 'rdm', &
                                                                  'restart', 'reference']
  
          lua_state = flu_copyptr(L)
          call get_sys_t(lua_state, sys)
  
          opts = aot_table_top(lua_state)
          call read_qmc_in(lua_state, opts, qmc_in)
  