Exact Simulation Steps in Stochastic Simulation

45 views
Skip to first unread message

Evangelos Koutsouadis

unread,
May 11, 2015, 6:15:34 PM5/11/15
to copasi-u...@googlegroups.com
Dear COPASI team,

I have a simple question: is there any way to count/measure the exact simulation steps in a stochastic simulation (DM/NRM)?

exact simulation steps: the number of reactions occurred in order to reach the desirable duration (lab simulation time).

Thank you in advance.

Pedro Mendes

unread,
May 12, 2015, 4:18:37 AM5/12/15
to copasi-u...@googlegroups.com
Hello Evangelos,

yes there is a way, though it can be argued that it is not pretty...
Let's say you need to know the number of reaction events of this
reaction (let's call it R1):

A -> B

what you should do is to change the reaction to be:

A -> B + R1counter

where R1counter is just a dummy species that is used to count the
reaction events. You will need to make sure that R1counter is
initialized to 0 particles and, of course, that it does not take part in
any other reaction. At the end of the time course R1counter has the
number of reaction events that took place.

We are considering doing something like this "underneath the hood" such
that users could have direct access to reaction event counts.
Essentially this would be done for all reactions but would not show on
the front-end or in an exported SBML file. But we need to assess how
much use this would have (since it will cost us quite a bit of developer
time, which is a scarce resource!)

Hope this helps
Pedro
> --
> You received this message because you are subscribed to the Google
> Groups "COPASI User Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to copasi-user-fo...@googlegroups.com
> <mailto:copasi-user-fo...@googlegroups.com>.
> To post to this group, send email to copasi-u...@googlegroups.com
> <mailto:copasi-u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/copasi-user-forum/1fbde71d-02c5-4e00-9a34-0302e04111dd%40googlegroups.com
> <https://groups.google.com/d/msgid/copasi-user-forum/1fbde71d-02c5-4e00-9a34-0302e04111dd%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Pedro Mendes
Professor of Computational Systems Biology
School of Computer Science
Manchester Centre for Integrative Systems Biology
University of Manchester

Manchester Institute of Biotechnology
131 Princess Street
Manchester, M1 7DN, U.K.

Evangelos Koutsouadis

unread,
May 13, 2015, 10:44:03 AM5/13/15
to copasi-u...@googlegroups.com
Thank you very much Mr Pedro!
Although it's a smart solution for a small biomodel (R<50), i have some biomodels with more than 100 reactions and a benchmark biomodel with 1024 reactions.
I wish you add this feature to your simulator. Sometimes we need to know the total number of steps needed or even the "time step" of every reaction that occurred (eg when using First Reaction Method).

Bests.

Dante Kienigiel

unread,
Apr 13, 2025, 11:53:30 AMApr 13
to COPASI User Forum
Hey Pedro!
I'm wondering if something like this was ever implemented to avoid the "hack"? I have the "more general" issue of wanting to know which is the event that happened at a given time (from which it would then be easy to count). The alternative to what is proposed with the dummy species here is to do a .diff() over the species at each timestep, see which changed and infer which was the reaction which made the changes. This shifts compute from the simulation to post-processing, but is also very inefficient.
Best,
Dante

Message has been deleted

juergen

unread,
Apr 15, 2025, 2:45:10 AMApr 15
to COPASI User Forum
Hi Dante,
Unfortunately, we haven't implemented it yet. I will bring this up in the next COPASI developer meeting, to discuss how something like this could be implemented and whether we have the capacity atm actually to do it. Thank you for the reminder though!
Best wishes,
Juergen

juergen

unread,
Apr 15, 2025, 7:43:22 AMApr 15
to COPASI User Forum
Reply all
Reply to author
Forward
0 new messages