-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbiopro.kv
155 lines (126 loc) · 2.84 KB
/
biopro.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<SmoothButton@Button>:
background_color: (0,0,0,0)
backgornd_normal:''
back_color: (1,0,1,1)
border_radius: [18]
canvas.before:
Color:
rgba: self.back_color
RoundedRectangle:
size: self.size
pos: self.pos
radius: self.border_radius
<GreenLayout@BoxLayout>:
background_color: 1, 0, 1, 1
canvas:
Color:
rgba: 0,0.9,0.5,0.3
RoundedRectangle:
size: self.size
pos: self.pos
<BlueLayout@BoxLayout>:
background_color: 1, 0, 1, 1
canvas:
Color:
rgba: 0,0.9,1,0.4
RoundedRectangle:
size: self.size
pos: self.pos
<CalcBoxLayout>:
id: BioProTool
orientation: 'vertical'
spacing: 5
BlueLayout:
size_hint: (1,None)
Label:
id: Main_text
font_size:40
text: 'BioProTool'
BoxLayout:
spacing: 5
BoxLayout:
spacing: 5
orientation: 'vertical'
GreenLayout:
Label:
text:"Substrate (Glc,Glyc,Ac)"
GreenLayout:
Label:
text:"[S] g/L"
GreenLayout:
Label:
text:"[X] g/L"
GreenLayout:
Label:
text:"[P] g/L"
GreenLayout:
Label:
text:"Time h"
BoxLayout:
BoxLayout:
orientation: 'vertical'
spacing: 5
BoxLayout:
TextInput:
id: entry
font_size: 16
multline: False
write_tab: False
BoxLayout:
TextInput:
id: entry1
font_size: 16
multline: False
write_tab: False
BoxLayout:
TextInput:
id: entry2
font_size: 16
multline: False
write_tab: False
BoxLayout:
TextInput:
id: entry3
font_size: 16
multline: False
write_tab: False
BoxLayout:
TextInput:
id: entry4
font_size: 16
multline: False
write_tab: False
BoxLayout:
size_hint: (1,0.25)
spacing: 5
SmoothButton:
text:'Solve'
on_press :
cell_system = root.Monod_basic(entry.text,float(entry1.text),float(entry2.text),entry3.text)
cell_system.solve(int(entry4.text))
cell_system.plot()
back_color: 0,0.9,1,0.4
BoxLayout:
size_hint: (1, None)
spacing: 5
BoxLayout:
orientation:'vertical'
spacing: 5
TextInput:
id: entry5
font_size: 16
multline: False
write_tab: False
SmoothButton:
text:'Export Data'
on_press :
cell_system = root.Monod_basic(entry.text,float(entry1.text),float(entry2.text),entry3.text)
cell_system.solve(int(entry4.text))
table_sol= cell_system.data_frame(col_name=['Time h','[X]','[S]','[P]'],data_table= list(zip(cell_system.t,cell_system.sol[:,0],cell_system.sol[:,1],cell_system.sol[:,len(cell_system.sol[0])-1])))
table_sol.to_excel(entry5.text + '.xlsx')
back_color: 0,0.9,1,0.4
SmoothButton:
size_hint: (1, None)
text:'New'
on_press : entry.text, entry1.text, entry2.text,entry3.text, entry4.text,entry5.text='','','','','',''
back_color: 0,0.9,1,0.4