diff --git a/Project.toml b/Project.toml index a07b72b..63318dd 100644 --- a/Project.toml +++ b/Project.toml @@ -21,7 +21,7 @@ Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" [compat] - +Catalyst = 13 [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/examples/hog1p.jl b/examples/hog1p.jl index 580afa9..9eff378 100644 --- a/examples/hog1p.jl +++ b/examples/hog1p.jl @@ -14,7 +14,23 @@ function Hog1p(t) return signal end -rn = @reaction_network begin +@parameters begin + k01 + k10 + a + k12 + k21 + k23 + k32 + λ0 + λ1 + λ2 + λ3 + γnuc + ktrans + γcyt +end +rn = @reaction_network begin k01, G0 --> G1 max(0, k10 - a*Hog1p(t)), G1 --> G0 k12, G1 --> G2 diff --git a/examples/telegraph_cme.jl b/examples/telegraph_cme.jl index 013b741..7dcac98 100644 --- a/examples/telegraph_cme.jl +++ b/examples/telegraph_cme.jl @@ -28,11 +28,11 @@ a4 = propensity() do x, p p[4] * x[3] end -k₀₁ = 0.05 -k₁₀ = 0.1 -λ = 5.0 -γ = 0.5 -θ = [k₀₁, k₁₀, λ, γ] +k01 = 0.05 +k10 = 0.1 +lbda = 5.0 +gamma = 0.5 +θ = [k01, k10, lbda, gamma] model = CmeModel(𝕊, [a1, a2, a3, a4], θ) @@ -42,12 +42,13 @@ tspan = (0.0, 300.0) fspsol1 = solve(model, p0, tspan, fspalgorithm) # Bursting model definition using Catalyst +@parameters k₀₁ k₁₀ λ γ bursting_rn = @reaction_network begin k₀₁, G0 --> G1 k₁₀, G1 --> G0 λ, G1 --> G1 + mRNA γ, mRNA --> ∅ -end +end k₀₁ k₁₀ λ γ parameter_values = [k₀₁ => 0.05, k₁₀ => 0.1, λ => 5.0, γ => 0.5] model_from_catalyst = CmeModel(bursting_rn, parameter_values) diff --git a/src/fspmatrix/sparse/fspsparsematrix.jl b/src/fspmatrix/sparse/fspsparsematrix.jl index 4423522..5e4304d 100644 --- a/src/fspmatrix/sparse/fspsparsematrix.jl +++ b/src/fspmatrix/sparse/fspsparsematrix.jl @@ -263,8 +263,4 @@ function *(A::FspMatrixSparse, v::Vector{RealT}) where {RealT<:AbstractFloat} return matvec(0.0, A, v) end -#= -Interface to DifferentialEquations.jl's Linear operator -=# -# mutable struct FspDiffEqOperator <: AbstractDiffEqOperator -# end + diff --git a/test/test_catalyst_interface.jl b/test/test_catalyst_interface.jl index c119b32..6e26c12 100644 --- a/test/test_catalyst_interface.jl +++ b/test/test_catalyst_interface.jl @@ -27,13 +27,12 @@ end cmemodel1 = CmeModel(𝕊, [a1,a2,a3,a4], θ) -# @parameters k01 k10 α γ rn = @reaction_network begin k01, G0 --> G1 k10, G1 --> G0 α, G1 --> G1 + RNA γ*max(0.0, 1.0 - sin(π * t / L)), RNA --> ∅ -end +end k01 k10 α γ L cmemodel2 = CmeModel(rn, θ) @test get_species_count(cmemodel2) == 3