stochastic parameter

351 views
Skip to first unread message

Hideki Oka

unread,
Nov 29, 2023, 11:16:20 PM11/29/23
to COPASI User Forum
Hello,

In stochastic simulation time steps are determined by random variables.
Is this all right ? If I set time duration and intervals for stochastic simulation,
output time intervals are constant values. It should be above variable time intervals I think.
Only duration should be assigned ?

Best regards,

Oka

Frank Bergmann

unread,
Nov 30, 2023, 3:22:38 AM11/30/23
to COPASI User Forum
Hello Oka, 

indeed the reaction events fire randomly. However, if you specify the output intervals at which you want the results, then you will get them in the regular interval specified (if no reaction event happened yet for a given output time, you would just get the 'old' (that is current unchanged) value for the corresponding particle number). If you want to see the irregular steps, you should tick the `automatic` checkbox, which results in you getting the actual times that the reactions fire. 

I hope this helps, 
best
Frank

Hideki Oka

unread,
Dec 6, 2023, 2:50:59 AM12/6/23
to COPASI User Forum
Thank you Bergmann,

H. M. Sauro, "Systems Biology: Introduction to Pathway Modeling", 2020, Ambrosias Publishing,
pp146-148,  6-5 Events at Regular Intervals
shows Technique for generating stochastic events on a regular grid.
COPASI also take the same algorithm ?

Best regards,

Oka

2023年11月30日木曜日 17:22:38 UTC+9 Frank Bergmann:

Frank Bergmann

unread,
Dec 6, 2023, 3:06:01 AM12/6/23
to copasi-u...@googlegroups.com
Hello Oka, 

I'm not sure it is the same algorithm, since i dont have the book available to me. But as said: if you define intervals / stepsize, the output will be on a regular grid (i.e. reactionEvents + padding till next output step). If you define `Automatic` stepsize, you will get the output at the reaction events only. 

best
Frank

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/fd6201b3-04b7-489c-88da-8e68d1406448n%40googlegroups.com.

Pedro Mendes

unread,
Dec 6, 2023, 7:58:36 AM12/6/23
to copasi-u...@googlegroups.com
Oka,

the best way to think about this is that the event generation and the
data output are two separate issues

1) the event generation happens on a stochastic time sampled from the
next reaction distribution; this updates the variables according to
which reaction happens

2) the output of data happens at regular times and simply reads the
current state of the variables and writes them out (or plots them)

So the simulation of the reaction events is always following the
Gillespie algorithm (basically sampling out from the next reaction
distribution).

If you do select "automatic" output then the variables are written to
files or plotted when events happen.

Pedro
> <mailto:copasi-user-fo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/copasi-user-forum/fd6201b3-04b7-489c-88da-8e68d1406448n%40googlegroups.com <https://groups.google.com/d/msgid/copasi-user-forum/fd6201b3-04b7-489c-88da-8e68d1406448n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/copasi-user-forum/CAEnSYuJ-BwpqcgRRwA-tN-NqwYbB-v0mY4SddZJD2qijZaGZYQ%40mail.gmail.com <https://groups.google.com/d/msgid/copasi-user-forum/CAEnSYuJ-BwpqcgRRwA-tN-NqwYbB-v0mY4SddZJD2qijZaGZYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
Pedro Mendes, PhD
Professor and Director
Richard D. Berlin Center for Cell Analysis and Modeling
University of Connecticut School of Medicine
group website: http://www.comp-sys-bio.org

Hideki Oka

unread,
Dec 9, 2023, 12:25:44 AM12/9/23
to COPASI User Forum
Dear Pedro,

Thank you for your comment.
I simply want to know how and what COPASI do when regular time intervals are given.
When someone wants to compare deterministic and stchastic solvers, he  uses the same intervals.
I wonder if this is not correct.
Automatic time steps are determined according to ratio of change and not by stochastic behavior, I think.

Best regards,

Oka

2023年12月6日水曜日 21:58:36 UTC+9 Pedro Mendes:

Hoops, Stefan (sh9cq)

unread,
Dec 9, 2023, 9:52:29 AM12/9/23
to copasi-u...@googlegroups.com
Hello Oka,

