From d5fd2540744026531d91a8a8b16c84142dbaad44 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 21 Feb 2025 15:11:25 +0000 Subject: [PATCH 1/9] Updates RBFE notebook to support cinnabar 0.4.1 --- 04_fep/02_RBFE/02_analysis_rbfe.ipynb | 92 ++++++++++++++++++++------- 1 file changed, 70 insertions(+), 22 deletions(-) diff --git a/04_fep/02_RBFE/02_analysis_rbfe.ipynb b/04_fep/02_RBFE/02_analysis_rbfe.ipynb index 783ee13..46442ba 100644 --- a/04_fep/02_RBFE/02_analysis_rbfe.ipynb +++ b/04_fep/02_RBFE/02_analysis_rbfe.ipynb @@ -93,6 +93,7 @@ "outputs": [], "source": [ "from get_tutorial import download\n", + "\n", "download(\"02\")" ] }, @@ -221,7 +222,9 @@ " new_file_name = f\"analysis/outputs/results_{results_all_files.index(file)}.csv\"\n", " with open(new_file_name, \"w\") as result_file:\n", " writer = csv.writer(result_file, delimiter=\",\")\n", - " writer.writerow([\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"])\n", + " writer.writerow(\n", + " [\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"]\n", + " )\n", "\n", " for row, index in pd.read_csv(file).iterrows():\n", " pert = f\"{index['lig_1']}~{index['lig_2']}\"\n", @@ -290,7 +293,9 @@ "# write these to a csv file\n", "with open(\"analysis/outputs/computed_perturbations_average.csv\", \"w\") as comp_pert_file:\n", " writer = csv.writer(comp_pert_file, delimiter=\",\")\n", - " writer.writerow([\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"])\n", + " writer.writerow(\n", + " [\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"]\n", + " )\n", " for pert in perturbations:\n", " ddGs = comp_dict_list[pert]\n", " lig_0 = pert.split(\"~\")[0]\n", @@ -360,7 +365,9 @@ "# write these to a csv file\n", "with open(\"analysis/outputs/experimental_perturbations.csv\", \"w\") as exp_pert_file:\n", " writer = csv.writer(exp_pert_file, delimiter=\",\")\n", - " writer.writerow([\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"])\n", + " writer.writerow(\n", + " [\"lig_1\", \"lig_2\", \"freenrg(kcal/mol)\", \"error(kcal/mol)\", \"engine\"]\n", + " )\n", "\n", " for pert in perturbations:\n", " lig_0 = pert.split(\"~\")[0]\n", @@ -527,7 +534,15 @@ "metadata": {}, "outputs": [], "source": [ - "from cinnabar import wrangle, plotting" + "# Import cinnbar, API changes depending on version\n", + "try:\n", + " from cinnabar import wrangle, plotting\n", + "\n", + " cinnabar_is_old = True\n", + "except:\n", + " from cinnabar import FEMap, plotting\n", + "\n", + " cinnabar_is_old = False" ] }, { @@ -644,11 +659,32 @@ "metadata": {}, "outputs": [], "source": [ - "network = wrangle.FEMap(f\"analysis/outputs/cinnabar_data.csv\")\n", - "# plot the perturbations\n", - "plotting.plot_DDGs(network.graph, title=\"DDGs\", filename=f\"analysis/outputs/DDGs.png\", figsize=6)\n", - "# plot the ligands\n", - "plotting.plot_DGs(network.graph, title=\"DGs\", filename=f\"analysis/outputs/DGs.png\", figsize=6)" + "if cinnabar_is_old:\n", + " network = wrangle.FEMap(f\"analysis/outputs/cinnabar_data.csv\")\n", + " # plot the perturbations\n", + " plotting.plot_DDGs(\n", + " network.graph, title=\"DDGs\", filename=f\"analysis/outputs/DDGs.png\", figsize=6\n", + " )\n", + " # plot the ligands\n", + " plotting.plot_DGs(\n", + " network.graph, title=\"DGs\", filename=f\"analysis/outputs/DGs.png\", figsize=6\n", + " )\n", + "else:\n", + " network = FEMap.from_csv(f\"analysis/outputs/cinnabar_data.csv\")\n", + " # plot the perturbations\n", + " plotting.plot_DDGs(\n", + " network.to_legacy_graph(),\n", + " title=\"DDGs\",\n", + " filename=f\"analysis/outputs/DDGs.png\",\n", + " figsize=6,\n", + " )\n", + " # plot the ligands\n", + " plotting.plot_DGs(\n", + " network.to_legacy_graph(),\n", + " title=\"DGs\",\n", + " filename=f\"analysis/outputs/DGs.png\",\n", + " figsize=6,\n", + " )" ] }, { @@ -737,7 +773,7 @@ "Exercise 2.1.1: Excluding intermediates from the Network analysis\n", "\n", "\n", - "Try exculding this perturbation and rerunning the above Network analysis. First, we need to remove the perturbation. Then, we need to make sure that our new output image is being saved using a different file path. Adjust these in the cells below where the #FIXME is. \n" + "Try excluding this perturbation and rerunning the above Network analysis. First, we need to remove the perturbation. Then, we need to make sure that our new output image is being saved using a different file path. Adjust these in the cells below where the #FIXME is. \n" ] }, { @@ -876,11 +912,19 @@ " if pert in perturbations:\n", " writer.writerow([lig_0, lig_1, comp_ddG, comp_err, \"0.0\"])\n", "\n", - "network = wrangle.FEMap(f\"analysis/outputs/cinnabar_data_outliers_removed.csv\")\n", - "# plot the perturbations\n", - "plotting.plot_DDGs(network.graph, title=\"DDGs\", filename=f\"analysis/outputs/DDGs_outliers_removed.png\", figsize=6)\n", - "# plot the ligands\n", - "plotting.plot_DGs(network.graph, title=\"DGs\", filename=f\"analysis/outputs/DGs_outliers_removed.png\", figsize=6)\n", + "if cinnabar_is_old:\n", + " network = wrangle.FEMap(f\"analysis/outputs/cinnabar_data_outliers_removed.csv\")\n", + " # plot the perturbations\n", + " plotting.plot_DDGs(network.graph, title=\"DDGs\", filename=f\"analysis/outputs/DDGs_outliers_removed.png\", figsize=6)\n", + " # plot the ligands\n", + " plotting.plot_DGs(network.graph, title=\"DGs\", filename=f\"analysis/outputs/DGs_outliers_removed.png\", figsize=6)\n", + "else:\n", + " network = FEMap.from_csv(f\"analysis/outputs/cinnabar_data_outliers_removed.csv\")\n", + " # plot the perturbations\n", + " plotting.plot_DDGs(network.to_legacy_graph(), title=\"DDGs\", filename=f\"analysis/outputs/DDGs_outliers_removed.png\", figsize=6)\n", + " # plot the ligands\n", + " plotting.plot_DGs(network.to_legacy_graph(), title=\"DGs\", filename=f\"analysis/outputs/DGs_outliers_removed.png\", figsize=6)\n", + "\n", "```\n", "\n", "" @@ -924,11 +968,16 @@ "
Click here to see solution to Exercise. \n", "\n", "```python\n", - "\n", - "lig_dict = {entry[1]['name']:entry[1]['calc_DG'] for entry in network.graph.nodes.data()}\n", - "lig_df = pd.DataFrame.from_dict(lig_dict, orient=\"index\", columns=[\"calc_DG\"])\n", - "lig_df.to_csv(\"analysis/outputs/ligand_calc_DG.csv\")\n", - "lig_df.sort_values(\"calc_DG\")\n", + "if cinnabar_is_old:\n", + " lig_dict = {entry[1]['name']:entry[1]['calc_DG'] for entry in network.graph.nodes.data()}\n", + " lig_df = pd.DataFrame.from_dict(lig_dict, orient=\"index\", columns=[\"calc_DG\"])\n", + " lig_df.to_csv(\"analysis/outputs/ligand_calc_DG.csv\")\n", + " lig_df.sort_values(\"calc_DG\")\n", + "else:\n", + " lig_dict = {entry[0]:entry[1]['calc_DG'] for entry in network.to_legacy_graph().nodes.data()}\n", + " lig_df = pd.DataFrame.from_dict(lig_dict, orient=\"index\", columns=[\"calc_DG\"])\n", + " lig_df.to_csv(\"analysis/outputs/ligand_calc_DG.csv\")\n", + " lig_df.sort_values(\"calc_DG\")\n", "\n", "```\n", "\n", @@ -978,8 +1027,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.11" + "pygments_lexer": "ipython3" }, "varInspector": { "cols": { From fdc42f5ab0cd9592ba509ca19a8eb35edce5cb50 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 21 Feb 2025 15:14:49 +0000 Subject: [PATCH 2/9] Update README to new cinnabar version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07c11f7..36a8125 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ These tutorials have been tested with BioSimSpace 2023.5.0 on a linux-64 platfor * Gromacs (tested with 2023.1) * AmberTools (tested with 23.3) * PLUMED (tested with 2.9.0) -* cinnabar (tested with 0.3.0) +* cinnabar (tested with 0.4.1) * alchemlyb (tested with 1.0.1) # Installation instructions From b142b50b7461be39acb6e77aa3b9601356156af6 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 21 Feb 2025 16:03:09 +0000 Subject: [PATCH 3/9] Updates CollectiveVariable.RMSD to new API --- 03_steered_md/01_setup_sMD.ipynb | 39 +++++++++++--------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/03_steered_md/01_setup_sMD.ipynb b/03_steered_md/01_setup_sMD.ipynb index 7c85190..dbd58f1 100644 --- a/03_steered_md/01_setup_sMD.ipynb +++ b/03_steered_md/01_setup_sMD.ipynb @@ -128,6 +128,7 @@ "outputs": [], "source": [ "from get_tutorial import download\n", + "\n", "download(\"01\")" ] }, @@ -200,22 +201,7 @@ "metadata": {}, "outputs": [], "source": [ - "reference = BSS.IO.readMolecules(\"data/reference.pdb\").getMolecule(0)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9f45911c", - "metadata": {}, - "outputs": [], - "source": [ - "rmsd_indices = []\n", - "for residue in reference.getResidues():\n", - " if 178 <= residue.index() <= 184:\n", - " for atom in residue.getAtoms():\n", - " if atom.element() != \"Hydrogen (H, 1)\":\n", - " rmsd_indices.append(atom.index())" + "reference = BSS.IO.readMolecules(\"data/reference.pdb\")" ] }, { @@ -225,7 +211,13 @@ "metadata": {}, "outputs": [], "source": [ - "rmsd_cv = BSS.Metadynamics.CollectiveVariable.RMSD(system, reference, rmsd_indices)" + "rmsd_cv = BSS.Metadynamics.CollectiveVariable.RMSD(\n", + " system,\n", + " reference,\n", + " \"residx 178:185 and not element H\",\n", + " \"residx 178:185 and not element H\",\n", + " reference_mapping={0: 0},\n", + ")" ] }, { @@ -336,9 +328,7 @@ "metadata": {}, "outputs": [], "source": [ - "process = BSS.Process.Gromacs(\n", - " system,\n", - " protocol)" + "process = BSS.Process.Gromacs(system, protocol)" ] }, { @@ -390,8 +380,7 @@ "metadata": {}, "outputs": [], "source": [ - "process = BSS.Process.Amber(\n", - " system, protocol)" + "process = BSS.Process.Amber(system, protocol)" ] }, { @@ -617,8 +606,7 @@ "outputs": [], "source": [ "# pass exe=f'{os.environ[\"AMBERHOME\"]}/bin/pmemd.cuda to use the faster MD engine pmemd\n", - "process = BSS.Process.Amber(\n", - " system, protocol)" + "process = BSS.Process.Amber(system, protocol)" ] }, { @@ -696,8 +684,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" + "pygments_lexer": "ipython3" }, "vscode": { "interpreter": { From 9b59d852e4e23788bab38edf2887735056a47c53 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 24 Feb 2025 16:25:25 +0000 Subject: [PATCH 4/9] Updates to be consistent with older versions. --- 03_steered_md/01_setup_sMD.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03_steered_md/01_setup_sMD.ipynb b/03_steered_md/01_setup_sMD.ipynb index dbd58f1..b9d4358 100644 --- a/03_steered_md/01_setup_sMD.ipynb +++ b/03_steered_md/01_setup_sMD.ipynb @@ -214,7 +214,7 @@ "rmsd_cv = BSS.Metadynamics.CollectiveVariable.RMSD(\n", " system,\n", " reference,\n", - " \"residx 178:185 and not element H\",\n", + " \"molidx 0 and (not residx 178:185) and (not element H)\",\n", " \"residx 178:185 and not element H\",\n", " reference_mapping={0: 0},\n", ")" From 7466e200198af7882a3de53765c1b19d708edbf4 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 3 Oct 2025 15:38:01 +0100 Subject: [PATCH 5/9] Adds link to snakemake workflow to RBFE setup tutorial --- 04_fep/02_RBFE/01_setup_rbfe.ipynb | 16 ++++++++++++++-- 04_fep/02_RBFE/01_setup_rbfe.md | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/04_fep/02_RBFE/01_setup_rbfe.ipynb b/04_fep/02_RBFE/01_setup_rbfe.ipynb index 764caa1..dd422dc 100644 --- a/04_fep/02_RBFE/01_setup_rbfe.ipynb +++ b/04_fep/02_RBFE/01_setup_rbfe.ipynb @@ -108,6 +108,7 @@ "outputs": [], "source": [ "from get_tutorial import download\n", + "\n", "download(\"01\")" ] }, @@ -773,6 +774,18 @@ "This will cover how to analyse the results for an RBFE Network. You can get started with the setup notebook by following this link:\n", "[02_analysis_rbfe.ipynb](02_analysis_rbfe.ipynb)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] } ], "metadata": { @@ -790,8 +803,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" + "pygments_lexer": "ipython3" }, "varInspector": { "cols": { diff --git a/04_fep/02_RBFE/01_setup_rbfe.md b/04_fep/02_RBFE/01_setup_rbfe.md index bf3f036..501f3bd 100644 --- a/04_fep/02_RBFE/01_setup_rbfe.md +++ b/04_fep/02_RBFE/01_setup_rbfe.md @@ -90,6 +90,7 @@ if not os.path.exists(f"{main_folder}/output_setup"): ```python from get_tutorial import download + download("01") ``` @@ -625,3 +626,7 @@ As these would take too long to run and analyse in the span of a workshop, sampl This will cover how to analyse the results for an RBFE Network. You can get started with the setup notebook by following this link: [02_analysis_rbfe.ipynb](02_analysis_rbfe.ipynb) + +Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow + + From 036ff347cb9fcd5cb1d29e1b51444d279094386c Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 10 Oct 2025 16:11:16 +0100 Subject: [PATCH 6/9] Updates get_tutorial links to new location, and alters the steered md reference.pdb Also adds reference to the snakemake workflow in the LIVECOMS article and RBFE notebook --- 01_introduction/get_tutorial.py | 2 +- 02_funnel_metad/get_tutorial.py | 4 +-- 03_steered_md/get_tutorial.py | 4 +-- 04_fep/01_intro_to_alchemy/get_tutorial.py | 8 +++--- 04_fep/02_RBFE/01_setup_rbfe.ipynb | 29 ++++++++++++++-------- 04_fep/02_RBFE/01_setup_rbfe.md | 13 +++++++--- 04_fep/02_RBFE/get_tutorial.py | 6 ++--- 04_fep/03_ABFE/get_tutorial.py | 6 ++--- LIVECOMS/04_fep/livecoms.tex | 3 ++- LIVECOMS/main.tex | 7 +++++- 10 files changed, 51 insertions(+), 31 deletions(-) diff --git a/01_introduction/get_tutorial.py b/01_introduction/get_tutorial.py index dfcc892..53e4be0 100644 --- a/01_introduction/get_tutorial.py +++ b/01_introduction/get_tutorial.py @@ -3,7 +3,7 @@ links = { "01": ( "inputs.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EU3zvc0UmE1CqX0UKKR5hGIBtdF8Jj1-u8hol1XPwAEgKQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EYUIL6WQCuBIhUnyH_YdTukBf6YMIU4iMi7OzDurBGq9gA?download=1", ), } diff --git a/02_funnel_metad/get_tutorial.py b/02_funnel_metad/get_tutorial.py index 3e84163..a4b02ae 100644 --- a/02_funnel_metad/get_tutorial.py +++ b/02_funnel_metad/get_tutorial.py @@ -3,11 +3,11 @@ links = { "01": ( "inputs_01.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/Ed-8fipPSEFMt01VyyZQBBoBpviQb2k5pmzFsdBulaXXUQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/ESjwO8clK9xGg6q__fCfEk4BjoYclwD3xTBeXhd_Cc6iZQ?download=1", ), "02": ( "inputs_02.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/ES8xuCuWe4dNop5fJeH1opEBoKG0qZZqLph5ZwMadKkJoQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/ESKt9qodhm9Hr767PMWH6VAB1UinRc_nfWzFTb6vcEYruQ?download=1", ), } diff --git a/03_steered_md/get_tutorial.py b/03_steered_md/get_tutorial.py index d8c6f66..f119979 100644 --- a/03_steered_md/get_tutorial.py +++ b/03_steered_md/get_tutorial.py @@ -3,11 +3,11 @@ links = { "01": ( "data.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EQFPq-ebCEtPmtzWyaJrLiwBUjWOBL_QkqquuGa9x8KP5g?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EcngMqH4AqRNjsejO0G51lcBO_tCOl3FGmm7Y07M9qUPGw?download=1", ), "02": ( "steering.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EYtK_bZ9T9VJm9zWBkSlXakBfvmzupkQWPnMap9_0o1gYg?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EfTxzYT2bG9LgSvmEl10r6cBFexFRgKf1572S0IK74TKlg?download=1", ), } diff --git a/04_fep/01_intro_to_alchemy/get_tutorial.py b/04_fep/01_intro_to_alchemy/get_tutorial.py index 926b71c..c0f240d 100644 --- a/04_fep/01_intro_to_alchemy/get_tutorial.py +++ b/04_fep/01_intro_to_alchemy/get_tutorial.py @@ -3,19 +3,19 @@ links = { "01": ( "input.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EeclcaEfAPlAjtMQzXo3QcIBnZOSX_lX9w81a6yKU6p-NQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EcnpFE9iWiNNi1sGkV-ycwQBi42Pea5GPXDe9bEAl-paFw?download=1", ), "02": ( "o_xylene_benzene_for_analysis.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EYucKLAsmghNknd5914lCTQBC5uQL7fn0Fca_LeOfpaXcA?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EUL_pvV_LfBKql8xljd3BSMBOf2inaY26ME1tgcWhJMKhg?download=1", ), "03": ( "exercise_4_5.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EcD3SVH8VHpMowLj9MvPWksBYWVAlvKLEV_W5g1R3c4n_Q?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/ESvbYVWgophJggIj-1ZwxRsBX-iMOMVGP-CEgDPcsQE0Hw?download=1", ), "04": ( "example_output.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EbXnbu36ozpFq1WNraQeeSQB6wQExM4rFkveOZVkh3dNyw?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EY28QX9JEdlMoeBpZbGE_kcBWtK1Fsj1STFYzoe3lOOpJw?download=1", ), } diff --git a/04_fep/02_RBFE/01_setup_rbfe.ipynb b/04_fep/02_RBFE/01_setup_rbfe.ipynb index dd422dc..c5424b4 100644 --- a/04_fep/02_RBFE/01_setup_rbfe.ipynb +++ b/04_fep/02_RBFE/01_setup_rbfe.ipynb @@ -757,29 +757,38 @@ "\n", "Th run_all_slurm.sh calls the following scripts in order:\n", "\n", - " - Ligand preparation (ligprep.py, run_ligprep_slurm.sh) - The ligand and protein are paramaterised, combined, and solvated. Equilibration is carried out.\n", + " - Ligand preparation (ligprep.py, run_ligprep_slurm.sh) - The ligand and protein are parameterised, combined, and solvated. Equilibration is carried out.\n", "\n", " - FEP preparation (fepprep.py, run_fepprep_slurm.sh) - For the perturbation, the ligands are mapped according to their maximum common substructure, and a perturbable system is created. The folders for the FEP run for SOMD or GROMACS are written.\n", "\n", - " - Running the production windows (run_production_slurm.sh) - As each lambda window can be run independantly of other lambda windows, this is where most of the parallelisation takes place. Each window is submitted as part of a slurm array job.\n", + " - Running the production windows (run_production_slurm.sh) - As each lambda window can be run independently of other lambda windows, this is where most of the parallelisation takes place. Each window is submitted as part of a slurm array job.\n", "\n", " - Analysis (analysis.py, run_analysis_slurm.sh) - A simple analysis, outputting the data in a format suitable for the analysis tutorial.\n", "\n", - "Older scripts, including one for an LSF cluster, are in the `04_fep/fep_archiv` folder.\n", - "\n", - "As these would take too long to run and analyse in the span of a workshop, sample outputs are available in the analysis folder for the next part of the tutorial. Example outputs for the exercises in this tutorial are available in the `example_output/example_output_setup` folder.\n", - "\n", - "
Note: Checkout the next tutorial
\n", + "Older scripts, including one for an LSF cluster, are in the `04_fep/fep_archiv` folder." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow.\n", "\n", - "This will cover how to analyse the results for an RBFE Network. You can get started with the setup notebook by following this link:\n", - "[02_analysis_rbfe.ipynb](02_analysis_rbfe.ipynb)" + "
\n", + "\n", + "
\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow" + "As these would take too long to run and analyse in the span of a workshop, sample outputs are available in the analysis folder for the next part of the tutorial. Example outputs for the exercises in this tutorial are available in the `example_output/example_output_setup` folder.\n", + "\n", + "
Note: Checkout the next tutorial
\n", + "\n", + "This will cover how to analyse the results for an RBFE Network. You can get started with the setup notebook by following this link:\n", + "[02_analysis_rbfe.ipynb](02_analysis_rbfe.ipynb)" ] }, { diff --git a/04_fep/02_RBFE/01_setup_rbfe.md b/04_fep/02_RBFE/01_setup_rbfe.md index 501f3bd..85b194d 100644 --- a/04_fep/02_RBFE/01_setup_rbfe.md +++ b/04_fep/02_RBFE/01_setup_rbfe.md @@ -610,16 +610,23 @@ Once all the files are written, the folder can be copied to a computing cluster Th run_all_slurm.sh calls the following scripts in order: - - Ligand preparation (ligprep.py, run_ligprep_slurm.sh) - The ligand and protein are paramaterised, combined, and solvated. Equilibration is carried out. + - Ligand preparation (ligprep.py, run_ligprep_slurm.sh) - The ligand and protein are parameterised, combined, and solvated. Equilibration is carried out. - FEP preparation (fepprep.py, run_fepprep_slurm.sh) - For the perturbation, the ligands are mapped according to their maximum common substructure, and a perturbable system is created. The folders for the FEP run for SOMD or GROMACS are written. - - Running the production windows (run_production_slurm.sh) - As each lambda window can be run independantly of other lambda windows, this is where most of the parallelisation takes place. Each window is submitted as part of a slurm array job. + - Running the production windows (run_production_slurm.sh) - As each lambda window can be run independently of other lambda windows, this is where most of the parallelisation takes place. Each window is submitted as part of a slurm array job. - Analysis (analysis.py, run_analysis_slurm.sh) - A simple analysis, outputting the data in a format suitable for the analysis tutorial. Older scripts, including one for an LSF cluster, are in the `04_fep/fep_archiv` folder. +Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow. + +
+ +
+ + As these would take too long to run and analyse in the span of a workshop, sample outputs are available in the analysis folder for the next part of the tutorial. Example outputs for the exercises in this tutorial are available in the `example_output/example_output_setup` folder.
Note: Checkout the next tutorial
@@ -627,6 +634,4 @@ As these would take too long to run and analyse in the span of a workshop, sampl This will cover how to analyse the results for an RBFE Network. You can get started with the setup notebook by following this link: [02_analysis_rbfe.ipynb](02_analysis_rbfe.ipynb) -Alternatively, the contents of this workflow, including setup, production and analysis, can be run using our snakemake RBFE workflow. This workflow, along with a guide for deploying it at scale using SLURM, can be found here: https://github.com/OpenBioSim/rbfe_workflow - diff --git a/04_fep/02_RBFE/get_tutorial.py b/04_fep/02_RBFE/get_tutorial.py index 2f274a1..5fe05c4 100644 --- a/04_fep/02_RBFE/get_tutorial.py +++ b/04_fep/02_RBFE/get_tutorial.py @@ -3,15 +3,15 @@ links = { "01": ( "inputs.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EfHshdM9FoVBvAXUp0x1zxMBcoGb4nNcfnSkkxfj51ij6g?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EVlmB0LOdZ9FvFihBzMiUKwBBsHX0HxKQXMM3Si0t1_J7g?download=1", ), "02": ( "analysis.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EQ8kWX_hGy5PvzhqvnLWpMwBaqxd_Cd2ez5zEjFI0EfT2g?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EQJayn0PWv9Nm_Ql8I2XEFUBm7Z4kkPAPDtYLDG0hmmiRQ?download=1", ), "03": ( "example_output.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EbPiCqbEriZCuhP0SMkRLX0BKdvODAkjIxPDtUf1t8CxmA?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EVCa3MQvEM1Kvc2wTxxZQpgB5ujW1oS3h-c0-OCIS4eGaQ?download=1", ), } diff --git a/04_fep/03_ABFE/get_tutorial.py b/04_fep/03_ABFE/get_tutorial.py index fb7aa4e..0d4f7ae 100644 --- a/04_fep/03_ABFE/get_tutorial.py +++ b/04_fep/03_ABFE/get_tutorial.py @@ -3,15 +3,15 @@ links = { "01": ( "input.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EZSZkfg60i5OmU1KqvQCSkwBLDu56K9Q_dAreagL3i2IoQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/Ed8O5PzOg5dDkiXleq3cM-8BPWgDN0mQKOvqAJwehEYK5g?download=1", ), "02": ( "output.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/Eakue8dBxrVBjBj1p6p6r04BnKhgJaynZ7oCx7UXCut_oA?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/ET0OlDt1CAVPgf9X2J59rOcBCXcLZ3IHr1PiKriEaFGj8A?download=1", ), "03": ( "example_output.tar.bz2", - "https://openbiosim-my.sharepoint.com/:u:/g/personal/director_openbiosim_org/EW0ii-odLAJIqz2exgZxSbMB_hgkfRtSBHmkeH6cnANJLQ?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EbFoczNb57lOqzY9Q2_Us3UB7AkojHxgk2ZPPFxbkqjmNw?download=1", ), } diff --git a/LIVECOMS/04_fep/livecoms.tex b/LIVECOMS/04_fep/livecoms.tex index 9b0dc65..65ac044 100644 --- a/LIVECOMS/04_fep/livecoms.tex +++ b/LIVECOMS/04_fep/livecoms.tex @@ -43,7 +43,8 @@ \subsubsection{RBFE calculation pipelines} \\ Processing the entire TYK2 dataset involves setting up and running several hundred MD simulations of solvated ligands and protein-ligand complexes. This would be impractically slow if executed from a notebook on a single workstation. For convenience, we provide a sample \href{https://github.com/OpenBioSim/biosimspace_tutorials/blob/main/04_fep/02_RBFE/scripts/run_all_slurm.sh}{slurm submission script} that processes the setup, simulation and analysis of the entire network constructed by the RBFE setup notebook on an HPC environment. This script may be adjusted for deployment on different slurm clusters or as reference for the implementation of the execution model on different schedulers. The functionality covered by this notebook is illustrated in Figure \ref{rbfe_setup_fig}. \\ - +Alternatively the full pipeline, including setup, minimisation, equilibration, production and analysis can be deployed using our \href{https://github.com/OpenBioSim/rbfe_workflow}{snakemake pipeline}. This pipeline can be deployed directly on local compute, or deployed within an HPC environment. +\\ \begin{figure}[htp] \includegraphics[width=\linewidth]{LIVECOMS/04_fep/rbfe-setup.png} \caption{ \textbf{A)} Schematic of the RBFE pipeline in this tutorial. Whereas blue boxes represent notebooks run on a local machine, orange boxes represent Python scripts run sequentially on a computing cluster. diff --git a/LIVECOMS/main.tex b/LIVECOMS/main.tex index 63c22cb..e47e9e8 100644 --- a/LIVECOMS/main.tex +++ b/LIVECOMS/main.tex @@ -160,6 +160,11 @@ \subsection{Software/system requirements and installation} \item Amber 22 (Used in Tutorials 3 and 4) \url{https://ambermd.org/AmberMD.php} \end{itemize} +Users wishing to deploy RBFE pipelines via the OpenBioSim Snakemake workflow will need to use the pipelines available at: +\begin{itemize} + \item \url{https://github.com/OpenBioSim/rbfe_workflow} +\end{itemize} + We recommend following the installation instructions available at \githubrepository to install all the required dependencies. OpenBioSim also provides access to a complete BSS environment with all required dependencies to run the tutorial suite via a free Jupyter Hub server hosted at \url{https://www.openbiosim.org/demos}. Login requires a valid GitHub user account. @@ -219,7 +224,7 @@ \section{Author Contributions} % See the policies ``Policies on Authorship'' section of https://livecoms.github.io % for more information on deciding on authorship and author order. %%%%%%%%%%%%%%%% -LH prepared Tutorial 1, DL and LH prepared Tutorial 2, AH and LH prepared Tutorial 3, JS, AK, LH, AH, FC, and JM prepared Tutorial 4, which was built on older tutorial material by AM and SB and on contributions from ZW, MS, and BC. MB and CW reviewed and tested all tutorials and ported the tutorials to a web server. The authors are listed in alphabetical order, with the exception of the first coauthor. +LH prepared Tutorial 1, DL and LH prepared Tutorial 2, AH and LH prepared Tutorial 3, JS, AK, LH, AH, FC, MB and JM prepared Tutorial 4, which was built on older tutorial material by AM and SB and on contributions from ZW, MS, and BC. MB and CW reviewed and tested all tutorials and ported the tutorials to a web server. The authors are listed in alphabetical order, with the exception of the first coauthor. % We suggest you preserve this comment: For a more detailed description of author's contributions, see the GitHub issue tracking and changelog at \githubrepository. From 290da5eaffb0a2d2c323bd16d9cd01e2e192e11e Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 22 Oct 2025 15:34:44 +0100 Subject: [PATCH 7/9] Post-testing changes, including slight update to node filepaths and updated README --- 01_introduction/05_running_nodes.ipynb | 17 +- 01_introduction/05_running_nodes.md | 245 ++++--------------------- 04_fep/03_ABFE/get_tutorial.py | 4 +- README.md | 8 +- 4 files changed, 51 insertions(+), 223 deletions(-) diff --git a/01_introduction/05_running_nodes.ipynb b/01_introduction/05_running_nodes.ipynb index bb6e62c..b02c935 100644 --- a/01_introduction/05_running_nodes.ipynb +++ b/01_introduction/05_running_nodes.ipynb @@ -219,7 +219,8 @@ "metadata": {}, "outputs": [], "source": [ - "input = {\"files\": [\"inputs/ala.crd\", \"inputs/ala.top\"], \"steps\": 1000}" + "import os\n", + "input = {\"files\": [os.path.abspath(\"inputs/ala.crd\"), os.path.abspath(\"inputs/ala.top\")], \"steps\": 1000}" ] }, { @@ -235,7 +236,7 @@ "metadata": {}, "outputs": [], "source": [ - "output = BSS.Node.run(\"minimise\", input)" + "output = BSS.Node.run(\"minimise\", input, work_dir=\"TEST\")" ] }, { @@ -328,11 +329,18 @@ "source": [ "!bash scripts/workflow.sh" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "bsstutorials", "language": "python", "name": "python3" }, @@ -345,8 +353,7 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" + "pygments_lexer": "ipython3" } }, "nbformat": 4, diff --git a/01_introduction/05_running_nodes.md b/01_introduction/05_running_nodes.md index bcbefed..13af03a 100644 --- a/01_introduction/05_running_nodes.md +++ b/01_introduction/05_running_nodes.md @@ -1,11 +1,16 @@ Author: Lester Hedges
Email:   lester.hedges@bristol.ac.uk -# Running nodes +___Jupyter Recap___: +* Press Shift+Enter to execute a cell and move to the cell below. +* Press Ctrl+Enter to execute a cell and remain in that cell. +* Run a shell command on the underlying operating system by prefixing the command with an exclamation mark, ! +* Remember that the flow is in the order that you execute cells, which is not necessarily linear in the notebook. Keep track of the numbers in brackets to the left of the cell! + -The companion notebook for this section can be found [here](https://github.com/michellab/BioSimSpaceTutorials/blob/4844562e7d2cd0b269cead56562ec16a3dfaef7c/01_introduction/05_running_nodes.ipynb) +# Running nodes -The previous section showed you how to write a node to perform minimisation of a molecular system within an interactive Jupyter notebook. Here we introduce you to some of the other ways of running BioSimSpace nodes, showing how the same script can be used in several different ways. +The previous notebook showed you how to write a node to perform minimisation of a molecular system within an interactive Jupyter notebook. This notebook introduces you to some of the other ways of running BioSimSpace nodes, showing how the same script can be used in several different ways. ## Running nodes on the command-line @@ -15,49 +20,10 @@ From the command-line, we can query the node to see what it does and get informa ```python -python nodes/minimise.py --help +!python nodes/minimise.py --help ``` - usage: minimise.py [-h] [-c CONFIG] [-v [VERBOSE]] [--export-cwl [EXPORT_CWL]] - [--strict-file-naming [STRICT_FILE_NAMING]] --files FILES - [FILES ...] [--steps STEPS] - [--engine {Amber,Gromacs,Namd,OpenMM,Somd,auto}] - - A node to perform energy minimisation and save the minimised molecular - configuration to file. - - Args that start with '--' (e.g. --arg) can also be set in a config file - (specified via -c). The config file uses YAML syntax and must represent a YAML - 'mapping' (for details, see http://learn.getgrav.org/advanced/yaml). If an arg - is specified in more than one place, then commandline values override config - file values which override defaults. - - Output: - minimised: FileSet The minimised molecular system. - - Required arguments: - --files FILES [FILES ...] - A set of molecular input files. - - Optional arguments: - -h, --help Show this help message and exit. - -c CONFIG, --config CONFIG - Path to configuration file. - -v [VERBOSE], --verbose [VERBOSE] - Print verbose error messages. - --export-cwl [EXPORT_CWL] - Export Common Workflow Language (CWL) wrapper and exit. - --strict-file-naming [STRICT_FILE_NAMING] - Enforce that the prefix of any file based output matches its name. - --steps STEPS The number of minimisation steps. - default=10000 - min=0, max=1000000 - --engine {Amber,Gromacs,Namd,OpenMM,Somd,auto} - The molecular dynamics engine. - default=auto - - -In the previous section, input was achieved via a graphical user interface where the user could configure options and upload files. On the command-line, inputs must be set as command-line arguments. From the information provided in the node itself, i.e. the description, the definition of inputs and outputs, BioSimSpace has autogenerated a nicely formatted [argparse](https://docs.python.org/3/library/argparse.html) help message that describes how the node works. The information shows all of the inputs and outputs, let's us know which inputs are optional, and specifies any default values or constraints. +In the previous notebook, input was achieved via a graphical user interface where the user could configure options and upload files. On the command-line, inputs must be set as command-line arguments. From the information provided in the node itself, i.e. the description, the definition of inputs and outputs, BioSimSpace has autogenerated a nicely formatted [argparse](https://docs.python.org/3/library/argparse.html) help message that describes how the node works. The information shows all of the inputs and outputs, let's us know which inputs are optional, and specifies any default values or constraints. Note that it's possible to pass options to the node in various ways, e.g. directly on the command-line, using a [YAML](https://en.wikipedia.org/wiki/YAML) configuration file, or even using environment variables. This provides a lot of flexibility in the way in which BioSimSpace nodes can be run. For now we'll just pass arguments on the command-line. @@ -65,80 +31,63 @@ Try running the node without any arguments and seeing what the output is: ```python -python nodes/minimise.py +!python nodes/minimise.py ``` - usage: minimise.py [-h] [-c CONFIG] [-v [VERBOSE]] [--export-cwl [EXPORT_CWL]] - [--strict-file-naming [STRICT_FILE_NAMING]] --files FILES - [FILES ...] [--steps STEPS] - [--engine {Amber,Gromacs,Namd,OpenMM,Somd,auto}] - minimise.py: error: the following arguments are required: --files - - Thankfully we've provided some files for you. As before, these are found in the `input` directory. ```python -ls inputs/ala* +from get_tutorial import download +download() +!ls inputs/ala* ``` - inputs/ala.crd inputs/ala.top - - (The files define a solvated alanine dipeptide system in [AMBER](http://ambermd.org) format.) Let's now run the minimisation node using these files as input. In the interests of time, let's also reduce the number of steps to 1000. The files can be passed to the script in various ways. All of the following are allowed: ```bash -python nodes/minimisation.py --steps=1000 --files="inputs/ala.crd, inputs/ala.top" -python nodes/minimisation.py --steps=1000 --files inputs/ala.crd inputs/ala.top -python nodes/minimisation.py --steps=1000 --files inputs/ala.* +!python nodes/minimisation.py --steps=1000 --files="inputs/ala.crd, inputs/ala.top" +!python nodes/minimisation.py --steps=1000 --files inputs/ala.crd inputs/ala.top +!python nodes/minimisation.py --steps=1000 --files inputs/ala.* ``` ```python -python nodes/minimise.py --steps=1000 --files inputs/ala.* +!python nodes/minimise.py --steps=1000 --files inputs/ala.* ``` -We should find that the minimised molecular system has been written to the working directory. +Once the process has finished running (the asterisk to the left of the cell will disappear) we should find that the minimised molecular system has been written to the working directory. ```python -ls minimised.* +!ls minimised.* ``` - minimised.prm7 minimised.rst7 - - Note that the files have been written in the same format as the original molecular system, i.e. AMBER. We have also provided some GROMACS format input files. ```python -ls inputs/kigaki.* +!ls inputs/kigaki.* ``` - inputs/kigaki.gro inputs/kigaki.top - - Let's now run the node using these files as input. This is a larger system so the minimisation will take a little longer. ```python -python nodes/minimise.py --steps=1000 --files inputs/kigaki.* +!python nodes/minimise.py --steps=1000 --files inputs/kigaki.* ``` -There should now be two additional GROMACS format output files in the working directory. +There should now be two additional GROMACS format output files in the working directory. (Remember that they won't appear until the cell above finishes running.) ```python -ls minimised.* +!ls minimised.* ``` - minimised.gro minimised.prm7 minimised.rst7 minimised.top - - ## Running nodes from within BioSimSpace BioSimSpace also provides functionality for running nodes internally. This allows you to call a node from within a script, thereby using existing nodes as building blocks for more complicated workflows. To activate nodes you can point BioSimSpace to a directory in which they are contained. As such, you can maintain your own internal nodes and have them available users when needed. @@ -153,13 +102,6 @@ BSS.Node.setNodeDirectory("nodes") BSS.Node.list() ``` - - - - ['equilibrate', 'minimise', 'parameterise', 'solvate'] - - - To get information about a particular node we can pass its name to the help function: @@ -167,60 +109,19 @@ To get information about a particular node we can pass its name to the help func BSS.Node.help("minimise") ``` - usage: minimise.py [-h] [-c CONFIG] [-v [VERBOSE]] [--export-cwl [EXPORT_CWL]] - [--strict-file-naming [STRICT_FILE_NAMING]] --files FILES - [FILES ...] [--steps STEPS] - [--engine {Amber,Gromacs,Namd,OpenMM,Somd,auto}] - - A node to perform energy minimisation and save the minimised molecular - configuration to file. - - Args that start with '--' (e.g. --arg) can also be set in a config file - (specified via -c). The config file uses YAML syntax and must represent a YAML - 'mapping' (for details, see http://learn.getgrav.org/advanced/yaml). If an arg - is specified in more than one place, then commandline values override config - file values which override defaults. - - Output: - minimised: FileSet The minimised molecular system. - - Required arguments: - --files FILES [FILES ...] - A set of molecular input files. - - Optional arguments: - -h, --help Show this help message and exit. - -c CONFIG, --config CONFIG - Path to configuration file. - -v [VERBOSE], --verbose [VERBOSE] - Print verbose error messages. - --export-cwl [EXPORT_CWL] - Export Common Workflow Language (CWL) wrapper and exit. - --strict-file-naming [STRICT_FILE_NAMING] - Enforce that the prefix of any file based output matches its name. - --steps STEPS The number of minimisation steps. - default=10000 - min=0, max=1000000 - --engine {Amber,Gromacs,Namd,OpenMM,Somd,auto} - The molecular dynamics engine. - default=auto - - - To execute a node we use the `run` function. This takes a dictionary of input values and returns another dictionary containing the outputs. Let's generate a valid input dictionary: ```python -input = {"files" : ["inputs/ala.crd", "inputs/ala.top"], - "steps" : 1000 - } +import os +input = {"files": [os.path.abspath("inputs/ala.crd"), os.path.abspath("inputs/ala.top")], "steps": 1000} ``` We can now run the `minimise` node, passing the dictionary from above: ```python -output = BSS.Node.run("minimise", input) +output = BSS.Node.run("minimise", input, work_dir="TEST") ``` Finally, let's print the output dictionary to see the result of running the node: @@ -230,98 +131,20 @@ Finally, let's print the output dictionary to see the result of running the node print(output) ``` - {'minimised': ['/home/lester/Code/BioSimSpaceTutorials/01_introduction/minimised.prm7', '/home/lester/Code/BioSimSpaceTutorials/01_introduction/minimised.rst7']} - - BioSimSpace nodes can also autogenerate their own [Common Workflow Language](https://www.commonwl.org/) (CWL) tool wrappers, allowing them to be plugged into any workflow engine that supports the standard. To generate a wrapper, simply pass the `--export-cwl` argument when running the node, e.g.: ```python -python nodes/equilibrate.py --export-cwl +!python nodes/equilibrate.py --export-cwl ``` Let's examine the wrapper: ```python -cat nodes/equilibrate.cwl +!cat nodes/equilibrate.cwl ``` - cwlVersion: v1.0 - class: CommandLineTool - baseCommand: ["/home/lester/.conda/envs/biosimspace-dev/bin/python", "/home/lester/Code/BioSimSpaceTutorials/01_introduction/nodes/equilibrate.py", "--strict-file-naming"] - - inputs: - files: - type: - - type: array - items: File - inputBinding: - prefix: --files - separate: true - - runtime: - type: string? - default: 0.02 nanosecond - inputBinding: - prefix: --runtime - separate: true - - temperature_start: - type: string? - default: 0.0 kelvin - inputBinding: - prefix: --temperature_start - separate: true - - temperature_end: - type: string? - default: 300.0 kelvin - inputBinding: - prefix: --temperature_end - separate: true - - restraint: - type: string? - default: none - inputBinding: - prefix: --restraint - separate: true - - report_interval: - type: int? - default: 100 - inputBinding: - prefix: --report_interval - separate: true - - restart_interval: - type: int? - default: 500 - inputBinding: - prefix: --restart_interval - separate: true - - engine: - type: string? - default: auto - inputBinding: - prefix: --engine - separate: true - - outputs: - equilibrated: - type: - type: array - items: File - outputBinding: - glob: "equilibrated.*" - trajectory: - type: File - outputBinding: - glob: "trajectory.*" - - As a simple example of chaining BioSimSpace nodes in a command-line workflow, consider the following script: @@ -353,12 +176,10 @@ Let's run the workflow: ```python -bash scripts/workflow.sh +!bash scripts/workflow.sh ``` - Parameterising... - Solvating... - Minimising... - Equilibrating... - Done! +```python + +``` diff --git a/04_fep/03_ABFE/get_tutorial.py b/04_fep/03_ABFE/get_tutorial.py index 0d4f7ae..c0a3afa 100644 --- a/04_fep/03_ABFE/get_tutorial.py +++ b/04_fep/03_ABFE/get_tutorial.py @@ -7,11 +7,11 @@ ), "02": ( "output.tar.bz2", - "https://openbiosim.sharepoint.com/:u:/s/public/ET0OlDt1CAVPgf9X2J59rOcBCXcLZ3IHr1PiKriEaFGj8A?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/EbFoczNb57lOqzY9Q2_Us3UB7AkojHxgk2ZPPFxbkqjmNw?download=1", ), "03": ( "example_output.tar.bz2", - "https://openbiosim.sharepoint.com/:u:/s/public/EbFoczNb57lOqzY9Q2_Us3UB7AkojHxgk2ZPPFxbkqjmNw?download=1", + "https://openbiosim.sharepoint.com/:u:/s/public/ET0OlDt1CAVPgf9X2J59rOcBCXcLZ3IHr1PiKriEaFGj8A?download=1", ), } diff --git a/README.md b/README.md index 36a8125..a093c04 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ A suite of tutorials that provide an introduction to BioSimSpace, and examples o covering different scientific use cases. These tutorials have been tested with BioSimSpace 2023.5.0 on a linux-64 platform and require the following dependencies -* Gromacs (tested with 2023.1) -* AmberTools (tested with 23.3) +* Gromacs (tested with 2025.3) +* AmberTools (tested with 24.8) * PLUMED (tested with 2.9.0) -* cinnabar (tested with 0.4.1) -* alchemlyb (tested with 1.0.1) +* cinnabar (tested with 0.5.0) +* alchemlyb (tested with 2.4.1) # Installation instructions From 4a1d0da8d9ede835edd8db26511701dde6eb1f38 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 22 Oct 2025 15:35:22 +0100 Subject: [PATCH 8/9] Blacken node running notebook --- 01_introduction/05_running_nodes.ipynb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/01_introduction/05_running_nodes.ipynb b/01_introduction/05_running_nodes.ipynb index b02c935..b442c4d 100644 --- a/01_introduction/05_running_nodes.ipynb +++ b/01_introduction/05_running_nodes.ipynb @@ -73,6 +73,7 @@ "outputs": [], "source": [ "from get_tutorial import download\n", + "\n", "download()\n", "!ls inputs/ala*" ] @@ -220,7 +221,11 @@ "outputs": [], "source": [ "import os\n", - "input = {\"files\": [os.path.abspath(\"inputs/ala.crd\"), os.path.abspath(\"inputs/ala.top\")], \"steps\": 1000}" + "\n", + "input = {\n", + " \"files\": [os.path.abspath(\"inputs/ala.crd\"), os.path.abspath(\"inputs/ala.top\")],\n", + " \"steps\": 1000,\n", + "}" ] }, { From 7433e5849dce9255ddc9c6f353054933e981e494 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 22 Oct 2025 15:37:08 +0100 Subject: [PATCH 9/9] Update python version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a093c04..4e63a85 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This route can be used to install the tutorials on a computer. We recommend using mamba to install the dependencies. ``` -conda create -n bsstutorials "python<3.11" +conda create -n bsstutorials "python<3.12" conda install -c conda-forge mamba mamba install -n bsstutorials -c openbiosim -c conda-forge biosimspace=2023.5.0 gromacs=2023.1 ambertools=23.3 plumed=2.9.0 cinnabar=0.3.0 pymbar=3 alchemlyb=1.0.1 mamba activate bsstutorials