Skip to content

denoptim-project/BasiCO-CSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run COPASI Microkinetics from CSV Files

This project is about creating a tool for building and and running microkinetic models BasiCO interface to COPASI. It ie meant as a shortcut to avoid the tedious generation of COPASI input and replace it with the generation of a CSV file that defined the reaction network and the associated free energy barriers.

WARNING: the majority of COPASI's settings are left to default, but this may not be appropriate for your application.

Overview

The script in src/run_time_course.py:

  • reads a reaction network, the reaction barriers (kcal/mol including any standard state correction), and the initial concentrations from CSV files. See under the examples folder for examples of these files.
  • creates reactions in a new COPASI model
  • computes and assigns forward/reverse rate constants with the Eyring-Polanyi equation
  • runs a time-course simulation to produce a virtual experiment
  • dysplay and/or saves results to time_course_results.csv and a plot to time_course_plot.png

Quick Start

conda env create -f environment.yml
conda activate devel_cps
python src/run_time_course.py

Command-Line Usage

Use the -h options to get the full list of available options.

python src/run_time_course.py \
  -r reactions.csv \
  -c initial_concentrations.csv
  -t 298.15 \
  -d 3600

Examples

  1. A model using the data from ACS Catal. 2019, 9, 6, 4804–4809 can be run as follows:
cd examples/Jaraiz_2019
python ../../src/run_time_course.py -r reactions.csv -c concentrations.csv -d 70000 -t 273.15 --show-plot species_to_plot

Note that a comparison of the results obatined from COPASI's GUI and those obtained here is available in the Jupyter notebook.

  1. A model built used the data published at ACS Catal. 2025, 15, 6, 4739–4745 can be created and run like this:
cd examples/Bo_2025
python ../../src/run_time_course.py -r reactions.csv -c concentrations.csv -d 3000 -t 350 --show-plot species_to_plot

Testing

python -m unittest discover -s tests -p "test_*.py"

License

Apache-2.0 (see LICENSE).

About

Tricks to use COPASI from CLI and CSV files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages