Skip to content

Commit 99507e6

Browse files
committed
up
1 parent 14b7e73 commit 99507e6

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rn = @reaction_network begin
2424
end
2525
getnoisescaling(rn)
2626
```
27+
- `SDEProblem` no longer takes the `noise_scaling` argument (she above for new approach to handle noise scaling).
2728
- Changed fields of internal `Reaction` structure. `ReactionSystems`s saved using `serialize` on previous Catalyst versions cannot be loaded using this (or later) versions.
2829
- Simulation of spatial ODEs now supported. For full details, please see https://github.com/SciML/Catalyst.jl/pull/644 and upcoming documentation. Note that these methods are currently considered alpha, with the interface and approach changing even in non-breaking Catalyst releases.
2930
- LatticeReactionSystem structure represents a spatial reaction network:

src/reactionsystem.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -945,16 +945,6 @@ function get_metadata(reaction::Reaction, md_key::Symbol)
945945
return metadata[findfirst(isequal(md_key, entry[1]) for entry in get_metadata_dict(reaction))][2]
946946
end
947947

948-
"""
949-
get_noise_scaling(reaction::Reaction)
950-
951-
Retrives the nosie scaling factor for the reaction's noise term (as generated by the reaction in an SDE).
952-
If a specific noise scaling expression have been provided in the reactions "noise_scaling" metadata,
953-
returns that. If not, returns `1.0`.
954-
"""
955-
function get_noise_scaling(reaction::Reaction)
956-
has_metadata(reaction, :noise_scaling) ? get_metadata(reaction, :noise_scaling) : 1.0
957-
end
958948

959949
######################## Conversion to ODEs/SDEs/jump, etc ##############################
960950

@@ -1075,7 +1065,7 @@ function assemble_diffusion(rs, sts, ispcs; combinatoric_ratelaws = true,
10751065

10761066
for (j, rx) in enumerate(get_rxs(rs))
10771067
rlsqrt = sqrt(abs(oderatelaw(rx; combinatoric_ratelaw = combinatoric_ratelaws)))
1078-
rlsqrt *= get_noise_scaling(rx)
1068+
rlsqrt *= getnoisescaling(rx)
10791069
remove_conserved && (rlsqrt = substitute(rlsqrt, depspec_submap))
10801070

10811071
for (spec, stoich) in rx.netstoich
@@ -1497,7 +1487,6 @@ function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
14971487
default_u0 = Dict(), default_p = Dict(), defaults = _merge(Dict(default_u0), Dict(default_p)),
14981488
noise_scaling = nothing, # To be removed (used for deprication message only).
14991489
kwargs...)
1500-
isnothing(noise_scaling) || error("Supplying a noise_scaling agument to SDESystems have been depricated. Please see the \"Scaling the noise magnitude in the chemical Langevin equations\" section of the \"Advanced Simulation Options\" page of the documentation for the new approach.")
15011490
spatial_convert_err(rs::ReactionSystem, SDESystem)
15021491

15031492
flatrs = Catalyst.flatten(rs)
@@ -1548,7 +1537,6 @@ function Base.convert(::Type{<:JumpSystem}, rs::ReactionSystem; name = nameof(rs
15481537
default_u0 = Dict(), default_p = Dict(), defaults = _merge(Dict(default_u0), Dict(default_p)),
15491538
noise_scaling = nothing, # To be removed (used for deprication message only).
15501539
kwargs...)
1551-
isnothing(noise_scaling) || error("Supplying a noise_scaling agument to SDESystems have been depricated. Please see the \"Scaling the noise magnitude in the chemical Langevin equations\" section of the \"Advanced Simulation Options\" page of the documentation for the new approach.")
15521540
spatial_convert_err(rs::ReactionSystem, JumpSystem)
15531541

15541542
(remove_conserved !== nothing) &&

0 commit comments

Comments
 (0)