File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -580,9 +580,17 @@ Example:
580
580
reaction = @reaction k, 0 --> X, [misc="A reaction"]
581
581
get_misc(reaction)
582
582
```
583
+
584
+ Notes:
585
+ - The `misc` field can contain any valid Julia structure. This mean that Catalyst cannot check it
586
+ for symbolci variables that are added here. This means that symbolic variables (e.g. parameters of
587
+ species) that are stored here are not accessible to Catalyst. This can cause troubles when e.g.
588
+ creating a `ReactionSystem` programmatically (in which case any symbolic variables stored in the
589
+ `misc` metadata field should also be explicitly provided to the `ReactionSystem` constructor).
590
+
583
591
"""
584
592
function get_misc (reaction:: Reaction )
585
- if has_description (reaction)
593
+ if has_misc (reaction)
586
594
return getmetadata (reaction, :misc )
587
595
else
588
596
error (" Attempts to access `misc` metadata field for a reaction which does not have a value assigned for this metadata." )
Original file line number Diff line number Diff line change 116
116
@test ! Catalyst. has_misc (r1)
117
117
@test Catalyst. has_misc (r2)
118
118
@test_throws Exception Catalyst. get_misc (r1)
119
- @test isequal (Catalyst. get_misc (r2), (' C ' , :C ))
119
+ @test isequal (Catalyst. get_misc (r2), (' M ' , :M ))
120
120
end
You can’t perform that action at this time.
0 commit comments