In the time course task the 'Intervals' are only used for reporting the
state of the system to the user. It has absolutely nothing to do with
the underlying simulation algorithm. I like to stress one more time
that the choice of the reporting times does not interfere with the
simulation at all at lest for any of the stochastic algorithms .

When you select 'automatic time step' the choice when to report is
delegated to the simulation algorithm. For the stochastic algorithms:
Gibson + Bruck
Direct Method

this means that every individual reaction event is reported to the user
and not as you stated:

> Automatic time steps are determined according to ratio of change and
> not by stochastic behavior, I think.

Thanks,
Stefan
--
Stefan Hoops, Ph.D.
Research Associate Professor
Biocomplexity Institute & Initiative
University of Virginia
995 Research Park Boulevard
Charlottesville, VA 22911

Phone: +1 540 570 1301
Email: sho...@virginia.edu

Hideki Oka

unread,
Dec 31, 2023, 11:55:03 AM12/31/23
to COPASI User Forum
Dear Stefan,

Can I see the source code of the stochastic model part ?
Source code from the download site includes the model code ?
I could not find it. Then, what can I do when I want to use my own model ?
Is there any reference or guide manual which explain source program structure ?

Best regards,

Oka

2023年12月9日土曜日 23:52:29 UTC+9 Hoops, Stefan (sh9cq):

juergen

unread,
Jan 1, 2024, 7:22:17 AMJan 1
to COPASI User Forum
Dear Oka,

As COPASI is an open-source software you can certainly look up all the inner workings at our github repo. The source code for our implementation of the Direct Method can, for instance, be found at:

Hope that helps!
Best regards,
Juergen

Hideki Oka

unread,
Jan 6, 2024, 9:39:02 PMJan 6
to COPASI User Forum
Dear Juergen,

Thank you for your comment. I found the program.
Then, I want to compile COPASI but met an error.

I am sorry I am a beginner in compiling COPASI.

Can I ask procedure of compiling COPAS is right way or not ?


My environment is 

Apple M1 Pro

OSX Venture 13.3.1

(May be Ubuntu is the same)


mkdir  /Users/oka/Desktop/copasi 


cd /Users/oka/Desktop/copasi


# COPASI Dependencies


git clone https://github.com/copasi/copasi-dependencies


git clone https://github.com/copasi/COPPASI


#cmake -DCOPASI_DEPENDENCY_DIR=<dir> <copasi source dir>


cmake -DCOPASI_DEPENDENCY_DIR=copasi-dependencies COPASI


#Is this correct ?

  

make  

make install


# Compiling COPASI


#git clone https://github.com/copasi/COPASI

mkdir build_copasi

cd build_copasi

cmake -DBUILD_GUI=OFF -DCMAKE_INSTALL_PREFIX=~/copasi -DCOPASI_DEPENDENCY_DIR=../copasi-dependencies/bin ../COPASI

make

make install 


At the copasi-dependencies, I met an error.

This cmake can make external libraries like libSBML ?


Best regards,


Oka


2024年1月1日月曜日 21:22:17 UTC+9 juergen:

Hideki Oka

unread,
Jan 9, 2024, 3:46:54 AMJan 9
to COPASI User Forum
"copasi-dependencies" is just compiled.
COPASI compile stopped at

CMake Error at CMakeModules/FindNATIVEJIT.cmake:19 (find_package):

  Could not find a package configuration file named "nativejit-config.cmake"

  provided by package "NATIVEJIT".


  Add the installation prefix of "NATIVEJIT" to CMAKE_PREFIX_PATH or set

  "NATIVEJIT_DIR" to a directory containing one of the above files.  If

  "NATIVEJIT" provides a separate development package or SDK, be sure it has

  been installed.

Call Stack (most recent call first):

  CMakeLists.txt:397 (find_package)


I will try more.


Oka

2024年1月7日日曜日 11:39:02 UTC+9 Hideki Oka:

Frank Bergmann

unread,
Jan 9, 2024, 4:11:22 AMJan 9
to COPASI User Forum
Please use the compile option `-DENABLE_JIT=OFF` as JIT is not currently supported on ARM processors. 

