|
227 | 227 | "\n", |
228 | 228 | "<div class=\"alert alert-block alert-warning\"> \n", |
229 | 229 | "⚠️ <b>Important Note:</b>\n", |
230 | | - " Here we use the first model for each complex predicted by OpenFold3. In practice you would filter through all predicted models, possibly using pose busters (https://github.com/maabuu/posebusters) and some other scoring metrics to identify the most plausible inputs.\n", |
| 230 | + " Here we use the first model for each complex predicted by OpenFold3. In practice you would filter through all predicted models, possibly using pose busters (github.com/maabuu/posebusters) and some other scoring metrics to identify the most plausible inputs.\n", |
231 | 231 | "</div>" |
232 | 232 | ] |
233 | 233 | }, |
|
264 | 264 | "cell_type": "code", |
265 | 265 | "execution_count": 4, |
266 | 266 | "id": "25ef33bf-fb1a-45da-96e4-004f77ef7d34", |
267 | | - "metadata": { |
268 | | - "scrolled": true |
269 | | - }, |
| 267 | + "metadata": {}, |
270 | 268 | "outputs": [ |
271 | 269 | { |
272 | 270 | "name": "stdout", |
|
292 | 290 | "text": [ |
293 | 291 | "/Users/atravitz/micromamba/envs/openfe-notebooks/lib/python3.13/site-packages/MDAnalysis/coordinates/PDB.py:885: UserWarning: Unit cell dimensions not found. CRYST1 record set to unitary values.\n", |
294 | 292 | " warnings.warn(\n", |
295 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 293 | + "[15:27:28] WARNING: More than one matching pattern found - picking one\n", |
296 | 294 | "\n", |
297 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 295 | + "[15:27:28] WARNING: More than one matching pattern found - picking one\n", |
298 | 296 | "\n", |
299 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 297 | + "[15:27:28] WARNING: More than one matching pattern found - picking one\n", |
300 | 298 | "\n", |
301 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 299 | + "[15:27:28] WARNING: More than one matching pattern found - picking one\n", |
302 | 300 | "\n", |
303 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 301 | + "[15:27:28] WARNING: More than one matching pattern found - picking one\n", |
304 | 302 | "\n", |
305 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 303 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
306 | 304 | "\n", |
307 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 305 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
308 | 306 | "\n", |
309 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 307 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
310 | 308 | "\n", |
311 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 309 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
312 | 310 | "\n", |
313 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 311 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
314 | 312 | "\n" |
315 | 313 | ] |
316 | 314 | } |
|
373 | 371 | "name": "stderr", |
374 | 372 | "output_type": "stream", |
375 | 373 | "text": [ |
376 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 374 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
377 | 375 | "\n", |
378 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 376 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
379 | 377 | "\n", |
380 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 378 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
381 | 379 | "\n", |
382 | | - "[11:04:36] WARNING: More than one matching pattern found - picking one\n", |
| 380 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
383 | 381 | "\n", |
384 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 382 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
385 | 383 | "\n", |
386 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 384 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
387 | 385 | "\n", |
388 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 386 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
389 | 387 | "\n" |
390 | 388 | ] |
391 | 389 | }, |
|
409 | 407 | "name": "stderr", |
410 | 408 | "output_type": "stream", |
411 | 409 | "text": [ |
412 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 410 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
413 | 411 | "\n", |
414 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 412 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
415 | 413 | "\n", |
416 | | - "[11:04:37] WARNING: More than one matching pattern found - picking one\n", |
| 414 | + "[15:27:29] WARNING: More than one matching pattern found - picking one\n", |
417 | 415 | "\n" |
418 | 416 | ] |
419 | 417 | } |
|
430 | 428 | " ligand = pdb.name.split('_seed')[0]\n", |
431 | 429 | " mob = mda.Universe(pdb)\n", |
432 | 430 | "\n", |
433 | | - " # 2) Align mobile → reference using protein backbone\n", |
| 431 | + " # Align mobile → reference using protein backbone\n", |
434 | 432 | " ref_prot = ref.select_atoms(\"protein and backbone\")\n", |
435 | 433 | " mob_prot = mob.select_atoms(\"protein and backbone\")\n", |
436 | 434 | " \n", |
|
461 | 459 | "id": "fe3ca792-4615-4be3-8a41-feb0819e968d", |
462 | 460 | "metadata": {}, |
463 | 461 | "source": [ |
464 | | - "<div class=\"alert alert-block alert-danger\"> \n", |
| 462 | + "<div class=\"alert alert-block alert-warning\"> \n", |
465 | 463 | "⚠️ <b>Important Note:</b>\n", |
466 | 464 | " <br><br>\n", |
467 | 465 | " Here simply we assign ligand protonation states to those we defined at the start of this exercise. Additionally, below we will assign protein protonation states using PDBFixer at pH 7 without accounting for the ligand.<br><br>\n", |
|
514 | 512 | "name": "stderr", |
515 | 513 | "output_type": "stream", |
516 | 514 | "text": [ |
517 | | - "Generating charges: 100%|███████████████████████| 10/10 [00:05<00:00, 1.73it/s]\n" |
| 515 | + "Generating charges: 100%|███████████████████████| 10/10 [00:05<00:00, 1.75it/s]\n" |
518 | 516 | ] |
519 | 517 | } |
520 | 518 | ], |
|
563 | 561 | "name": "stderr", |
564 | 562 | "output_type": "stream", |
565 | 563 | "text": [ |
566 | | - "/Users/atravitz/micromamba/envs/openfe-notebooks/lib/python3.13/site-packages/gufe/components/explicitmoleculecomponent.py:59: UserWarning: Molecule (name='') doesn't have any hydrogen atoms present. If this is unexpected, consider loading the molecule with `removeHs=False`\n", |
| 564 | + "/Users/atravitz/micromamba/envs/openfe-notebooks/lib/python3.13/site-packages/gufe/components/explicitmoleculecomponent.py:59: UserWarning: Molecule (name='tyk2') doesn't have any hydrogen atoms present. If this is unexpected, consider loading the molecule with `removeHs=False`\n", |
567 | 565 | " warnings.warn(\n" |
568 | 566 | ] |
569 | 567 | } |
570 | 568 | ], |
571 | 569 | "source": [ |
572 | | - "protein = openfe.ProteinComponent.from_pdb_file(\"openfold_to_openfe/p_aligned/protein.pdb\")" |
| 570 | + "protein = openfe.ProteinComponent.from_pdb_file(\"openfold_to_openfe/p_aligned/protein.pdb\", name=\"tyk2\")" |
573 | 571 | ] |
574 | 572 | }, |
575 | 573 | { |
|
598 | 596 | "## 4. Creating a Binding Free Energy Transformation\n", |
599 | 597 | "\n", |
600 | 598 | "### 4a) Absolute Binding Free Energy\n", |
601 | | - "Using these inputs, we can create ABFE Transformations. For the sake of simplicity, we will only create a Transformation for `lig_jmc_27`.\n", |
| 599 | + "Using these inputs, we can create ABFE Transformations. For the sake of simplicity, we will only create a Transformation for `lig_jmc_27`, but this process is generalizable to the rest of the ligands in the series.\n", |
602 | 600 | "\n", |
603 | 601 | "First we create the `ChemicalSystems` defining the end states of the simulation:" |
604 | 602 | ] |
|
608 | 606 | "execution_count": 10, |
609 | 607 | "id": "c405e50c-1df3-4bef-8278-393550e1fc6a", |
610 | 608 | "metadata": {}, |
611 | | - "outputs": [], |
| 609 | + "outputs": [ |
| 610 | + { |
| 611 | + "data": { |
| 612 | + "text/plain": [ |
| 613 | + "SmallMoleculeComponent(name=lig_jmc_27)" |
| 614 | + ] |
| 615 | + }, |
| 616 | + "execution_count": 10, |
| 617 | + "metadata": {}, |
| 618 | + "output_type": "execute_result" |
| 619 | + } |
| 620 | + ], |
612 | 621 | "source": [ |
613 | | - "ligand = [l for l in charged_ligands if l.name == 'lig_jmc_27'][0]" |
| 622 | + "# choose the first ligand\n", |
| 623 | + "ligand = [l for l in charged_ligands if l.name == 'lig_jmc_27'][0]\n", |
| 624 | + "ligand" |
614 | 625 | ] |
615 | 626 | }, |
616 | 627 | { |
617 | 628 | "cell_type": "code", |
618 | 629 | "execution_count": 11, |
619 | 630 | "id": "987a1657-82d0-4310-9fe7-4eecd289632a", |
620 | 631 | "metadata": {}, |
621 | | - "outputs": [], |
| 632 | + "outputs": [ |
| 633 | + { |
| 634 | + "data": { |
| 635 | + "text/plain": [ |
| 636 | + "(ChemicalSystem(name=state_A, components={'ligand': SmallMoleculeComponent(name=lig_jmc_27), 'protein': ProteinComponent(name=tyk2), 'solvent': SolventComponent(name=O, Na+, Cl-)}),\n", |
| 637 | + " ChemicalSystem(name=state_B, components={'protein': ProteinComponent(name=tyk2), 'solvent': SolventComponent(name=O, Na+, Cl-)}))" |
| 638 | + ] |
| 639 | + }, |
| 640 | + "execution_count": 11, |
| 641 | + "metadata": {}, |
| 642 | + "output_type": "execute_result" |
| 643 | + } |
| 644 | + ], |
622 | 645 | "source": [ |
623 | 646 | "# Create the two end states\n", |
624 | 647 | "\n", |
|
627 | 650 | " 'ligand': ligand,\n", |
628 | 651 | " 'protein': protein,\n", |
629 | 652 | " 'solvent': solvent,\n", |
630 | | - "})\n", |
| 653 | + "}, name=\"state_A\")\n", |
631 | 654 | "\n", |
632 | 655 | "# state B is the system without the ligand\n", |
633 | 656 | "stateB = openfe.ChemicalSystem({\n", |
634 | 657 | " 'protein': protein,\n", |
635 | 658 | " 'solvent': solvent,\n", |
636 | | - "})" |
| 659 | + "}, name=\"state_B\")\n", |
| 660 | + "\n", |
| 661 | + "stateA, stateB" |
637 | 662 | ] |
638 | 663 | }, |
639 | 664 | { |
|
682 | 707 | ")" |
683 | 708 | ] |
684 | 709 | }, |
| 710 | + { |
| 711 | + "cell_type": "markdown", |
| 712 | + "id": "f89a9800-9d25-470c-845f-87479095806e", |
| 713 | + "metadata": {}, |
| 714 | + "source": [ |
| 715 | + "This transformation can now be run using `openfe quickrun`." |
| 716 | + ] |
| 717 | + }, |
685 | 718 | { |
686 | 719 | "cell_type": "markdown", |
687 | 720 | "id": "f9e4f4a1-ed28-4d33-b73b-865dc5023b93", |
688 | 721 | "metadata": {}, |
689 | 722 | "source": [ |
690 | 723 | "### 4b) Separated Topologies Relative Binding Free Energy Transformation\n", |
691 | 724 | "\n", |
692 | | - "Next we create a SepTop RBFE Transformation. Here we will do the transformation between `lig_jmc_27` and `lig_ejm_46`." |
| 725 | + "We can instead build a SepTop RBFE Transformation. Here we will do the transformation between `lig_jmc_27` and `lig_ejm_46`." |
693 | 726 | ] |
694 | 727 | }, |
695 | 728 | { |
|
717 | 750 | " 'ligand': ligandA,\n", |
718 | 751 | " 'protein': protein,\n", |
719 | 752 | " 'solvent': solvent,\n", |
720 | | - "})\n", |
| 753 | + "}, name=\"state_A\",)\n", |
721 | 754 | "\n", |
722 | 755 | "# state B is the system with lig_ejm_46\n", |
723 | 756 | "stateB = openfe.ChemicalSystem({\n", |
724 | 757 | " 'ligand': ligandB,\n", |
725 | 758 | " 'protein': protein,\n", |
726 | 759 | " 'solvent': solvent,\n", |
727 | | - "})" |
| 760 | + "}, name=\"state_B\",)" |
728 | 761 | ] |
729 | 762 | }, |
730 | 763 | { |
|
765 | 798 | ")" |
766 | 799 | ] |
767 | 800 | }, |
| 801 | + { |
| 802 | + "cell_type": "markdown", |
| 803 | + "id": "d59f5d1b-f078-49c2-9965-9cb8abc64a71", |
| 804 | + "metadata": {}, |
| 805 | + "source": [ |
| 806 | + "This transformation can now be run using `openfe quickrun`." |
| 807 | + ] |
| 808 | + }, |
768 | 809 | { |
769 | 810 | "cell_type": "markdown", |
770 | 811 | "id": "316727a4-aa8b-43dd-916d-b73244ee829a", |
|
801 | 842 | "source": [ |
802 | 843 | "<div class=\"alert alert-block alert-warning\"> \n", |
803 | 844 | "⚠️ <b>Important Note:</b>\n", |
804 | | - " <br><br>\n", |
805 | 845 | " This alignment method is naive and error prone. In practice care would be required to make sure that the ligands are properly aligned.\n", |
806 | 846 | "</div>" |
807 | 847 | ] |
|
904 | 944 | " 'ligand': ligandA,\n", |
905 | 945 | " 'protein': protein,\n", |
906 | 946 | " 'solvent': solvent,\n", |
907 | | - "})\n", |
| 947 | + "}, name=\"state_A_complex\",)\n", |
908 | 948 | "\n", |
909 | 949 | "# state B is the system with lig_ejm_46\n", |
910 | 950 | "stateB_complex = openfe.ChemicalSystem({\n", |
911 | 951 | " 'ligand': ligandB_aligned,\n", |
912 | 952 | " 'protein': protein,\n", |
913 | 953 | " 'solvent': solvent,\n", |
914 | | - "})" |
| 954 | + "}, name=\"state_B_complex\")" |
915 | 955 | ] |
916 | 956 | }, |
917 | 957 | { |
|
927 | 967 | "stateA_solvent = openfe.ChemicalSystem({\n", |
928 | 968 | " 'ligand': ligandA,\n", |
929 | 969 | " 'solvent': solvent,\n", |
930 | | - "})\n", |
| 970 | + "}, name=\"state_A_solvent\",)\n", |
931 | 971 | "\n", |
932 | 972 | "# state B is the system with lig_ejm_46\n", |
933 | 973 | "stateB_solvent = openfe.ChemicalSystem({\n", |
934 | 974 | " 'ligand': ligandB_aligned,\n", |
935 | 975 | " 'solvent': solvent,\n", |
936 | | - "})" |
| 976 | + "},name=\"state_B_solvent\",)" |
937 | 977 | ] |
938 | 978 | }, |
939 | 979 | { |
|
998 | 1038 | ")" |
999 | 1039 | ] |
1000 | 1040 | }, |
| 1041 | + { |
| 1042 | + "cell_type": "markdown", |
| 1043 | + "id": "f08aaff4-97d0-4f53-bb32-1c7e247432aa", |
| 1044 | + "metadata": {}, |
| 1045 | + "source": [ |
| 1046 | + "This transformation can now be run using `openfe quickrun`." |
| 1047 | + ] |
| 1048 | + }, |
1001 | 1049 | { |
1002 | 1050 | "cell_type": "markdown", |
1003 | 1051 | "id": "6cae5156-f80f-4520-baee-4199774d441a", |
|
1008 | 1056 | "In practice, one would create entire network of Transformations, and then run all the simulations.\n", |
1009 | 1057 | "This notebook will not cover these aspects. To find out more about this, please see the [OpenFE Tutorials](https://docs.openfree.energy/en/latest/tutorials/index.html)." |
1010 | 1058 | ] |
1011 | | - }, |
1012 | | - { |
1013 | | - "cell_type": "code", |
1014 | | - "execution_count": null, |
1015 | | - "id": "ac79eed4-0030-4a9a-b86e-39c53681446b", |
1016 | | - "metadata": {}, |
1017 | | - "outputs": [], |
1018 | | - "source": [] |
1019 | 1059 | } |
1020 | 1060 | ], |
1021 | 1061 | "metadata": { |
|
0 commit comments