@@ -244,9 +244,6 @@ function Reaction(rate, subs, prods; kwargs...)
244244 Reaction (rate, subs, prods, sstoich, pstoich; kwargs... )
245245end
246246
247- # Union type for `Reaction`s and `Equation`s.
248- const CatalystEqType = Union{Reaction, Equation}
249-
250247# ## Base Function Dispatches ###
251248
252249# Used by `Base.show`.
@@ -679,6 +676,48 @@ function getmisc(reaction::Reaction)
679676 end
680677end
681678
679+ # ############# Metadata for the mathematical type of a reaction ##############
680+
681+ """
682+ @enumx PhysicalScale
683+
684+ EnumX instance representing the physical scale of a reaction.
685+
686+ Notes: The following values are possible:
687+ - `Auto`: (DEFAULT) Lets Catalyst decide at the time of system conversion and/or
688+ problem generation at what physical scale to represent the reaction.
689+ - `ODE`: The reaction is to be treated via an ordinary differential equation term.
690+ - `SDE`: The reaction is to be treated via a stochastic differential equation (CLE) term.
691+ - `Jump`: The reaction is to be treated via a jump process (stochastic chemical kinetics)
692+ term, letting Catalyst decide the specific jump type.
693+ - `VariableRateJump`: The reaction is to be treated as a jump process (stochastic chemical
694+ kinetics) term, specifically assigning it to a VariableRateJump.
695+ """
696+ @enumx PhysicalScale begin
697+ Auto # the default that lets Catalyst decide
698+ ODE
699+ SDE
700+ Jump # lets Catalyst decide the jump type
701+ VariableRateJump # forces a VariableRateJump
702+ end
703+
704+ const JUMP_SCALES = (PhysicalScale. Jump, PhysicalScale. VariableRateJump)
705+ const NON_CONSTANT_JUMP_SCALES = (PhysicalScale. ODE, PhysicalScale. SDE, PhysicalScale. VariableRateJump)
706+
707+ """
708+ has_physical_scale(rx::Reaction)
709+
710+ Returns `true` if the input reaction has the `physical_scale` metadata field assigned,
711+ else `false`.
712+ """
713+ function has_physical_scale (rx:: Reaction )
714+ return hasmetadata (rx, :physical_scale )
715+ end
716+
717+ function get_physical_scale (rx:: Reaction )
718+ return has_physical_scale (rx) ? getmetadata (rx, :physical_scale ) : PhysicalScale. Auto
719+ end
720+
682721# ## Units Handling ###
683722
684723"""
0 commit comments