Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions rbfe_tutorial/python_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
"source": [
"from rdkit import Chem\n",
"supp = Chem.SDMolSupplier(\"tyk2_ligands.sdf\", removeHs=False)\n",
"ligands = [openfe.SmallMoleculeComponent.from_rdkit(mol) for mol in supp]\n",
"\n",
"name_to_ligand = {ligand.name: ligand for ligand in ligands}"
"ligands = [openfe.SmallMoleculeComponent.from_rdkit(mol) for mol in supp]"
]
},
{
Expand Down Expand Up @@ -173,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"id": "2263838f",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -212,7 +210,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"id": "9d2fbc22",
"metadata": {},
"outputs": [],
Expand All @@ -223,7 +221,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"id": "3f1706ee",
"metadata": {},
"outputs": [],
Expand All @@ -233,7 +231,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"id": "710285ca",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -262,7 +260,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 11,
"id": "3f394a0d",
"metadata": {
"scrolled": true
Expand All @@ -282,7 +280,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 12,
"id": "fb839094",
"metadata": {},
"outputs": [
Expand All @@ -298,7 +296,7 @@
"298.15 <Unit('kelvin')>"
]
},
"execution_count": 13,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -310,7 +308,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 13,
"id": "e83630f0",
"metadata": {},
"outputs": [],
Expand All @@ -331,7 +329,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 14,
"id": "7adf42d6",
"metadata": {},
"outputs": [],
Expand All @@ -352,7 +350,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 15,
"id": "44ba94ca",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -388,7 +386,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 16,
"id": "66666a80",
"metadata": {},
"outputs": [],
Expand All @@ -410,12 +408,14 @@
" sysA = openfe.ChemicalSystem(sysA_dict, name=f\"{mapping.componentA.name}_{leg}\")\n",
" sysB = openfe.ChemicalSystem(sysB_dict, name=f\"{mapping.componentB.name}_{leg}\")\n",
" \n",
" prefix = \"easy_rbfe_\" # prefix is only to exactly reproduce CLI\n",
" \n",
" transformation = openfe.Transformation(\n",
" stateA=sysA,\n",
" stateB=sysB,\n",
" mapping={'ligand': mapping},\n",
" protocol=protocol, # use protocol created above\n",
" name=f\"{sysA.name}_{sysB.name}\"\n",
" name=f\"{prefix}{sysA.name}_{sysB.name}\"\n",
" )\n",
" transformations.append(transformation)\n",
"\n",
Expand All @@ -434,7 +434,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 17,
"id": "d6cebd9a",
"metadata": {},
"outputs": [],
Expand All @@ -451,32 +451,32 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"id": "b96b57a9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"lig_ejm_31_complex_lig_ejm_42_complex.json\r\n",
"lig_ejm_31_complex_lig_ejm_46_complex.json\r\n",
"lig_ejm_31_complex_lig_ejm_47_complex.json\r\n",
"lig_ejm_31_complex_lig_ejm_48_complex.json\r\n",
"lig_ejm_31_complex_lig_ejm_50_complex.json\r\n",
"lig_ejm_31_solvent_lig_ejm_42_solvent.json\r\n",
"lig_ejm_31_solvent_lig_ejm_46_solvent.json\r\n",
"lig_ejm_31_solvent_lig_ejm_47_solvent.json\r\n",
"lig_ejm_31_solvent_lig_ejm_48_solvent.json\r\n",
"lig_ejm_31_solvent_lig_ejm_50_solvent.json\r\n",
"lig_ejm_42_complex_lig_ejm_43_complex.json\r\n",
"lig_ejm_42_solvent_lig_ejm_43_solvent.json\r\n",
"lig_ejm_46_complex_lig_jmc_23_complex.json\r\n",
"lig_ejm_46_complex_lig_jmc_27_complex.json\r\n",
"lig_ejm_46_complex_lig_jmc_28_complex.json\r\n",
"lig_ejm_46_solvent_lig_jmc_23_solvent.json\r\n",
"lig_ejm_46_solvent_lig_jmc_27_solvent.json\r\n",
"lig_ejm_46_solvent_lig_jmc_28_solvent.json\r\n"
"easy_rbfe_lig_ejm_31_complex_lig_ejm_42_complex.json\r\n",
"easy_rbfe_lig_ejm_31_complex_lig_ejm_46_complex.json\r\n",
"easy_rbfe_lig_ejm_31_complex_lig_ejm_47_complex.json\r\n",
"easy_rbfe_lig_ejm_31_complex_lig_ejm_48_complex.json\r\n",
"easy_rbfe_lig_ejm_31_complex_lig_ejm_50_complex.json\r\n",
"easy_rbfe_lig_ejm_31_solvent_lig_ejm_42_solvent.json\r\n",
"easy_rbfe_lig_ejm_31_solvent_lig_ejm_46_solvent.json\r\n",
"easy_rbfe_lig_ejm_31_solvent_lig_ejm_47_solvent.json\r\n",
"easy_rbfe_lig_ejm_31_solvent_lig_ejm_48_solvent.json\r\n",
"easy_rbfe_lig_ejm_31_solvent_lig_ejm_50_solvent.json\r\n",
"easy_rbfe_lig_ejm_42_complex_lig_ejm_43_complex.json\r\n",
"easy_rbfe_lig_ejm_42_solvent_lig_ejm_43_solvent.json\r\n",
"easy_rbfe_lig_ejm_46_complex_lig_jmc_23_complex.json\r\n",
"easy_rbfe_lig_ejm_46_complex_lig_jmc_27_complex.json\r\n",
"easy_rbfe_lig_ejm_46_complex_lig_jmc_28_complex.json\r\n",
"easy_rbfe_lig_ejm_46_solvent_lig_jmc_23_solvent.json\r\n",
"easy_rbfe_lig_ejm_46_solvent_lig_jmc_27_solvent.json\r\n",
"easy_rbfe_lig_ejm_46_solvent_lig_jmc_28_solvent.json\r\n"
]
}
],
Expand Down