Location: cellLib @ c05a1749b300 / Scripts / readme.txt

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-05-03 15:18:13+12:00
Desc:
Seperate the setlim for plotExp.py; Update readme.txt
Permanent Source URI:
https://models.cellml.org/workspace/6bc/rawfile/c05a1749b3003de5c15cc530b579b4671106b978/Scripts/readme.txt

1. The documentation of Python support when using OpenCOR: https://opencor.github.io/user/pythonSupport.html#pythonsupport

2. Install a Python package (e.g, pandas) in PowerShell:
(1) Navigate to the OpenCOR installation folder, e.g., cd C:\Users\wai484\Documents\OpenCOR
(2) Type "./jupyterconsole.bat"
(3) !pip install pandas 
(4) Here is an example of command history:
    (venvCellML) PS C:\Users\wai484\Documents\OpenCOR> ./jupyterconsole.bat
    Jupyter console 6.0.0
    Jupyter kernel for OpenCOR
    !pip install pandas

3. The procedure of converting .txt file to .cellml in PowerShell:
(1) # The OpenCOR installation folder path
    $dpath= 'C:/Users/wai484/Documents/OpenCOR'
(2) # The model directory where .txt and .cellml are saved
    $mpath='C:/Users/wai484/Documents/SinglePASMC/Experiments'
(3) # Execute the command to do the conversion
    .$dpath/OpenCOR -c CellMLTextView::export $mpath/PASMC_test.txt | out-file $mpath/PASMC_test.cellml -encoding utf8

4. Run OpenCOR simulation using Python shell in PowerShell:
(1) # The OpenCOR installation folder path
    $dpath= 'C:/Users/wai484/Documents/OpenCOR'
(2) # The simulation Python script directory where the script is present
    $mpath='C:/Users/wai484/Documents/SinglePASMC/Simulation/src'
(3) # The simulation Python script
    $mfile='simFig4.py'
(4) # Run the simulation script using Python shell
    .$dpath/pythonshell.bat $mpath/$mfile