Published February 29, 2024 | Version 1.0
Dataset Open

Atrial Models with Personalized Effective Refractory Period

  • 1. ROR icon Karlsruhe Institute of Technology
  • 2. ROR icon University of Oxford
  • 3. ROR icon Städtisches Klinikum Karlsruhe


Impact of Effective Refractory Period Personalization on Prediction of Atrial Fibrillation Vulnerability

Authors: Patricia Martínez Díaz, Christian Goetz, Albert Dasi, Laura Anna Unger, Annika Haas, Olaf Dössel, Armin Luik, Axel Loewe /
This dataset contains 7 atrial meshes, 6 left atria and 1 right atrium, derived from electroanatomical mapping and measurements of the effective refractory period (ERP), bipolar voltage (bi) and local activation times (lat). The meshes include annotations and fibers and are ready for simulations in the cardiac electrophysiology simulator openCARP. We also provide the code to reproduce 272 reentries by reading the selected parameters.par and state.roe files. The meshes were generated using AugmentA code and the simulated reentries were induced following the PEERP protocol by Azzolin et al. 

Folder structure

The code is located in the `src` folder, the meshes in the `data` folder and the reentries in the `results` folder.  
   |-- element_tag.csv
   |-- al_mk_H.par
   |-- requirements.txt
   |-- meshes/
       |-- P1/  
              |-- P1_with_erp_lat_bi.vtk 
              |-- ERP.pts
              |-- ERP_values.txt
              |-- ablation.pts
              |-- LA_stim_points_2cm.pts
              |-- bilayer/
              |-- nodal_adjustment/
                 |--PARAMETER_SCENARIO.adj (e.g. Gto_continuous.adj)
       |-- P7   
       |-- MESH_SCENARIO_CV/ (e.g P1_continuous_0.3) 
              |-- point_X_beat_Y
       |-- MESH_SCENARIO_CV_PERTURBATION_SET/ (e.g P1_continuous_0.7_2_1) 
              |-- point_X_beat_Y                                  
  • `src`: contains the source files needed to run PEERP protocol
    • `` This is the main function to run the pacing protocol (not needed to run if reentries are only reproduced, check
    • `` Contains a list of pacing protocols. The PEERP protocol is included here
    • `` Extract the stimulation points
    • `element_tag.csv` Region tag numbering
    • `al_mk_H.par` Par file with ionic scaling factors for three states; H:Healthy, M:Mild, S:Severe
    • `requirements.txt` Packages to create the virtual enviroment. (This was my output of ```pip3 list> requirements.txt```)
    • `` Reentries can be reproduced given a selected folder where the .par and .roe files are stored.
  • `data`: contains the `meshes` folder with the bilayer meshes in openCARP (.elem, .lon and .pts) and .vtk format. Synthetic fibrotic distributions are included in the the .regele files.
    • `meshes/P1/P1_with_erp_lat_bi.vtk` Mesh with ERP, LAT and bipolar voltage data
    • `meshes/P1/ERP_values.txt/` measured ERP data
    • `meshes/P1/ERP.pts/` electrode coordinates where ERP data was measured
    • `meshes/P1/ablation.pts/` electrode coordinates where tissue was ablated
    • `meshes/P1/LA_stim_points_2cm.pts` Stimulation points for the PEERP protocol
    •  `meshes/P1/bilayer/LA_bilayer_with_fiber_slow_conductive.regele` Element ids corresponding to regions of low voltage (< 0.5mV)
    • `meshes/P1/bilayer/LA_bilayer_with_fiber_scar.regele` Element ids corresponding to regions of low voltage (< 0.1mV)
    • `meshes/P1/bilayer/LA_bilayer_with_erp_regions_um.vtk` Bilayer mesh with a discrete split where each region has a single ERP value
    • `meshes/P1/bilayer/LA_bilayer_with_fiber_with_fibrosis.vtk` Bilayer mesh with fibrosis informed by low voltage areas
    • `meshes/P1/bilayer/LA_bilayer_with_erp_continuous_um.vtk` Bilayer mesh with a continuous ERP distribution by interpolation of measured ERP data
    • `meshes/P1/bilayer/LA_bilayer_with_erp_continuous_2ms_um.vtk` Bilayer mesh with a continuous ERP distribution by interpolation of measured ERP data with +- 2ms perturbation

We studied 7 different scenarios: 

  1. Monoregion scenario with no ERP personalization, where all nodes had the same ERP
  2. Control scenario with no ERP personalization, where ERP nodes of certain defined anatomical regions where modified as reported in Loewe et al. 2015  
  3. Regional scenario with ERP personalization, where each region had a single ERP value derived from clinical measurement
  4. Continuous scenario with ERP personalization, where the ERP distribution was generated by interpolation of measured ERP data
  5. Control scenario with fibrosis, where elements corresponding to regions of low voltage (bi<0.5 mV) where set as slow or non conducing elements
  6. Continuous scenario with fibrosis, where elements corresponding to regions of low voltage (bi<0.5 mV) where set as slow or non conducing elements
  7. Continuous scenario where ERP measurements with additional perturbation draw from a uniform distribution. The perturbations were 2,5,10 and 20 ms, and we repeated this set 5 times for P6

In summary, we provide the following data: 

  • 7 meshes for openCARP simulations
  • 7 meshes in vtk format with continuous ERP distribution
  • 27 meshes in vtk format with continuous ERP distribution with perturbed ERP with 2,5,10 and 20ms from a random uniform distribution
  • 7 meshes in vtk format with regional ERP
  • 7 meshes in vtk format with ERP, LAT and bipolar voltage
  • 7 ablation set points
  • 7 ERP set points with their corresponding values
  • 209 reentries generated under 4 ERP scenarios (monoregion, control,regional,continuous) run with a conduction velocity of 0.7 0.5 and 0.3 m/s
  • 26 reentries generated under 2 scenarios ERP+Fibrosis (control + continuous) run with a conduction velocity 0.3 m/s
  • 37 reentries induced with continuous ERP for patient P3 @CV 0.3 for the sensitivity analysis 

Create a dynamic Courtemanche model

As we will modify the ionic parameters on a nodel basis you will need to create a dynamic Courtemanche model and then declare the variables (ionic conductances) you need to modify. In your openCARP installation folder, go to the `limpet` copy the Courtemanche.model file

cd openCARP/physics/model/limpet
cp Courtemanche.model Courtemanche_nodal.model
vim Courtemanche_nodal.model

Then add on top the parameters that need to be modified on a nodal-basis:

group {
  GK1           ;
  Gto           ;
  GKr           ;
  GKs           ;
  GCaL          ;
  factorGKur    ;
  maxINaCa      ;
  maxIpCa       ;
} .nodal();


Then you would need to recompile openCARP. In the terminal, go to your openCARP's top level folder:
cd openCARP/ 

Configure CMake with updated imp_list.txt via:
cmake -S. -B_build -DUPDATE_IMPLIST=ON

Run the CMake building process:
 cmake --build _build
 This will generate the `.h` and `.cc` files for your dynamic model inside `physics/limpet/src/imps_src`

**Note:** If you want to add or modify a model file after openCARP was compiled, it is possible to first clean the previous generated files during compilation by running `make clean` before recompiling openCARP.

If you compile your own version of openCARP, then you can modify the settings.yaml file, to point to your openCARP version with the dynamic model.
cd .config/carputils
subl settings.yaml  
Add the build name:

    CPU: /Users/lm104/Documents/OpenCARP/opencarp/_build/bin
    NODAL: /Users/lm104/Documents/OpenCARP/openCARP_nodal_adj/_build/bin
You can check that the new dynamic model is there by calling bench
bench -—list-imps
bench —-imp Courtemanche_nodal  --imp-info

You can find additional information about dynamic models here.

Reproduce the reentries 

You can generate the .igb file of a specific reentry by selecting the corresponding folder in the results directory. An example is given to reproduce the reentry in P1_bi_M_LA/point_0_beat_2/reproduce_reentry.igb. Select the folder `--par_file_directory`and set `--tend` to define the duration of the simulation in miliseconds.
_HINT: We recommend keeping the folder structure so that the other parameters, such as: mesh, scenario, state and chamber, can be read from the --par_file_directory. Otherwise, the meshes and results directories need to be modified._
cd src/  --par_file_directory ../results/P1_bi_M_LA/point_0_beat_2 --tend 1500

Preparation before running the PEERP pacing protocol

Follow the next steps if you want to run the PEERP pacing protocol, either for the provided meshes or for your own meshes. To run the PEERP protocol in a controlled environment, it is recommended, before running the, to create a virtual environment. Go to your terminal and type: 
cd src/
python3 -m venv ./myEnv
source ./myEnv/bin/activate
pip3 install -r requirements.txt
You need to add carputils to your `PATH`. You can run the code in the terminal or use and IDE to debug the code. 
Note: I am using PyCharm 2020.3. and in Settings --> Python interpreter --> show all and then in the (+) symbol, add the path to carputils there:
Otherwise you can add this extra lines at the beginning of ```:
# Replace '/path/to/carputils' with the actual path to your carputils package
carputils_path = '/path/to/carputils'
# Add the carputils path to sys.path

Run the PEERP protocol

The following example runs the PEERP from a single stimulation point. If you want to run PEERP over all the points, simply add the flag --run_all_points 1 
cd src/
python3 --giL 0.4166 --geL 1.458 --cv 0.8 --mesh monoatrial --protocol PEERP --pacing 122718 --stim_file LA_stim_points.txt --geometry LA_bilayer_with_fiber_um --cell_bcl 500 --model Courtemanche --ionic_prop_file al_mk_S.par --max_n_beats_PEERP 1 --overwrite-behaviour overwrite

Running your own experiment and making your own changes

Extract the stimulation points on your mesh, where the PEERP protocol will be run: 
python3   --mesh monoatrial --tolerance 20000 --stim_file LA_stim_points.txt --chamber LA
Tune conduction velocity (CV) and conductivites. The code expects the intracellular end extracellular longitudinal conductivity values as an input. We used `tuneCV` to fit CV=0.7m/s with dx=0.4mm and dt=20us
If you want to adjust the values, run in the terminal:
tuneCV --resolution 400 --model Courtemanche --velocity 0.7 --converge True --sourceModel monodomain --surf True --dt 20
You can provide the location of the start of the activation by selecting the desired point ID:
- Load the mesh in Paraview (or Meshalyzer)
- click on the ? symbol
- save the ID and change the `--pacing` argument 
Call `` with a new mesh. The protocol starts by prepacing the mesh and then using the last beat as initial condition tu run the PEERP.
Be aware that for a monoatrial mesh you might need to give the new id for the location of the earliest activation. Change `12345` to your desired point ID.
python3 --mesh newMesh --pacing 12345 --protocol prepace --stim_file LA_stim_points.txt
Run the protocol with different electrical remodelling stage. You can change the .par file or select one file from the three provided: 
python3 --mesh newMesh --pacing 12345 --protocol PEERP --stim_file LA_stim_points.txt --args.ionic_prop 'l_mk_M.par'
You can also try to run a biatrial example. The biatrial mesh is also provided. You need to extract the points on the RA surface using ``, to run the RA experiment: 
cd src
python3   --mesh biatrial --tolerance 20000 --stim_file RA_stim_points.txt --chamber RA
Then run PEERP twice, one per each chamber:
python3 --mesh biatrial --geometry LA_RA_bilayer_with_fiber --pacing 12345 --stim_file LA_endo_2cm.txt --args.ionic_prop 'l_mk_M.par'
python3 --mesh biatrial --geometry LA_RA_bilayer_with_fiber --stim_file LA_stim_points.txt --args.ionic_prop 'l_mk_M.par'




Files (7.0 GB)

Name Size Download all
1.6 GB Preview Download
4.9 kB Download
7.6 kB Preview Download
5.4 GB Preview Download
36.4 kB Preview Download

Additional details

Related works

Is described by
Conference proceeding: 10.1093/europace/euad122.542 (DOI)


PersonalizeAF – Personalized Therapies for Atrial Fibrillation. A Translational Approach 860974
European Commission
Leibniz ScienceCampus "Digital Transformation of Research'" DiTraRe
Leibniz Association