DOI: 10.6084/m9.figshare.14945412.v1
title: Computational Simulation of Optogenetic Stimulation via ChR2, ChR2-RED, or GtACR1 in patient-derived ventricular models - Example

description: #######################################################################Computational Simulation of Optogenetic Stimulation via ChR2,ChR2-RED, or GtACR1 in patient-derived ventricular models#######################################################################<br>Example prepared by Alexander Ochs and Patrick M. Boyle of the Cardiac Systems Simulation (CardSS) Lab at University of Washington<br>url: https://cardsslab.org/Alex: astute@uw.eduPat: pmjboyle@uw.eduDate: 2021-07-08<br>Available in perpetuity via fig share doi: <br>This accompanies a manuscript we expect to be published in FrontPhysiol, titled "Optogenetic stimulation using anion channelrhodopsin (GtACR1) facilitates termination of reentrant arrhythmias with low light energy requirements: a computational study"Study authors: Ochs AR*, Karathanos TV*, Trayanova NA, Boyle PM<br>Please cite this study if you re-use the code herein. Although we areunable to provide copies of the patient-specific atrial and ventricularmodels used for that study, the examples herein provide all the toolsanother lab might need to replicate or reproduce the computationalexperiments we conducted using other cardiac models.<br>#######################################################################Step 1: Download the attached simulation files and create models#######################################################################<br>The model has been tested using openCARP v6.0 compiled on various linuxsystems with default settings. It was also recently tested with acompiled version on Mac OSX. Only built-in components of the simulatorare used. openCARP is free to use for non-commercial applications, butuse of the simulator is governed by the terms of use outlined athttps://opencarp.org/<br>***********************************************************************Important note: to use this example, you MUST compile openCARP fromsource code using the DLOPEN = 1 flag in my_switches.def to enableloading of dynamically- compiled ionic models (via .model files)***********************************************************************<br>Syntax for compiling the IGtACR1.model file:$ [openCARP path]/make_dynamic_model.sh [absolute path to IGtACR1.model]<br>Example code:$ /Software/cme/openCARP/bin/make_dynamic_model.sh $(pwd)/IGtACR1.model<br>The patient-specific ventricular mesh used in this example is publiclyavailable from the following repository: https://bit.ly/3qZIAWA Linkshortened here to improve plaintext visibility. This model (along with23 others) has been shared with the community by the Cardiac ElectroMechanics Research Group (CEMRG) at King's College London, led by Dr.Steven Niederer. This is a superb contribution to the community and weare grateful to these researchers for making their models available.<br>If this work is re-used, please attribute the original source properly:Costa et al. Heart Rhythm. 2019 Oct;16(10):1475-1483. PMID: 30930329.<br>The specific file to be downloaded is: 11-mesh-uvc.vtk [73.4 MB]Please download this model to the directory where this README file islocated, then run the following commands to create a compatible mesh:<br>$ cat 11-mesh-uvc.vtk |awk -f vtk2carp_KCL-uvc.awk -v fn=11-mesh-uvc<br>You are now ready to run simulations!<br>#######################################################################Step 2: Run the simulations using a compiled version of openCARP#######################################################################<br>Run the following commands to simulate, in order, the application ofblue, red, and green wavelength illumination to ventricular modelsexpressing ChR2, ChR2-RED, and GtACR1:<br>$ [openCARP] +F Optogx_Example-Case-Sim_ChR2.par \ 2&gt;&1 |tee Optogx_Example-Case-Sim_ChR2.log$ [openCARP] +F Optogx_Example-Case-Sim_ChR2-RED.par \ 2&gt;&1 |tee Optogx_Example-Case-Sim_ChR2-RED.log$ [openCARP] +F Optogx_Example-Case-Sim_GtACR1.par \ -external_imp[0] $(pwd)/IGtACR1.so \ 2&gt;&1 |tee Optogx_Example-Case-Sim_GtACR1.log<br>^^ NOTE the additional command in the GtACR1 simulation to load the dynamically compiled model file!<br>Example parameter for placeholder variable:- [openCARP]: mpiexec -n 6 /Software/cme/openCARP/bin/openCARP.opt<br>Note that if the .so file is not properly compiled before running thiscode, the run will fail with potentially confusing error messages.<br>Each simulation will take 30-45 minutes each to run using 6 cores on astandard desktop computer. Using more cores (e.g., on a high-performancecomputing system) should speed this up quite significantly.<br>#######################################################################Step 3: Visualize the results using Meshalyzer (state files supplied)#######################################################################<br>Compile and install meshalyzer (also available via openCARP site).This version of the example has been tested with meshalyzer v3.0; ifyou use an older version, the visualization should still work but youmay see warnings at launch time regarding items in the .mshz file(these can generally be ignored).<br>Command to visualize attenuation factors for three stimuli:$ [meshalyzer] 11-mesh-uvc/11-mesh-uvc_r0 \ Attenuation-files/[illum].dat illum-log10.mshz<br>Command to visualize spatiotemporal vm evolution for three responses toelectrical followed by optogenetic stimuli:$ [meshalyzer] 11-mesh-uvc/11-mesh-uvc_r0 \ Optogx_Example-Case-Sim_[opsin]/vm.igb vm.mshz<br>Example parameters for placeholder variables:- [meshalyzer]: /Software/cme/meshalyzer/meshalyzer- [illum]: 11-mesh-uvc_r0-EndoIllum-0593um-log10_BLUE 11-mesh-uvc_r0-EndoIllum-1844um-log10_RED 11-mesh-uvc_r0-EndoIllum-0520um-log10_GREEN- [opsin]: ChR2 | ChR2-RED | GtACR1