|
11 | 11 | },
|
12 | 12 | {
|
13 | 13 | "cell_type": "code",
|
14 |
| - "execution_count": 1, |
| 14 | + "execution_count": 16, |
15 | 15 | "metadata": {
|
16 | 16 | "tags": []
|
17 | 17 | },
|
|
20 | 20 | "name": "stdout",
|
21 | 21 | "output_type": "stream",
|
22 | 22 | "text": [
|
23 |
| - "Using Cantera version: 2.6.0a4\n" |
| 23 | + "Using Cantera version: 2.6.0\n" |
24 | 24 | ]
|
25 | 25 | }
|
26 | 26 | ],
|
|
29 | 29 | "from ipywidgets import widgets, interact\n",
|
30 | 30 | "import cantera as ct\n",
|
31 | 31 | "import numpy as np\n",
|
| 32 | + "import graphviz\n", |
32 | 33 | "\n",
|
33 | 34 | "%matplotlib inline\n",
|
34 | 35 | "%config InlineBackend.figure_formats = [\"svg\"]\n",
|
|
50 | 51 | },
|
51 | 52 | {
|
52 | 53 | "cell_type": "code",
|
53 |
| - "execution_count": 2, |
| 54 | + "execution_count": 5, |
54 | 55 | "metadata": {
|
55 | 56 | "tags": []
|
56 | 57 | },
|
|
73 | 74 | },
|
74 | 75 | {
|
75 | 76 | "cell_type": "code",
|
76 |
| - "execution_count": 3, |
| 77 | + "execution_count": 6, |
77 | 78 | "metadata": {
|
78 | 79 | "tags": []
|
79 | 80 | },
|
|
91 | 92 | },
|
92 | 93 | {
|
93 | 94 | "cell_type": "code",
|
94 |
| - "execution_count": 4, |
| 95 | + "execution_count": 7, |
95 | 96 | "metadata": {
|
96 | 97 | "tags": []
|
97 | 98 | },
|
|
109 | 110 | },
|
110 | 111 | {
|
111 | 112 | "cell_type": "code",
|
112 |
| - "execution_count": 5, |
| 113 | + "execution_count": 8, |
113 | 114 | "metadata": {
|
114 | 115 | "tags": []
|
115 | 116 | },
|
|
130 | 131 | },
|
131 | 132 | {
|
132 | 133 | "cell_type": "code",
|
133 |
| - "execution_count": 6, |
| 134 | + "execution_count": 9, |
134 | 135 | "metadata": {
|
135 | 136 | "tags": []
|
136 | 137 | },
|
|
158 | 159 | },
|
159 | 160 | {
|
160 | 161 | "cell_type": "code",
|
161 |
| - "execution_count": 7, |
| 162 | + "execution_count": 10, |
162 | 163 | "metadata": {},
|
163 | 164 | "outputs": [
|
164 | 165 | {
|
165 | 166 | "data": {
|
166 | 167 | "application/vnd.jupyter.widget-view+json": {
|
167 |
| - "model_id": "e73efe770a6a424aab889d76a70ea2d4", |
| 168 | + "model_id": "e9eb8420e3d1441d8dacca916d65ccea", |
168 | 169 | "version_major": 2,
|
169 | 170 | "version_minor": 0
|
170 | 171 | },
|
171 | 172 | "text/plain": [
|
172 |
| - "interactive(children=(IntSlider(value=100, description='plot_step', max=1510, step=10), FloatSlider(value=0.1,…" |
| 173 | + "interactive(children=(IntSlider(value=100, description='plot_step', max=1730, step=10), FloatSlider(value=0.1,…" |
173 | 174 | ]
|
174 | 175 | },
|
175 | 176 | "metadata": {},
|
|
200 | 201 | " diagram.threshold = threshold\n",
|
201 | 202 | "\n",
|
202 | 203 | " diagram.show_details = details\n",
|
203 |
| - " dot_file = \"reaction_paths.dot\"\n", |
204 |
| - " png_file = \"reaction_paths.png\"\n", |
205 |
| - " diagram.write_dot(dot_file)\n", |
206 |
| - " subprocess.run(f\"dot {dot_file} -Tpng -o{png_file} -Gdpi=100\".split())\n", |
207 |
| - " img = Image(filename=png_file)\n", |
208 |
| - " display(img)" |
| 204 | + " graph = graphviz.Source(diagram.get_dot())\n", |
| 205 | + " display(graph)" |
209 | 206 | ]
|
210 | 207 | },
|
211 | 208 | {
|
|
218 | 215 | },
|
219 | 216 | {
|
220 | 217 | "cell_type": "code",
|
221 |
| - "execution_count": 8, |
| 218 | + "execution_count": null, |
222 | 219 | "metadata": {
|
223 | 220 | "tags": []
|
224 | 221 | },
|
|
240 | 237 | },
|
241 | 238 | {
|
242 | 239 | "cell_type": "code",
|
243 |
| - "execution_count": 9, |
| 240 | + "execution_count": null, |
244 | 241 | "metadata": {
|
245 | 242 | "tags": []
|
246 | 243 | },
|
|
274 | 271 | },
|
275 | 272 | {
|
276 | 273 | "cell_type": "code",
|
277 |
| - "execution_count": 10, |
| 274 | + "execution_count": null, |
278 | 275 | "metadata": {},
|
279 |
| - "outputs": [ |
280 |
| - { |
281 |
| - "data": { |
282 |
| - "application/vnd.jupyter.widget-view+json": { |
283 |
| - "model_id": "f389251a70744d52b493b85eae3e909f", |
284 |
| - "version_major": 2, |
285 |
| - "version_minor": 0 |
286 |
| - }, |
287 |
| - "text/plain": [ |
288 |
| - "interactive(children=(FloatSlider(value=0.01, description='annotation_cutoff', max=4.0, min=0.01), Output()), …" |
289 |
| - ] |
290 |
| - }, |
291 |
| - "metadata": {}, |
292 |
| - "output_type": "display_data" |
293 |
| - } |
294 |
| - ], |
| 276 | + "outputs": [], |
295 | 277 | "source": [
|
296 | 278 | "@interact(\n",
|
297 | 279 | " annotation_cutoff=widgets.FloatSlider(value=1e-2, min=1e-2, max=4, steps=10),\n",
|
|
348 | 330 | },
|
349 | 331 | {
|
350 | 332 | "cell_type": "code",
|
351 |
| - "execution_count": 11, |
| 333 | + "execution_count": null, |
352 | 334 | "metadata": {
|
353 | 335 | "tags": []
|
354 | 336 | },
|
|
374 | 356 | },
|
375 | 357 | {
|
376 | 358 | "cell_type": "code",
|
377 |
| - "execution_count": 12, |
| 359 | + "execution_count": null, |
378 | 360 | "metadata": {},
|
379 |
| - "outputs": [ |
380 |
| - { |
381 |
| - "data": { |
382 |
| - "application/vnd.jupyter.widget-view+json": { |
383 |
| - "model_id": "8a6a58db99d7422790a30e3f448189c2", |
384 |
| - "version_major": 2, |
385 |
| - "version_minor": 0 |
386 |
| - }, |
387 |
| - "text/plain": [ |
388 |
| - "interactive(children=(FloatLogSlider(value=1e-05, description='annotation_cutoff', max=-4.0, min=-5.0), Output…" |
389 |
| - ] |
390 |
| - }, |
391 |
| - "metadata": {}, |
392 |
| - "output_type": "display_data" |
393 |
| - } |
394 |
| - ], |
| 361 | + "outputs": [], |
395 | 362 | "source": [
|
396 | 363 | "@interact(\n",
|
397 | 364 | " annotation_cutoff=widgets.FloatLogSlider(\n",
|
|
437 | 404 | "name": "python",
|
438 | 405 | "nbconvert_exporter": "python",
|
439 | 406 | "pygments_lexer": "ipython3",
|
440 |
| - "version": "3.9.12" |
| 407 | + "version": "3.8.12" |
441 | 408 | },
|
442 | 409 | "widgets": {
|
443 | 410 | "application/vnd.jupyter.widget-state+json": {
|
|
528 | 495 | "description": "annotation_cutoff",
|
529 | 496 | "layout": "IPY_MODEL_b31e0f2f2acb403b83a084fb18495310",
|
530 | 497 | "max": 0.0001,
|
531 |
| - "min": 1e-06, |
| 498 | + "min": 0.000001, |
532 | 499 | "step": 0.1,
|
533 |
| - "value": 1e-06 |
| 500 | + "value": 0.000001 |
534 | 501 | }
|
535 | 502 | },
|
536 | 503 | "11d4490fa73f470fa12134bdbe95172f": {
|
|
791 | 758 | "description": "annotation_cutoff",
|
792 | 759 | "layout": "IPY_MODEL_cebcfa314a17448385e00d23be4e1132",
|
793 | 760 | "max": 0.0001,
|
794 |
| - "min": 1e-06, |
| 761 | + "min": 0.000001, |
795 | 762 | "step": 0.1,
|
796 |
| - "value": 1e-06 |
| 763 | + "value": 0.000001 |
797 | 764 | }
|
798 | 765 | },
|
799 | 766 | "549874ce98c54398bdb34b108c543913": {
|
|
941 | 908 | "description": "annotation_cutoff",
|
942 | 909 | "layout": "IPY_MODEL_410cc700779545278ab29d6bdb515078",
|
943 | 910 | "max": 0.0001,
|
944 |
| - "min": 1e-06, |
| 911 | + "min": 0.000001, |
945 | 912 | "step": 0.1,
|
946 |
| - "value": 1e-06 |
| 913 | + "value": 0.000001 |
947 | 914 | }
|
948 | 915 | },
|
949 | 916 | "6c48772d2156460e98f2d2e53d19ce7d": {
|
|
956 | 923 | "description": "annotation_cutoff",
|
957 | 924 | "layout": "IPY_MODEL_d46402fffd6243a58b1eab788b948adc",
|
958 | 925 | "max": 0.1,
|
959 |
| - "min": 1e-05, |
| 926 | + "min": 0.00001, |
960 | 927 | "step": 0.1,
|
961 |
| - "value": 1e-05 |
| 928 | + "value": 0.00001 |
962 | 929 | }
|
963 | 930 | },
|
964 | 931 | "6db5fd30b2f7461ca1cc5547b1330a98": {
|
|
1527 | 1494 | "description": "annotation_cutoff",
|
1528 | 1495 | "layout": "IPY_MODEL_466f3c1486704068ac57d20e554de8cf",
|
1529 | 1496 | "max": 0.1,
|
1530 |
| - "min": 1e-05, |
| 1497 | + "min": 0.00001, |
1531 | 1498 | "step": 0.1,
|
1532 |
| - "value": 1e-05 |
| 1499 | + "value": 0.00001 |
1533 | 1500 | }
|
1534 | 1501 | },
|
1535 | 1502 | "ce95d34031c1420abab17b1f372f6edc": {
|
|
0 commit comments