www.eu-eela.org e-science grid facility for europe and latin america fisiocomp - laboratory of...
TRANSCRIPT
www.eu-eela.org
E-science grid facility for Europe and Latin America
FISIOCOMP - Laboratory of Computational Physiology
Computer Science DepartmentUniversidade Federal de Juiz de Fora (UFJF)Juiz de Fora - MG - Brazil
Gustavo Miranda Teixeira
Ricardo Silva Campos
Heart Simulator
www.eu-eela.org
E-science grid facility for Europe and Latin America
Group
Professors
Prof. Rodrigo Weber dos Santos, Dr. Math. *Prof. Marcelo Lobosco, Dr. Comp. Sci. *Prof. Ciro Barros Barbosa, Dr. Comp. Sci.Prof. Rubens Oliveira, Dr. Eng.Prof. Luis Paulo Barra, Dr. Eng.Prof. Elson Toledo, Dr. Eng.
Master Students
Carolina XavierRonan M. AmorimFranciane Peters
* Grid team
Undergraduate Students
Caroline Costa
Gustavo Miranda *
Ricardo Campos *
Guilherme Montebrune
Former Master Students
Rafael Sachetto Oliveira
Fernando Otaviano Campos
Bernardo Rocha
Daves Martins
Ely Fonseca
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Overview
• Computational physiology• The heart• Heart models• Computational Framework• Inverse Problems• Gridification Goals
3
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Computational Physiology
• Physiology: The study of the (bio) functions
• Computational Physiology: The use and development of mathematical and computational models to describe biological functions
4
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Computational Physiology
• The bad news:
– It is a wide gap connecting multiple scales, genes, proteins, cells, tissues, organs...;
– multiple physics: quantum, molecular dynamics, chemistry, electro-mechanics…;
5
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Computational Physiology
• The models representation are based and depend on multiple and diverse data
MODEL
6
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
The Heart
7
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
The Heart
• The blood pump
• Cells contract changing the organ geometry and the blood is expelled
8
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
The Heart
• Cellular contraction:
– An electric potential difference develops across the cell membrane and triggers a chain of electrochemical reactions that results in cellular contraction (intracellular Calcium spike, ATP, etc)
9
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• The interior of the cells are connected by special proteins that allow the electric potential to propagate. A fast electric wave propagates and triggers heart contraction.
The Heart
10
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Models of Cardiac Electro-Mechanics
• Cardiac disease is the #1 cause of death in the globe (30%)
• Today, computational models of the heart provide a better understanding of the complex phenomenon and support the development of new drugs, therapies, biomedical equipments and clinical diagnostic methods
11
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• Bottom-up design– Sub-cellular and cellular mathematical models
Models of Cardiac Electro-Mechanics
12
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Models of Cardiac Electro-Mechanics
• Bottom-up design– Tissue mathematical models: electric activity
13
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Models of Cardiac Electro-Mechanics
• Bottom-up design– Tissue mathematical models: mechanical coupling
14
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Models of Cardiac Electro-Mechanics
• Bottom-up design– Organ modeling
15
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Introduction to cardiac modelling
• Two basic components:
• 1) A cell model that describes the electric behavior of a single cell;
• 2) A tissue model which describes how the cardiac electric wave propagates from one cell to another
16
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Cell model
• Bi-lipid layer:
• Ionic channels: Special arrangement of proteins cut thru the membrane and allow the flow of specific ions, such as Sodium, Potassium and Calcium.
cm
m
m
Idt
dq
dt
dC
qC
qC
Intracellular spaceExtracellular space
Ionic channel
17
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
e
i
Cm
IionIc
Cardiac cell models
• Hodgkin-Huxley based models• Membrane works as a capacitor, isolating charges• The ionic channel currents and the transmembrane
potential satisfy a set of ordinary differential equations
18
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Cell models
• Canine ventricular model: Beeler-Reuter (9 eqs)• Rabbit atrial model: Lindblad (27 eqs)• Rat ventricular model: Pandit et al (26 eqs)• Human atrial model: Nygren et al (30 eqs)• Simplified ventricular model based on FHN (2 eqs)• Guinea pig ventricular model: Luo-Rudy II (14 eqs)• Human atrial model: Courtemanche et al (20 eqs)
19
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Cardiac Bidomain Model
• Tissue Model for cardiac electrophysiology
• Intracellurar and extracellular spaces (domains) modeled from an electrostatic point of view
• The coupling of the two domains is via non-linear cell modeling. Total cell membrane current spreads to both intracellurar and extracellular spaces
20
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Cardiac Bidomain Model
21
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Complex Models
22
• Involves the coupling of several components (submodels) and data (geometry, biophysical parameters)
• Each component is a complex mathematical formulation, typically with tens of variables and hundreds of parameters
• New detailed models (components) are created and validated every week
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• Modeling Challenges: Multi-scale and Multiphysics
• Computational Challenges: Simulations are computationally expensive (one heart beat = a couple of days in a parallel machine)
• Integration Challenge: Patient Specific Heart Model
Complex Models
23
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Results
24
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• We have a 2D simulator
• We needed a computational framework that would facilitate, stimulate and broadcast the use and benefits of cardiac modeling.
• • The framework combines:
• The parallel simulator for bidomain-based models• Cluster Computing • An automatic code generator for models described by CellML• User-Friendly Graphical Interfaces• Web Server
Results
25
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
CellML
• XML based language
(machine-readable)
• Describes mathematical models (MathML)
• Repository contains over 300 biophysical models
• A model is described via the connection of units, variables and components, in a hierarchical fashion
26
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
CellML
• The goal:• Accelerating the development of new models
• Computational Frameworks and tools
• On the way:• Ontology and web semantic• Grid Computing
27
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• A couple of tools exist for edition, validation and simulation of models described in CellML
• Today two CellMl-based frameworks provide both cell and tissue level simulations:
• COR, a MS-Windows based environment, from the University of Oxford (cor.physiol.ox.ac.uk)
• AGOS, A web-based framework from FISIOCOMP-UFJF
CellML-based tools
28
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• Goal: Reach the biologists
• Computational Framework that hides many of the technical issues of cardiac modeling
Agos Framework
29
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• It provides support to cardiac electrophysiology modeling
• A editor to CellML language
• A translator of CellML code into C++ code
• A user-friendly Web form to setup parameters and visualize results
• Web Server
• Cluster Computing
The Computational Framework
30
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
• API Generator to ODE Solutions
• Cellular models are described in CellML/MathML
• It translates CellML code into a object oriented C++ code
• Through the API generated, it is possible to simulate the model and setup parameters
Agos Translator
31
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Tissue Model
32
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Inverse Problem
1. Forward Models of Cardiac Physiology
2. Inverse Problem
33
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Inverse Problem
• The forward problem– The user has to know all parameters, such as geometry
of the organ and values of conductivity– It returns the potential diference along the time and space
• Inverse problem– The user knows the potential diference– He or she may want calculate the geometry and all
another parameters
34
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Inverse Problems
• Estimate the values of electrical activity on the cardiac tissue
• Given a number of observed transmural electrograms estimate possible changes on the conductivity (,) of a known and specific region of the heart.
35
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Pathological Tissue Region with altered conductivity
(,)
• Motivation: focal variations of tissue conductivity values (both intra and extra) are observed in many different cardiac diseases:
• Acute ischemia, Infarct, Chagas Disease, Myocarditis
Inverse Problems
36
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Inverse Problem
• More computational costly than the foward problem
• It solves the forward problem lots of time sequentionally
• InvCell and InvTissue
37
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
INVCell
• We are adjusting a model which GA takes one day long to run.
• Asynchronous x Synchronous.– Heterogeneity x Homogeneity.
• It uses the AGOS API lots of times– ODEs are solved sequentionally
38
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
InvCell
• Genetic algorithm
– Based on Darwin’s evolutionary theory
– Aims to optmization (maximize/minimize)
– It works simulating the process of natural reproduction, mutation, and selecting the fittest individual
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
INVCell
• GA implementation:– The individuals are the parameters– We know the solution – calculated by the simulator– Each iteration gets more closer to the final solution– Parallel GA – master-slaves.– Floating point representation;– Elitist selection;– The initial population is randomly generated ;– A new generation depends of their parents;
40
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
INVTissue
• It solves an inverse problem associated to the simulation of cardiac tissue models.
• It also has an implementation of a Genetic Algorithm parallelized with MPI.
• It runs the simulator to each individual
• Quite slow!
41
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
INVTissue
• Investigate the solution of an inverse problem associated to cardiac electrophysiology
• The goal is to estimate values for the electrical conductivity of cardiac tissue, taking as known some information concerning the electrical activity of the heart
• Asynchronous non generational GA
• Parallelized using master-slave
42
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Goals
• Porting InvCell– It should be the easiest;
• Porting InvTissue– More complicated – lots of dependencies;
• Porting of a basic version of the Heart Simulator– Hardest problem;
43
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Goals
• The heart simulator uses :– C code– Petsc library – MPI
• Numerical methods to solve lots of equations
• Each iteration have lots of dependencies on the previous one
44
www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008
Questions …
45