27
By By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo Elsoud (National Research Center) Under the supervision of: Marina lyashko & Marina lyashko & SvetLana SvetLana Aksenova Aksenova Laboratory of Radiation Biology, Joint Institute for Nuclear 1

By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Embed Size (px)

Citation preview

Page 1: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

ByByAhmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt )Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt )Mostafa Abo Elsoud Mostafa Abo Elsoud (National Research Center)

Under the supervision of:

Marina lyashko & SvetLana Marina lyashko & SvetLana AksenovaAksenova Laboratory of Radiation

Biology,Joint Institute for Nuclear Research

1

Page 2: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

MATHEMATICA

What it can do for you ?

Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt )

2

Page 3: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Background

• Created by Stephen Wolfram and his team Wolfram Research.

• Version 1.0 was released in 1988.

• Latest version is Mathematica 8.0 – released last year.

Stephen Wolfram: creator of Mathematica

3

Page 4: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Q: What is Mathematica?A: An interactive program with a vast range of uses:- Numerical calculations to required precisionNumerical calculations to required precision- Symbolic calculations/ simplification of algebraic expressionsSymbolic calculations/ simplification of algebraic expressions- Matrices and linear algebraMatrices and linear algebra- Graphics and data visualisationGraphics and data visualisation- CalculusCalculus- Equation solving (numeric and symbolic)Equation solving (numeric and symbolic)- Optimization Optimization - StatisticsStatistics- Polynomial algebraPolynomial algebra- Discrete mathematicsDiscrete mathematics- Number theoryNumber theory- Logic and Boolean algebraLogic and Boolean algebra- Computational systems e.g. cellular automataComputational systems e.g. cellular automata

4

Page 5: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

StructureComposed of two parts:

• Kernel:

-interprets code, returns results, stores definitions (be careful)

• Front end:

- provides an interface for inputting Mathematica code and viewing output (including graphics and sound) called a notebook

- contains a library of over one thousand functions

- has tools such as a debugger and automatic syntax colouring

5

Page 6: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

More on notebooks

• Notebooks are made up of cells.

• There are different cell types e.g. “Title”, “Input”, “Output” with associated properties

• To evaluate a cell, highlight it and then press shift-enter

• To stop evaluation of code, in the tool bar click on Kernel, then Quit Kernel

6

Page 7: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Language rules• ; is used at the end of the line from which no

output is required• Built-in functions begin with a capital letter• [ ] are used to enclose function arguments• { } are used to enclose list elements• ( ) are used to indicate grouping of terms• expr/ .x y means “replace x by y in expr”• expr/ .rules means “apply rules to transform each

subpart of expr” (also see Replace)• = assigns a value to a variable• == expresses equality• := defines a function• x_ denotes an arbitrary expression named x

7

Page 8: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Language rules (2)

• Any part of the code can be commented out by enclosing it in (* *).

• Variable names can be almost anything, BUT - must not begin with a number or contain

whitespace, as this means multiply (see later) - must not be protected e.g. the name of an

internal function• BE CAREFUL - variable definitions remain until

you reassign them or Clear them or quit the kernel (or end the session).

8

Page 9: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Mathematica as a calculator• Contains mathematical and physical constants

e.g. i (Imag), e (Exp) and (Pi)• Addition +

Subtraction -

Multiplication * or blank space

Division /

Exponentiation ^• Can do symbolic calculations and simplification of

complicated algebraic expressions – see SimplifySimplify and FullSimplifyFullSimplify..

9

Page 10: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Calculus

• See D to Differentiate.

• Can do both definite and indefinite integrals – see Integrate

• For a numeric approximation to an integral use NIntegrate.

10

Page 11: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Equation solving

• Use Solve to solve an equation with an exact solution, including a symbolic solution.

• Use NSolve or FindRoot to obtain a numerical approximation to the solution.

• Use DSolve or NDSolve for differential equations.

• To use solutions need to use expr / .x y.

11

Page 12: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Creating your own functions

Plot3D equation “as example”Plot3D equation “as example”

12

Plot3DEvaluateX10 NA x1a1 t, Dz . sol1, t, 0, 150, Dz, 0.5, 100, PlotLabel Style"LexA", 16, ColorFunction "Aquamarine",

AxesLabel Style"мин.", 14, Black, Style"Дж м2", 14, Black, Style"N", 14, Black , LabelStyle DirectiveBlack Ticks 20,40,80,100, 0,20,40,60,80,100, 400,800,1300

Page 13: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

13

