carstenbauer / MonteCarlo.jl

Classical and quantum Monte Carlo simulations in Julia
https://carstenbauer.github.io/MonteCarlo.jl/dev/
Other
185 stars 18 forks source link

Minimal Working Example does not work #175

Closed andrewkhardy closed 1 year ago

andrewkhardy commented 1 year ago

Hi there! Excited to see a Julia implementation of DQMC. Perhaps this is still a work-in-progress, but I am unable to get the minimal working example to run.

If I run the following on Julia 1.8.5, this is the output

] add https://github.com/carstenbauer/MonteCarlo.jl
>using MonteCarlo 
>dqmc = DQMC(HubbardModel(), beta = 1.0)
Determinant quantum Monte Carlo simulation
Model: attractive Hubbard model
Beta: 1.0 (T ≈ 1.0)
Measurements: 0 (0 + 0)
>run(dqmc)
 MethodError: no method matching run(::DQMC{HubbardModel{Lattice{2}}, DensityHirschField{Float64}, ConfigRecorder{BitArray}, MonteCarlo.DQMCStack{Float64, Float64, Matrix{Float64}, Matrix{Float64}, LinearAlgebra.Hermitian{Float64, Matrix{Float64}}, LinearAlgebra.Diagonal{Float64, Vector{Float64}}, MonteCarlo.StandardFieldCache{Float64, Float64, Vector{Float64}, Float64}}, MonteCarlo.UnequalTimeStack{Float64, Matrix{Float64}}, SimpleScheduler{Tuple{MonteCarlo.AcceptanceStatistics{LocalSweep}}}})
Closest candidates are:
  run(::Base.AbstractCmd, ::Any...; wait) at process.jl:477
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

What do I need to fix as it does not seem to be loading any of the actual methods from your package?

ffreyer commented 1 year ago

Oh that probably just needs to be run! instead

andrewkhardy commented 1 year ago

Thanks! Works now. Add it to the list of things to change in the docs I suppose.