|
35 | 35 | "text": [ |
36 | 36 | " % Total % Received % Xferd Average Speed Time Time Time Current\n", |
37 | 37 | " Dload Upload Total Spent Left Speed\n", |
38 | | - "100 3092k 100 3092k 0 0 432k 0 0:00:07 0:00:07 --:--:-- 501k\n", |
| 38 | + "100 3092k 100 3092k 0 0 1588k 0 0:00:01 0:00:01 --:--:-- 1587k\n", |
39 | 39 | "Archive: abfe_results.zip\n", |
40 | 40 | " inflating: abfe_results/README.md \n", |
41 | 41 | " inflating: abfe_results/abfe_results_single_unit/results_2/1.json \n", |
|
53 | 53 | "!unzip -o abfe_results.zip" |
54 | 54 | ] |
55 | 55 | }, |
| 56 | + { |
| 57 | + "cell_type": "markdown", |
| 58 | + "id": "0e15f538-1471-440f-b590-866a2258f0c7", |
| 59 | + "metadata": {}, |
| 60 | + "source": [ |
| 61 | + "## Analysing results from the command line\n", |
| 62 | + "\n", |
| 63 | + "The quickest way to get free energies out of your `openfe quickrun` results is\n", |
| 64 | + "`openfe gather-abfe`, which reads the result JSON files and prints a report\n", |
| 65 | + "directly. The default `--report dg` gives the overall binding free energy per\n", |
| 66 | + "ligand; `--report raw` gives the per-leg (complex and solvent) values. Add\n", |
| 67 | + "`-o out.tsv` to write a tab-separated file instead of printing, and\n", |
| 68 | + "`--allow-partial` to skip incomplete edges with a warning.\n", |
| 69 | + "\n", |
| 70 | + "*Note: `openfe gather-abfe` is currently experimental and may change in a future\n", |
| 71 | + "openfe release. It will also print an experimental-feature warning to stderr.*" |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + "cell_type": "code", |
| 76 | + "execution_count": 2, |
| 77 | + "id": "7bb3c09c-4aff-4e6a-9b39-4d0318b2a71b", |
| 78 | + "metadata": {}, |
| 79 | + "outputs": [ |
| 80 | + { |
| 81 | + "name": "stdout", |
| 82 | + "output_type": "stream", |
| 83 | + "text": [ |
| 84 | + "\u001b[33mWARNING! Gathering of ABFE results with `openfe gather-abfe` is an experimental feature and is subject to change in a future release of openfe.\u001b[0m\n", |
| 85 | + "┌────────┬───────────────┬────────────────────────────────┐\n", |
| 86 | + "│\u001b[1m \u001b[0m\u001b[1mligand\u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mDG (kcal/mol)\u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mstd dev uncertainty (kcal/mol)\u001b[0m\u001b[1m \u001b[0m│\n", |
| 87 | + "├────────┼───────────────┼────────────────────────────────┤\n", |
| 88 | + "│ 1 │ -20.87 │ 0.58 │\n", |
| 89 | + "└────────┴───────────────┴────────────────────────────────┘\n" |
| 90 | + ] |
| 91 | + } |
| 92 | + ], |
| 93 | + "source": [ |
| 94 | + "# overall binding free energy (DG) per ligand\n", |
| 95 | + "!openfe gather-abfe abfe_results/abfe_results_multiple_units --report dg" |
| 96 | + ] |
| 97 | + }, |
| 98 | + { |
| 99 | + "cell_type": "code", |
| 100 | + "execution_count": 3, |
| 101 | + "id": "89f51d9d-1ea8-4d12-8d7c-7bce2dd6666a", |
| 102 | + "metadata": {}, |
| 103 | + "outputs": [ |
| 104 | + { |
| 105 | + "name": "stdout", |
| 106 | + "output_type": "stream", |
| 107 | + "text": [ |
| 108 | + "\u001b[33mWARNING! Gathering of ABFE results with `openfe gather-abfe` is an experimental feature and is subject to change in a future release of openfe.\u001b[0m\n", |
| 109 | + "┌──────────────────────────┬────────┬───────────────┬──────────────────────────┐\n", |
| 110 | + "│\u001b[1m \u001b[0m│\u001b[1m \u001b[0m│\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mMBAR uncertainty \u001b[0m\u001b[1m \u001b[0m│\n", |
| 111 | + "│\u001b[1m \u001b[0m\u001b[1mleg \u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mligand\u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mDG (kcal/mol)\u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1m(kcal/mol) \u001b[0m\u001b[1m \u001b[0m│\n", |
| 112 | + "├──────────────────────────┼────────┼───────────────┼──────────────────────────┤\n", |
| 113 | + "│ complex │ 1 │ 36.34 │ 0.91 │\n", |
| 114 | + "│ complex │ 1 │ 36.17 │ 0.80 │\n", |
| 115 | + "│ complex │ 1 │ 34.77 │ 0.81 │\n", |
| 116 | + "│ solvent │ 1 │ 6.5 │ 1.4 │\n", |
| 117 | + "│ solvent │ 1 │ 5.4 │ 1.4 │\n", |
| 118 | + "│ solvent │ 1 │ 5.5 │ 1.4 │\n", |
| 119 | + "│ standard_state_correcti… │ 1 │ -8.9 │ 0.0 │\n", |
| 120 | + "│ standard_state_correcti… │ 1 │ -9.3 │ 0.0 │\n", |
| 121 | + "│ standard_state_correcti… │ 1 │ -9.0 │ 0.0 │\n", |
| 122 | + "└──────────────────────────┴────────┴───────────────┴──────────────────────────┘\n" |
| 123 | + ] |
| 124 | + } |
| 125 | + ], |
| 126 | + "source": [ |
| 127 | + "# raw per-leg (complex, solvent, and Boresch-restraint analytical correction) values\n", |
| 128 | + "!openfe gather-abfe abfe_results/abfe_results_multiple_units --report raw" |
| 129 | + ] |
| 130 | + }, |
| 131 | + { |
| 132 | + "cell_type": "markdown", |
| 133 | + "id": "7e0ce0ab-0777-44b2-b865-7eaedaba57d9", |
| 134 | + "metadata": {}, |
| 135 | + "source": [ |
| 136 | + "## Analysing results with the Python API\n", |
| 137 | + "\n", |
| 138 | + "For more control over how results are combined and analysed, you can work with\n", |
| 139 | + "the result JSONs directly in Python, as shown in the rest of this notebook." |
| 140 | + ] |
| 141 | + }, |
56 | 142 | { |
57 | 143 | "cell_type": "markdown", |
58 | 144 | "id": "f2cff1e7-cf62-4839-b53d-62b59b7189b6", |
|
64 | 150 | }, |
65 | 151 | { |
66 | 152 | "cell_type": "code", |
67 | | - "execution_count": 2, |
| 153 | + "execution_count": 4, |
68 | 154 | "id": "7fbf1482-25ca-427b-a881-af88a983461c", |
69 | 155 | "metadata": {}, |
70 | 156 | "outputs": [], |
|
95 | 181 | }, |
96 | 182 | { |
97 | 183 | "cell_type": "code", |
98 | | - "execution_count": 3, |
| 184 | + "execution_count": 5, |
99 | 185 | "id": "08afcbcf-34a8-4450-a967-eb4ed5800ee1", |
100 | 186 | "metadata": {}, |
101 | 187 | "outputs": [], |
|
127 | 213 | }, |
128 | 214 | { |
129 | 215 | "cell_type": "code", |
130 | | - "execution_count": 4, |
| 216 | + "execution_count": 6, |
131 | 217 | "id": "04ccdedd-84e3-4ccc-ae42-4f3772acb115", |
132 | 218 | "metadata": {}, |
133 | 219 | "outputs": [], |
|
173 | 259 | }, |
174 | 260 | { |
175 | 261 | "cell_type": "code", |
176 | | - "execution_count": 5, |
| 262 | + "execution_count": 7, |
177 | 263 | "id": "3733c540-de62-45a0-ba66-268397a38b49", |
178 | 264 | "metadata": {}, |
179 | 265 | "outputs": [], |
|
241 | 327 | }, |
242 | 328 | { |
243 | 329 | "cell_type": "code", |
244 | | - "execution_count": 6, |
| 330 | + "execution_count": 8, |
245 | 331 | "id": "0621e3a2-7906-4661-a640-c414456f8869", |
246 | 332 | "metadata": {}, |
247 | 333 | "outputs": [], |
|
279 | 365 | }, |
280 | 366 | { |
281 | 367 | "cell_type": "code", |
282 | | - "execution_count": 7, |
| 368 | + "execution_count": 9, |
283 | 369 | "id": "5821b7f7-6aed-4138-9502-44df3af52647", |
284 | 370 | "metadata": {}, |
285 | 371 | "outputs": [], |
|
311 | 397 | }, |
312 | 398 | { |
313 | 399 | "cell_type": "code", |
314 | | - "execution_count": 8, |
| 400 | + "execution_count": 10, |
315 | 401 | "id": "e021b2ea-db13-4e47-a6d1-cf5229b5b494", |
316 | 402 | "metadata": {}, |
317 | 403 | "outputs": [], |
|
352 | 438 | }, |
353 | 439 | { |
354 | 440 | "cell_type": "code", |
355 | | - "execution_count": 9, |
| 441 | + "execution_count": 11, |
356 | 442 | "id": "b077c4e2-373a-4314-a527-186bb4683262", |
357 | 443 | "metadata": {}, |
358 | 444 | "outputs": [], |
|
407 | 493 | }, |
408 | 494 | { |
409 | 495 | "cell_type": "code", |
410 | | - "execution_count": 10, |
| 496 | + "execution_count": 12, |
411 | 497 | "id": "7bc49c0e-6fec-409c-a01c-42c35f57dcc6", |
412 | 498 | "metadata": {}, |
413 | 499 | "outputs": [], |
|
430 | 516 | }, |
431 | 517 | { |
432 | 518 | "cell_type": "code", |
433 | | - "execution_count": 11, |
| 519 | + "execution_count": 13, |
434 | 520 | "id": "46996a74-709c-41f2-ac39-0f77fb33371e", |
435 | 521 | "metadata": {}, |
436 | 522 | "outputs": [], |
|
441 | 527 | }, |
442 | 528 | { |
443 | 529 | "cell_type": "code", |
444 | | - "execution_count": 12, |
| 530 | + "execution_count": 14, |
445 | 531 | "id": "d1a6ad61-1e5a-4d8a-9067-9ed428ef145c", |
446 | 532 | "metadata": {}, |
447 | 533 | "outputs": [ |
|
487 | 573 | "0 1 -20.87 0.47" |
488 | 574 | ] |
489 | 575 | }, |
490 | | - "execution_count": 12, |
| 576 | + "execution_count": 14, |
491 | 577 | "metadata": {}, |
492 | 578 | "output_type": "execute_result" |
493 | 579 | } |
|
507 | 593 | }, |
508 | 594 | { |
509 | 595 | "cell_type": "code", |
510 | | - "execution_count": 13, |
| 596 | + "execution_count": 15, |
511 | 597 | "id": "8b2c1dd8-ffa3-4585-94a7-4a1ed1454f30", |
512 | 598 | "metadata": {}, |
513 | 599 | "outputs": [], |
|
518 | 604 | }, |
519 | 605 | { |
520 | 606 | "cell_type": "code", |
521 | | - "execution_count": 14, |
| 607 | + "execution_count": 16, |
522 | 608 | "id": "08b72901-9c71-460b-b5da-9fb4a35e07f7", |
523 | 609 | "metadata": {}, |
524 | 610 | "outputs": [ |
|
630 | 716 | "8 standard_state_correction 1 -9.0 0.0" |
631 | 717 | ] |
632 | 718 | }, |
633 | | - "execution_count": 14, |
| 719 | + "execution_count": 16, |
634 | 720 | "metadata": {}, |
635 | 721 | "output_type": "execute_result" |
636 | 722 | } |
637 | 723 | ], |
638 | 724 | "source": [ |
639 | 725 | "df_raw" |
640 | 726 | ] |
641 | | - }, |
642 | | - { |
643 | | - "cell_type": "code", |
644 | | - "execution_count": null, |
645 | | - "id": "bf160a28-3aa1-4661-8f06-3a4a71d34ff2", |
646 | | - "metadata": {}, |
647 | | - "outputs": [], |
648 | | - "source": [] |
649 | 727 | } |
650 | 728 | ], |
651 | 729 | "metadata": { |
|
664 | 742 | "name": "python", |
665 | 743 | "nbconvert_exporter": "python", |
666 | 744 | "pygments_lexer": "ipython3", |
667 | | - "version": "3.12.13" |
| 745 | + "version": "3.13.11" |
668 | 746 | }, |
669 | 747 | "widgets": { |
670 | 748 | "application/vnd.jupyter.widget-state+json": { |
|
0 commit comments