Location: Single PASMC model (Gosak et al 2014) @ 225052a89a07 / Components / txt2cellml.ps1

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-05-03 15:39:40+12:00
Desc:
Update README.rst with runSim.psl
Permanent Source URI:
https://models.cellml.org/workspace/83f/rawfile/225052a89a07e1d4baee130b2d102cff2f5393f3/Components/txt2cellml.ps1

## Convert .txt to .cellml
# If this script cannot be loaded, type "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process" in the PowerShell terminal
# The OpenCOR installation folder path
$dpath= 'C:/Users/wai484/Documents/OpenCOR'
# The text file name
$txtfiles="JVOCCi", "JNCXi", "JSERCAi", "JCICRi", "JPMCAi", "Jleaki", "JNKAi","JCli","JKi","Para","Cai","Casr","Vm","PASMC"
# The model directory where .txt and .cellml are saved
$mpath='C:/Users/wai484/Documents/SinglePASMC/Components'
# Execute the command to do the conversion
foreach ($txtfile in $txtfiles)
{
  .$dpath/OpenCOR -c CellMLTextView::export $mpath/$txtfile.txt | out-file $mpath/$txtfile.cellml -encoding utf8
}

$mpath='C:/Users/wai484/Documents/SinglePASMC/Experiments'
.$dpath/OpenCOR -c CellMLTextView::export $mpath/PASMC_test.txt | out-file $mpath/PASMC_test.cellml -encoding utf8