NQCDynamics.jl
NQCDynamics.jl copied to clipboard
friction_method: WideBandExact in diabatic_mdef.jl uses the AndersonHolstein model instead of the inner 2x2 model
There is a bug in ClassicalMethods/diabatic_mdef.jl, line 65, function evaluate_friction!
In the WideBandExact case get_potential
and get_derivative
takes the wrong quantities. It passes quantities related to the AndersonHolstein model instead of related to the 2x2 "inner model". This has gone unnoticed so far as in the case when a Trapezoidal discretisation is used with the right value for the density of states, prefactors cancel and the coupling and derivatives come out right. In the GaussLegendre case, things go wrong.
Current Behaviour:
- AndersonHolstein combined with a Trapezoidal bath and friction_method:WideBandExact gives correct results (assuming that WideBandExact is initialised with the DOS equal to $(nstates+1)/(bandmax-bandmin)$
- AndersonHolstein combined with ShenviGaussLegendre and friction_method:WideBandExact goes wrong.
Expected Behaviour:
-
friction_method: WideBandExact
shouldn't depend at all on the discretisation as it only requires the impurity potentials and $\Gamma$
TODO:
- change the behaviour such that WideBandExact friction only depends on quantities in the "inner model":
AndersonHolstein.model
- Clearly, the current test in https://github.com/NQCD/NQCDynamics.jl/blob/main/test/Dynamics/diabatic_mdef.jl isn't picking this up, so there should also be a new test when combining it with different discretisations.