diff --git a/README.md b/README.md index 1917b90..2bf58a6 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![full_tests](https://github.com/OpenFreeEnergy/ExampleNotebooks/actions/workflows/CI.yml/badge.svg)](https://github.com/OpenFreeEnergy/ExampleNotebooks/actions/workflows/CI.yml) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenFreeEnergy/ExampleNotebooks/master.svg)](https://results.pre-commit.ci/latest/github/OpenFreeEnergy/ExampleNotebooks/main) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/OpenFreeEnergy/ExampleNotebooks/HEAD) +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/OpenFreeEnergy/ExampleNotebooks/blob/switch_to_colab/openmm-rbfe/OpenFE_showcase_1_RBFE_of_T4lysozyme.ipynb) # OpenFE Notebooks diff --git a/easyCampaign/Cli Demo.ipynb b/easyCampaign/Cli Demo.ipynb new file mode 100644 index 0000000..a94096f --- /dev/null +++ b/easyCampaign/Cli Demo.ipynb @@ -0,0 +1,110 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "785f29f9-889f-43ea-93ed-824de546993b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# NBVAL_SKIP\n", + "!pip install -q condacolab\n", + "import condacolab\n", + "condacolab.install_from_url(\"https://github.com/OpenFreeEnergy/ExampleNotebooks/releases/download/april-2023/OpenFEforge-0.7.4-Linux-x86_64.sh\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c23f5c0d-a36e-43f5-9f1e-1e3f3fba80ea", + "metadata": {}, + "outputs": [], + "source": [ + "# NBVAL_SKIP\n", + "# If this check fails, re-run\n", + "import condacolab\n", + "condacolab.check()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4a9a49bd-4520-4ca6-96e1-378559248ac4", + "metadata": {}, + "outputs": [], + "source": [ + "# NBVAL_SKIP\n", + "from IPython.display import JSON\n", + "from google.colab import output\n", + "from subprocess import getoutput\n", + "import os\n", + "\n", + "def shell(command):\n", + " if command.startswith('cd'):\n", + " path = command.strip().split(maxsplit=1)[1]\n", + " os.chdir(path)\n", + " return JSON([''])\n", + " return JSON([getoutput(command)])\n", + "output.register_callback('shell', shell)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cc0b6da8-b400-4795-8f31-10d00e941449", + "metadata": {}, + "outputs": [], + "source": [ + "# NBVAL_SKIP\n", + "#@title Colab Shell\n", + "%%html\n", + "
\n", + "\n", + "\n", + "\n", + "