0 votes
by (120 points)

Hello,

Running some tests with the O'Hara model provided in openCARP, I noticed that the difference between the endocardial and epicardial version of the model is much smaller than what is described in the original O'Hara paper

The epicardial action potential (AP) should be shorter than the endocardial AP (Figure 10F in the original paper). However, setting the celltype to 0 (endocardial AP) and 1 (epicardial AP) in the O'Hara model provided in openCARP results in APs that have very similar duration, asillustrated in the attached figure (top right corner). 

For comparison, I performed simulations in the Myokit version of the O'Hara model and there the endo-epicardial difference in AP is obvious (top left panel of the figure).

Comparing the endocardial and epicardial simulations in the O'Hara model from openCARP and Myokit (bottom panels), it seems the O'Hara model provided in openCARP does not correctly simulate epicardial AP.

I quickly checked the ion channel conductivities in the openCARP and Myokit versions of the model and they seem to be the same.

Can someone have a look at this? 

I ran all the simulations for N=100 beats with BCL = 1000 ms.

1 Answer

0 votes
by (1.4k points)

Hey, I have checked the endo and epi variants for 100 beats at 1000ms BCL and can't confirm your findings. I have a suspicion, but I need the commands you are using to simulate your results to confirm. Could you please paste the commands that you used here?

by (120 points)
Hello Tobias,

Thank you for your response. I run bench in a shell script using the following code:

BENCH=/path/to/my/openCARP/bench
IMP=OHara

DT=0.005        # Time step of solver
DT_OUT=0.01     # Time step of data file output
STIM_CURR=80    # Stimulus current
STIM_DUR=0.5    # Stimulus duration
STIM_START=10   # Stimulation start
NUM_STIM=101   # Number of stimuli
BCL=1000        # Burst cycle length
 

#IMP_PAR="celltype=0"   # ENDO
IMP_PAR="celltype=1"   # EPI
 

# Run the simulation
START_OUT=$(echo "($NUM_STIM - 1) * $BCL" | bc)
SIM_END=$(echo "$NUM_STIM * $BCL" | bc)

${BENCH} \
--imp=${IMP} \
--imp-par=${IMP_PAR} \
--dt=${DT} \
--dt-out=${DT_OUT} \
--numstim=${NUM_STIM} \
--bcl=${BCL} \
--stim-curr=${STIM_CURR} \
--stim-start=${STIM_START} \
--stim-dur=${STIM_DUR} \
--start-out=${START_OUT} \
--duration=${SIM_END} \
--fout=${OUTPUT_DATA} \

Thanks a lot in advance for your help!
by (1.4k points)

Ok, I think this confirms it. The celltype parameter is currently marked as a parameter that can be modified at runtime, but looking at the source code shows that it actually can't be modified directly. See the relevant part of the code here:

p->celltype = ENDO;

    if (0) ;

    else if (flag_set(p->flags, "ENDO")) p->celltype = ENDO;

    else if (flag_set(p->flags, "EPI")) p->celltype = EPI;

    else if (flag_set(p->flags, "MCELL")) p->celltype = MCELL;

 celltype gets overwritten as ENDO regardless of setting celltype=0/1/2. What works is to set --imp-par to "flags=ENDO/EPI/MCELL", e.g using --imp-par "flags=EPI" will currently activate the epicardial model properly. 

by (120 points)
Thanks a lot for your help! I always considered "celltype=0/1/2" as an equivalent syntax to "flags=ENDO/EPI/MCELL". This example clearly shows it's not the case

I'm glad to know the model works properly! What confused me is that after setting up "celltype=1", bench outputs "modifier: =1" for celltype, indicating that the parameter has been changed correctly (as EPI). Moreover, the AP shape after setting up "celltype=1" is slightly different compared to the default (ENDO) AP (as shown in the top right panel of my figure), which made me think the issue is somewhere else than in the celltype parameter being overwritten.

Do you have any idea why there is a difference between the default (ENDO) AP and the AP with "celltype=1"? If the celltype parameter gets overwritten, the APs (plotted in the top right panel of my first figure) should be identical, right?
by (20.1k points)

Moving this discussion to the issue tracker: openCARP#413

by (1.4k points)

You are not wrong to think celltype and those flags are equivalent, since they are. However, celltype is intended to be an internal variable and is not supposed to be exposed. That will be fixed soon I guess. 

I think you end up with a mix of both parameterizations in your case due to the call order of functions in bench. The code snippet I posted here before was from the parameter initialization. 

If you don't set the flags parameter the following happens: parameter initialization is called first with the info celltype = ENDO, so all exposed parameters (e.g. GK1, GKb, Gto etc.) are set to their endo values. Later we call the function that modifies values based on the --imp-par string. In your case that means you modify celltype by setting it to EPI, but all the conductances etc. set before stay as ENDO. During the computation everything else that involves celltype is now calculated with celltype = EPI, but using values for ENDO for all the exposed parameters.

Hope that makes sense :)

ago by (120 points)
OK, I see! I was directly modifying an internal model variable that should not be exposed while the intended use is to specify the ENDO/EPI/MCELL flag.

Thanks for providing me with the insights on what was happening under the hood and why the action potentials ended up being different. Yes, the explanation makes sense to me:)

Thanks a lot again!
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...