Best
Frank

Hideki Oka

unread,
Jan 10, 2024, 3:06:08 AMJan 10
to COPASI User Forum
Dear Bergman,

Thank you for your comment,
Mac is still a problem at make step.

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [copasi/CopasiSE/CopasiSE] Error 1

make[1]: *** [copasi/CopasiSE/CMakeFiles/CopasiSE.dir/all] Error 2

make: *** [all] Error 2


However, ubuntu 22.04 is all right.

CopasiSE is available, but can't run interrupted by license notice.

./CopasiSE --license

I read the contents.

Next what should I do cancelling license comment ?


Best regards,


Oka

2024年1月9日火曜日 18:11:22 UTC+9 Frank Bergmann:

Frank Bergmann

unread,
Jan 10, 2024, 3:15:04 AMJan 10
to COPASI User Forum
Unfortunately, you did not provide the complete error message from the Mac build. If you collect the entire output in a text file and send it to me, I'll be able to help. 

As for the Ubuntu machine, there you now compiled the command line version of CopasiSE. And you can use all the command line switches described here: 


the `--licence` argument does really just show the license and nothing else. 

best
Frank

Hideki Oka

unread,
Jan 11, 2024, 1:29:39 AMJan 11
to COPASI User Forum
Dear Frank,

Thank you for your help.
I will attach CMakeCashe.txt(in build_copasi directory) and monitor_output.

Command is as follows.
mkdir build_copasi
cd build_copasi
cmake  -DBUILD_GUI=OFF -DENABLE_JIT=OFF -DCMAKE_INSTALL_PREFIX=~/copasi -DCOPASI_DEPENDENCY_DIR=../copasi-dependencies/bin ../COPASI
make  (2 errors)
make install

My environment:
Apple M2
  OSX Ventura 13.5
gcc/g++   Apple clang 15.0.0

Ubuntu22.04 is successfully compiled.
I thought something output is displayed, but it is written to file by options.

Best regards,

Oka
2024年1月10日水曜日 17:15:04 UTC+9 Frank Bergmann:
mac-monitor-output.rtf
CMakeCache.txt

Frank Bergmann

unread,
Jan 11, 2024, 2:59:43 AMJan 11
to copasi-u...@googlegroups.com
Hello Oka,

this looks to me, that you have another libSBML in /usr/local/lib/, that is picked up instead of the one from the dependencies package. Unfortunately, libSBML is compiled without Layout / Render support. And so linking fails.  Setting: 

-Dsbml-static_DIR=/Users/oka/Desktop/copasi/copasi-dependencies/bin/lib/cmake

should make the build succeed. 

best
Frank
You received this message because you are subscribed to a topic in the Google Groups "COPASI User Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/copasi-user-forum/J7Ee5v9kULQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to copasi-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/b11dee11-9819-4a59-9efa-cdae01a3fb69n%40googlegroups.com.

Hideki Oka

unread,
Jan 11, 2024, 10:06:30 PMJan 11
to COPASI User Forum
Dear Frank,

Thank you for your advice.
I personally installed libSBML before. So I remove /usr/local/lib/(libSBML related files).
Then, copasiSE is generated. Thank you.
Next is graphical interface version which seems complicated.

Best regards,

Oka

2024年1月11日木曜日 16:59:43 UTC+9 Frank Bergmann:

Hideki Oka

unread,
Jan 12, 2024, 2:01:52 AMJan 12
to COPASI User Forum
Dear Frank,

Could you show me how to make graphical UI version (CopasiUI) ?
There are two README files on copasi-dependencies gitHub site, readme.md and readme_linux.md
and more on COPASI site. Which is correct ? I tried some but in vain.
Ubuntu and Mac are different ?

Best regards,

Oka
2024年1月12日金曜日 12:06:30 UTC+9 Hideki Oka:

Frank Bergmann

unread,
Jan 12, 2024, 2:39:09 AMJan 12
to COPASI User Forum
Hello Oka, 

the easiest way to build the GUI, would probably to use our build scripts: 


It contains all the scripts to setup  and build COPASI on different platforms. 

best
Frank

Reply all
Reply to author
Forward
0 new messages