www.eu-eela.org e-science grid facility for europe and latin america fisiocomp - laboratory of...

45
www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade Federal de Juiz de Fora (UFJF) Juiz de Fora - MG - Brazil Gustavo Miranda Teixeira Ricardo Silva Campos Heart Simulator

Upload: marcia-powell

Post on 11-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 2: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 3: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 4: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 5: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 6: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 7: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008

The Heart

7

Page 8: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 9: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 10: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 11: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 12: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 13: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 14: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 15: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 16: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 17: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 18: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 19: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 20: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 21: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008

Cardiac Bidomain Model

21

Page 22: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 23: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 24: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008

Results

24

Page 25: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 26: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 27: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 28: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 29: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 30: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 31: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 32: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008

Tissue Model

32

Page 33: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 34: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 35: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 36: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 37: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 38: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 39: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 40: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 41: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 42: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 43: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 44: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

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

Page 45: Www.eu-eela.org E-science grid facility for Europe and Latin America FISIOCOMP - Laboratory of Computational Physiology Computer Science Department Universidade

www.eu-eela.eu Itacuruça (Brazil) , E2GRIS1, 2.11.2008 – 15.11.2008

Questions …

45