Skip to content

Commit 7bdeb50

Browse files
ssun30rwest
authored andcommitted
TEMP: added checks to restrict barrier height
1 parent 43018b1 commit 7bdeb50

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Calculators/Rate.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ export StickingCoefficient
3535
V0::R = 0.0
3636
unc::P = EmptyRateUncertainty()
3737
end
38-
@inline (arr::Arrheniusq)(;T::Q,P::N=0.0,C::S=0.0,phi=0.0,dGrxn=0.0,d=0.0) where {Q<:Real,N<:Real,S<:Real} = @fastmath arr.A*T^arr.n*exp((-arr.Ea-arr.q*F*(phi-arr.V0))/(R*T))
39-
@inline (arr::Arrheniusq)(T::Q;P::N=0.0,C::S=0.0,phi=0.0,dGrxn=0.0,d=0.0) where {Q<:Real,N<:Real,S<:Real} = @fastmath arr.A*T^arr.n*exp((-arr.Ea-arr.q*F*(phi-arr.V0))/(R*T))
38+
@inline (arr::Arrheniusq)(;T::Q, P::N=0.0, C::S=0.0, phi=0.0, dGrxn=0.0, d=0.0) where {Q<:Real, N<:Real, S<:Real} = begin
39+
barrier = arr.Ea+arr.q*F*(phi-arr.V0)
40+
corrected_barrier = max(0, dGrxn, barrier)
41+
@fastmath arr.A*T^arr.n*exp(-corrected_barrier/(R*T))
42+
end
43+
@inline (arr::Arrheniusq)(T::Q; P::N=0.0, C::S=0.0, phi=0.0, dGrxn=0.0, d=0.0) where {Q<:Real, N<:Real, S<:Real} = begin
44+
barrier = arr.Ea+arr.q*F*(phi-arr.V0)
45+
corrected_barrier = max(0, dGrxn, barrier)
46+
@fastmath arr.A*T^arr.n*exp(-corrected_barrier/(R*T))
47+
end
4048
export Arrheniusq
4149

4250
@with_kw struct Marcus{N<:Real,K<:Real,Q,P<:AbstractRateUncertainty,B} <: AbstractRate

0 commit comments

Comments
 (0)