sol1 NDSolve Dx1t, Dz, t 1 k5^h1 1 k5 x1t, Dz ^h1 x1t, Dz 1 k6 x3t, Dz ,Dx2t, Dz, t 1 k7^h2 1 k7 x1t, Dz ^h2 x2t, Dz 1 k8 ODt, Dz k1 x3t, Dz,Dx3t, Dz, t k8 ODt, Dz x2t, Dz k1 x3t, Dz 1 x4t, Dz k9 x3t, Dz k1 x1t, Dz x3t, Dz,Dx4t, Dz, t k10 1 k11^h4 1 k11 x1t, Dz ^h4 x4t, Dz k12 x3t, Dz x4t, Dz k14 k13 x4t, Dz ^2,Dx5t, Dz, t k15 1 k16^h5 1 k16 x1t, Dz ^h5 k17 x7t, Dz x5t, Dz k18 x8t, Dz x5t, Dz k19 x9t, Dz x5t, Dz k20 x5t, Dz,Dx7t, Dz, t k24 x4t, Dz ^2 k25 x7t, Dz 0 k34 x5t, Dz x7t, Dz,Dx6t, Dz, t k12 x4t, Dz x3t, Dz k22 x6t, Dz ^2 k21 x8t, Dz x4t, Dz k23 x6t, Dz,Dx8t, Dz, t k22 x6t, Dz ^2 k21 x8t, Dz x4t, Dz k26 x8t, Dz 0 k35 x5t, Dz x8t, Dz,Dx9t, Dz, t k27 x4t, Dz x6t, Dz k21 x8t, Dz x4t, Dz k28 x9t, Dz 0 k36 x5t, Dz x9t, Dz, D x10t, Dz, t k29 x7t, Dz x5t, Dz k30 x10t, Dz,Dx11t, Dz, t k18 x8t, Dz x5t, Dz k31 x11t, Dz x4t, Dz k32 x11t, Dz, Dx12t, Dz, t k19 x9t, Dz x5t, Dz k31 x11t, Dz x4t, Dz k33 x12t, Dz,Dx13t, Dz, t k37 1 k39^h6 1 k39 x1t, Dz ^h6 x13t, Dz k38 x3t, Dz x13t, Dz k37, x10, Dz 1, x20, Dz 1, x30, Dz 0,

x40, Dz 1, x50, Dz 1, x70, Dz 1, x60, Dz 0, x80, Dz 0, x90, Dz 0, x100, Dz 1, x110, Dz 0, x120, Dz 0, x130, Dz 1, x1, x2, x3, x4, x5, x7, x6, x8, x9, x10, x11, x12, x13, t, 0, 20, Dz, 0.5, 100, MaxStepSize 0.8

NDSolve equation “as example”NDSolve equation “as example”

Page 14: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Graphics• Mathematica allows the representation of data in

many different formats:- 1D list plots, parametric plots- 3D scatter plots- 3D data reconstruction- Contour plots- Matrix plots- Pie charts, bar charts, histograms, statistical plots,

vector fields (need to use special packages)

• Numerous options are available to change the appearance of the graph.

• Use Show to display combined graphics objects

14

Page 15: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Taking it further

• Mathematica has an excellent help menu (shift-F1)

• Can get help within a notebook by typing? Function Name(e.g : NDSolve )

• Website:

http://www.wolfram.com/products/mathematica/index.html

• To use Mathematica for parallel programming, look up Grid Mathematica.

15

Page 16: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

The Basic Of Mathematical Modeling

The development of mathematical models of the genetic regulation and repair process in bacterial cells is caused by the necessity to study the structure and functioning of the genetic apparatusand biochemical mechanisms controlling the mutation process.

16

Page 17: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Experimental data

Sequence of Reactions

Reaction’s code

Run

Output

Results

Steps For Building Up The Model

17

Page 18: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

• All reactions were simulated using Mathematica software, using two approaches: 1. Stochastic approach

2. Deterministic approach

• Outputs we obtained, characterized DNA repair steps as well as enzyme’s concentration changes.

18

Page 19: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

19

Page 20: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Lex A protein

2D plotting for Lex A

3D plotting for Lex A

0 5 0 1 0 0 1 5 0 2 0 0tim e m in

2 0 0

4 0 0

6 0 0

8 0 0

1 0 0 0

1 2 0 0

1 4 0 0N 1 04

lex A

Blue 1 J /m2

Pink 5 J /m2

yellow 20 J /m2

Green 100 J /m2

20

Page 21: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Rec A protein

3D plotting for Rec A & Rec A*

Rec A* protein

21

Page 22: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

0 5 0 1 0 0 1 5 0 2 0 0tim e

1 0 0

2 0 0

3 0 0

4 0 0

5 0 0

NU m uD 2 'c

Blue 1 J /m2

Pink 5 J /m2

yellow 20 J /m2

Green 100 J /m2

min

min

22

UmuD’2C protein (pol V)

3D plotting for UmuD’2C

2D plotting for UmuD’2C

Page 23: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

DinI protein

2D plotting for DinI

min

3D plotting for DinI

0 5 0 1 0 0 1 5 0 2 0 0tim e

2 0 0

4 0 0

6 0 0

8 0 0N

D inI

Blue 1 J /m2

Pink 5 J /m2

yellow 20 J /m2

Green 100 J /m2

23

Page 24: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Using mathematical approaches1.The model adequately describes the

basic processes of the SOS response,2.we consider how this model could be

applied for the estimation of the mutagenic effect of UV irradiation and radiation,

3.A model of describing the dynamics of DinI- protein is developed,

 

24

Page 25: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

4. The role of the DinI-proteins in the basic life processes of cells during the formation of mutations is studied,

5. Graphs were obtained, characterizing the concentration dynamic of DinI-proteins over time and depending on the dose of UV irradiation 

25

Page 26: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Acknowledgments

o Dr. Oleg Belov, LRB, JINRDr. Oleg Belov, LRB, JINRoMarina lyashko Marina lyashko , , LRB, JINRLRB, JINRoSvetLana AksenovaSvetLana Aksenova , , LRB, JINRLRB, JINR

Page 27: By Ahmed Faramawy Ahmed Faramawy (T.A in ASU, Cairo, Egypt ) Hadeer ElHabashy Hadeer ElHabashy (T.A in AUC, Cairo, Egypt ) Mostafa Abo Elsoud Mostafa Abo

Thank You For Your Attention

“ “спасибо”спасибо”

27ДубнаДубна