Closed jebej closed 1 year ago
After reading the paper a little bit, I now understand that the point of the BAOAB method is to include this term in the middle "O" operation for better accuracy. As a compromise for applications different than molecular sampling, I'd suggest going back to @jamesgardner1421's second proposition, where gamma
is only included in the gamma*v*dt
term, and not in the noise term. That way, one can choose gamma=0
to disable this extra operation, or alternatively, it lets people choose exactly how to define the noise term without the current forced gamma
dependence.
For my application, for example, where I need:
jj!(ϕ′,ϕ,τ,β,I) = (I - ϕ′ - sin(ϕ))/β
I can use
jj!(ϕ′,ϕ,τ,β,I) = (I - sin(ϕ))/β
with gamma = 1/β
. However, I do not want the noise term to include this β
.
I can make a PR, if that is acceptable.
What about a gamma and a beta, separate terms?
Fixed by #520
need to update docs?
There weren't any docs for this algorithm. I actually found it by chance, going through the code. As far as I understand, this is the only algo for second-order SDEs, and there isn't even a section in the docs for that.
From PR #397, it is stated that the functional form assumed for the SDE with the
BAOAB
solver isThis is not what I would expect, since it has an extra
-gamma*v*dt
term. Is there a reason for this difference?Comparing with the ODE case in the following script, the solutions are different: