Traceinfo

Module: devtests.bidomain.traceinfo.run

Section author: Gernot Plank <gernot.plank@medunigraz.at>

Overview

This tutorial introduces to the basics of using the carpentry executable for simulating EP at the tissue and organ scale. Details on how to inquire input parameters are provided in the carpentry section of the manual.

In absence of pacemaker currents electrical stimulus currents must be supplied in order to depolarize tissue above the threshold to elicit a propagated action potential. The simplest way of initiating a propagating action potential is the use of a transmembrane stimulus, I_{\mathrm{tr}}. According to the definition in CARPentry supplying a positive I_{\mathrm{tr}} depolarizes the tissue, a negative I_{\mathrm{tr}} hyperpolarizes the tissue.

Experimental setup

To introduce definition and usage of transmembrane stimulus currents in CARPentry a simple experiment using a thin monolayer preparation was defined. The following input parameters are available to steer the experiment:

--duration    
              Duration of simulation (ms)

--S1-strength 
              pick transmembrane current stimulus strength in
              [uA/cm^2] (default is 20.)

--S1-dur     
              pick transmembrane current stimulus duration in [ms

Modeling subthreshold conditions

Experiment exp01 (subthreshold depolarizing stimulus)

We start with a longer stimulus lasting for 15 ms and gradually increase the stimulus strength until we achieve capture. This is equivalent to measuring one data point of a strength-duration curve to determine chronaxie and rheobase of our preparation.

./run.py --duration 20 --S1-strength 20. --S1-dur 15 --visualize

This weak current slowly depolarizes the membrane, but does not reach threshold. After the end of stimulation, the membrane returns to its resting state, as shown in Fig. 25.

../../_images/subthreshold_stim_response.png

Fig. 25 Membrane response to a subthresold depolarizing transmembrane stimulus.

Inspect the variation in membrane depolarization as a function of distance to the stimulus location by varying the vertex index in meshalyzer.

To understand how the stimulus definition is passed on to the simulator we inspect the command line generated by the script. For this sake run

./run.py --duration 20 --S1-strength 20. --S1-dur 15 --dry

The stimulus section of the command line is then

-num_stim 1 \                   # use one stimulus electrode
-stimulus[0].name S1 \
 \                              # pulse and type definition
-stimulus[0].stimtype 0 \
-stimulus[0].strength 250.0 \   
-stimulus[0].duration 2.0 \
 \                              # electrode definition (block)       
-stimulus[0].x0 -5050.0 \
-stimulus[0].xd 100.0 \
-stimulus[0].y0 -550.0 \
-stimulus[0].yd 1100.0 \
-stimulus[0].z0 -150.0 \
-stimulus[0].zd 300.0

Experiment exp02 (subthreshold hyperpolarizing stimulus)

We repeat exp01 with a negative transmembrane stimulus current.

./run.py --duration 20 --S1-strength 20. --S1-dur 15 --visualize

As the membrane behaves essentially only passively in the subthreshold regime we observe the same response symmetric to the resting potential, see Fig. 26

../../_images/subthreshold_stim_response_hyper.png

Fig. 26 Membrane response to a subthresold hyperpolarizing transmembrane stimulus.

Initiating action potential propagation

We repeat exp01 with a stronger transmembrane stimulus current of shorter duration. Peak sodium current is known to be around 250 \mu A/cm^2 and last for less than a millisecond. We chose a strength of 250 \mu A/cm^2 of 1 millisecond duration to achieve suprathreshold depolarization. Keep in mind that suprathreshold depolarization at the stimulus site does not automatically lead to a propagated response. The local membrane response at the stimulus location is shown in Fig. 27.

./run.py --duration 20 --S1-strength 100. --S1-dur 2 --visualize
../../_images/suprathreshold_stim_response.png

Fig. 27 Membrane response to a suprathresold depolarizing transmembrane stimulus.

Tests

traceinfo_serial_pt

Tags: FAST SERIAL

Checks:

  • Compare against stored reference: max_error(vm.igb)
  • Compare against stored reference: max_error(Trace_1000.dat)
  • Compare against stored reference: max_error(Trace_2000.dat)
  • Compare against stored reference: max_error(Trace_3000.dat)

Last run: 2024-02-29 01:04:13.699135, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:01.317581
ALL PASSED
  PASS max_error(vm.igb): 7.62939453125e-06
  PASS max_error(Trace_1000.dat): 1.391150021845533e-07
  PASS max_error(Trace_2000.dat): 8.246101401709893e-08
  PASS max_error(Trace_3000.dat): 1.253079999763429e-07

traceinfo_serial_petsc

Tags: FAST SERIAL

Checks:

  • Compare against stored reference: max_error(vm.igb)
  • Compare against stored reference: max_error(Trace_1000.dat)
  • Compare against stored reference: max_error(Trace_2000.dat)
  • Compare against stored reference: max_error(Trace_3000.dat)

Last run: 2024-02-29 01:04:15.055743, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:00.952794
ALL PASSED
  PASS max_error(vm.igb): 0.0
  PASS max_error(Trace_1000.dat): 5.002220859751105e-12
  PASS max_error(Trace_2000.dat): 4.007461029686965e-12
  PASS max_error(Trace_3000.dat): 2.9984903449076228e-12

traceinfo_parallel_pt

Tags: FAST PARALLEL

Checks:

  • Compare against stored reference: max_error(vm.igb)
  • Compare against stored reference: max_error(Trace_0.dat)
  • Compare against stored reference: max_error(Trace_1000.dat)
  • Compare against stored reference: max_error(Trace_2000.dat)
  • Compare against stored reference: max_error(Trace_3000.dat)

Last run: 2024-02-29 01:04:16.042670, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:00.697181
ALL PASSED
  PASS max_error(vm.igb): 7.62939453125e-06
  PASS max_error(Trace_0.dat): 7.178699990006976e-08
  PASS max_error(Trace_1000.dat): 1.391150021845533e-07
  PASS max_error(Trace_2000.dat): 8.2462008776929e-08
  PASS max_error(Trace_3000.dat): 1.253079999763429e-07

traceinfo_parallel_petsc

Tags: FAST PARALLEL

Checks:

  • Compare against stored reference: max_error(vm.igb)
  • Compare against stored reference: max_error(Trace_0.dat)
  • Compare against stored reference: max_error(Trace_1000.dat)
  • Compare against stored reference: max_error(Trace_2000.dat)
  • Compare against stored reference: max_error(Trace_3000.dat)

Last run: 2024-02-29 01:04:16.775052, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:00.625385
ALL PASSED
  PASS max_error(vm.igb): 7.152557373046875e-07
  PASS max_error(Trace_0.dat): 1.3539995791234105e-09
  PASS max_error(Trace_1000.dat): 8.189999789465219e-10
  PASS max_error(Trace_2000.dat): 3.808992232734454e-09
  PASS max_error(Trace_3000.dat): 2.0010020307381637e-09