HOME OF THE BARCELONA (UPC-DFA-EPSEB) HUMAN ATRIAL MODEL
This repository contains source codes to produce:
The results of the human atrial cell model reported in the article: Are SR Ca content fluctuations or SR refractoriness the key to atrial cardiac alternans?: insights from a human atrial model (DOI: 10.1152/ajpheart.00515.2013)
The code to produce results in tissues by defining domains of alternating-non alternating cells and by coupling the membrane potential of each unit. Also, some scripts for creating python movies in one and two dimensions are provided.
It is composed by four files:
An updated version of the gsl library alongside installation instructions can be obtained at: http://www.gnu.org/software/gsl
Here it is only distributed for completeness, because the code heavily relies on the library, so it should be installed in your system.
Once you have extracted the files in the compressed file you will find:
The parameters chosen to produce the sample results are:
All the output files consist of three columns which correspond to time, healthy cell and alternating cell signals respectively.
The codes does not starts writin outputs until a number of iterations are first calculated, so it only prints values closer or at the stationary state.
The script 'atriacompile' executes the line:
$cc -I/usr/local/include -o AtrialCell UPCatrialCell.c -L/usr/local/lib -lgsl
-lgslcblas -lm
If the installation paths of the library are different they can be found by executing:
$gsl-config --libs --cflags
If the code links and compiles correctly it generates the file: AtrialCell
,
which should
be run in a terminal as:
$ ./AtrialCell
This contains a fortran source UPC-ATRIALCELL.f
and a binary file check.dat
.
To compile the code type in UNIX/MAC OS, type in a terminal:
$gfortran -o exfilename sourcefilename.f
then run:
$./exfilename
The binary file check.dat
is read at the beginning of the execution and it
contains the initial data obtained for
Ts=1000 ms which are then evaluated for other pacing values (Tsvalue). Then,
the outcomes are written in another binary file called output.dat.Tsvalue
.
It also writes standard text files for the time evolution of the voltage and
every Calcium concentration
(volt.dat.Tsvalue
) and a file with the action potential duration APD(DI)
(rest0dss.dat
).
The tissues code provided is written in C only. This part of the project is contained in a folder called TISSUEMODEL. It contains:
The first two files are the source code and the compilation script. Again it relies heavily on the GNU scientific library and it must be excecuted as:
$./atriacomiple
which executes:
$cc -I/opt/local/include/ -o AtrialTissue UPCatrialtissues.c -L/opt/local/lib -lgsl -lgslcblas -lm -fno-stack-protector
This creates the excecutable file AtrialTissue. The excecution of that file first runs the single cell version of the code for two cells, one alternating and one healthy, which states are copied into the predetermined domains established in the code (function inicond2()).
The default configuration is Lx=300 and Ly=250. and a circle centered at ix=110 and iy=74 of radius Ly-20. the cellular lengths are taken to be 0.025 micrometers.
The code stores pictures of the system at "snaps/tnCai.dat" and "snaps/tnVm.dat", so it is required to have a folder called 'snaps' in the excecution path. The code accepts random number seed environmental variables to create stochastic media (Some code is in the source commented).
The python scripts read configurations from "../snaps" and create movies, providing To and Tf, values for the initial and final times, this is discussed in more detail at my blog
Please do not hesitate to contact me for assistance.
Cheers!.