DOI: 10.6084/m9.figshare.14945412
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.edu Pat: pmjboyle@uw.edu Date: 2021-07-08 <br> Available in perpetuity via fig share doi: <br> This accompanies a manuscript we expect to be published in Front Physiol, 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 are unable to provide copies of the patient-specific atrial and ventricular models used for that study, the examples herein provide all the tools another lab might need to replicate or reproduce the computational experiments 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 linux systems with default settings. It was also recently tested with a compiled version on Mac OSX. Only built-in components of the simulator are used. openCARP is free to use for non-commercial applications, but use of the simulator is governed by the terms of use outlined at https://opencarp.org/ <br> *********************************************************************** Important note: to use this example, you MUST compile openCARP from source code using the DLOPEN = 1 flag in my_switches.def to enable loading 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 publicly available from the following repository: http://bit.ly/3J8CCMk Link shortened here to improve plaintext visibility. This model (along with 23 others) has been shared with the community by the Cardiac Electro Mechanics Research Group (CEMRG) at King's College London, led by Dr. Steven Niederer. This is a superb contribution to the community and we are 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 is located, 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 of blue, red, and green wavelength illumination to ventricular models expressing 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 this code, the run will fail with potentially confusing error messages. <br> Each simulation will take 30-45 minutes each to run using 6 cores on a standard desktop computer. Using more cores (e.g., on a high-performance computing 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; if you use an older version, the visualization should still work but you may 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 to electrical 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