huangli712 / ACFlow

A Full-Fledged Analytic Continuation Toolkit in Julia
https://huangli712.github.io/projects/acflow/index.html
GNU General Public License v3.0
24 stars 1 forks source link

StochOM ktype=bsymm, grid=btime giving NaN #3

Open sandimas opened 4 months ago

sandimas commented 4 months ago

When running ACFlow (current master branch) the stochastic optimization method for symmetric time kernels I am getting NaN for the delta. Below is the output.

I've attached an example script with input data. I also run MaxEnt which converges well.

Thanks.

[ StochOM ]
Create infrastructure for Monte Carlo sampling
Postprocess input data: 201 points
Build grid for input data: 201 points
Build mesh for spectrum: 1000 points
try ->      1 (    25) Δ ->      NaN 
try ->      2 (    25) Δ ->      NaN 
try ->      3 (    25) Δ ->      NaN 
try ->      4 (    25) Δ ->      NaN 
try ->      5 (    25) Δ ->      NaN 
try ->      6 (    25) Δ ->      NaN 
try ->      7 (    25) Δ ->      NaN 
try ->      8 (    25) Δ ->      NaN 
try ->      9 (    25) Δ ->      NaN 
try ->     10 (    25) Δ ->      NaN 
try ->     11 (    25) Δ ->      NaN 
try ->     12 (    25) Δ ->      NaN 
try ->     13 (    25) Δ ->      NaN 
try ->     14 (    25) Δ ->      NaN 
try ->     15 (    25) Δ ->      NaN 
try ->     16 (    25) Δ ->      NaN 
try ->     17 (    25) Δ ->      NaN 
try ->     18 (    25) Δ ->      NaN 
try ->     19 (    25) Δ ->      NaN 
try ->     20 (    25) Δ ->      NaN 
try ->     21 (    25) Δ ->      NaN 
try ->     22 (    25) Δ ->      NaN 
try ->     23 (    25) Δ ->      NaN 
try ->     24 (    25) Δ ->      NaN 
try ->     25 (    25) Δ ->      NaN 
Median χ² :              NaN Accepted configurations :     0

som_check.zip

huangli712 commented 3 months ago

Thank you for reporting this bug.

The original implementation for analytic continuation of bosonic imaginary-time function in som.jl is not well checked. Actually, it is incorrect. In the newest version of ACFlow (v1.8.6-devel.240718, please use the latest release), this bug is fixed. We also add more features to the StochOM solver. Now it supports analytic continuations for both fermionic and bosonic imaginary-time correlation functions.

There are still some issues that I need to clarify:

  1. For the StochOM solver, analytically continuing Matsubara data is more efficient than imaginary-time data.
  2. Perhaps the StochSK and StochAC solvers are more efficient and stable than the StochOM solver.
  3. For symmetric bosonic Kernel (ktype = 'bsymm'), the spectral function $A(\omega)$ is an odd function. So, we just define $\tilde{A}(\omega) = A(\omega)/\omega$, and $\omega \in (0, \infty)$. The output file Aout.data in fact contains $\tilde{A}(\omega)$ data for bosonic cases. And we should set wmin >= 0.0.