fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.95k stars 286 forks source link

Wrong display of species and params in Catalyst #1369

Closed lmiq closed 3 years ago

lmiq commented 3 years ago

See the snapshot:

image

The expected output of the two last commands should be something like:

julia> species(polimerization)
6-element Vector{Term{Real, Nothing}}:
 U(t)
 NCO(t)
 DIPA_l(t)
 OH(t)
 POL(t)
 DIPA_v(t)

julia> params(polimerization)
6-element Vector{Sym{Real, Base.ImmutableDict{DataType, Any}}}:
 k1
 km1
 k2
 kv
 A
 b

The complete notebook is:

### A Pluto.jl notebook ###
# v0.14.7

using Markdown
using InteractiveUtils

# ╔═╡ d43a0a12-f588-11eb-2159-c9f4cfcc2ab5
using Catalyst

# ╔═╡ 5e61c223-ee23-4fbc-95d8-7dd9334257a3
using DifferentialEquations

# ╔═╡ 20312f4f-0d66-4ba0-bdb1-dd134596eaca
vap(OH,A,b) = A*exp(OH/b)

# ╔═╡ 2b2b540a-71f5-449f-87de-e6590c71b611
polimerization = @reaction_network begin
  (k1,km1), U <--> NCO + DIPA_l
  k2, NCO + OH --> POL
  vap(OH,A,b), DIPA_l --> DIPA_v
end k1 km1 k2 kv A b

# ╔═╡ 5348a81d-4132-4e3a-bef8-248b7c8cbbfa
species(polimerization)

# ╔═╡ ecd91535-fdd3-41fd-9c7f-e11262e2add9
params(polimerization)

# ╔═╡ 929aba07-a2a7-424b-83b4-7cb95ee31ad2

# ╔═╡ Cell order:
# ╠═d43a0a12-f588-11eb-2159-c9f4cfcc2ab5
# ╠═5e61c223-ee23-4fbc-95d8-7dd9334257a3
# ╠═2b2b540a-71f5-449f-87de-e6590c71b611
# ╠═20312f4f-0d66-4ba0-bdb1-dd134596eaca
# ╠═5348a81d-4132-4e3a-bef8-248b7c8cbbfa
# ╠═ecd91535-fdd3-41fd-9c7f-e11262e2add9
# ╠═929aba07-a2a7-424b-83b4-7cb95ee31ad2
fonsp commented 3 years ago

Can you update Pluto and send a new example notebook?

lmiq commented 3 years ago

It woks fine now, thanks (with Pluto 0.15.1).

image