openad


Nameopenad JSON
Version 0.2.7 PyPI version JSON
download
home_pagehttps://www.accelerate.science/
SummaryOpen Accelerated Discovery Client
upload_time2024-03-22 04:14:03
maintainerNone
docs_urlNone
authorPhil Downey
requires_python<3.12,>=3.10
licenseMIT
keywords deepsearch rxn jupyter magic commands accelerated discovery science retrosynthesis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            <!--

For screenshots to look good, they should be small and ideally
all the same size. The script below lets you open the URLs in
the right size. Just paste this into the browser console and
press enter.

To take the screenshots with browser UI included on Mac, press
cmd+shift+4 followed by the spacebar, then click the window.
For consistency, stick to Chrome.

- - -

urls = [
    'https://cps.foc-deepsearch.zurich.ibm.com',
    'https://rxn.app.accelerate.science',
    'https://sds.app.accelerate.science',
    'https://platform.openai.com/account/api-keys'
]
for (var i=0; i< urls.length; i++) {
    window.open(urls[i], '_blank', 'width=1000,height=600');
}

-->

# OpenAD Beta
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openad)](https://pypi.org/project/openad/)
[![PyPI version](https://img.shields.io/pypi/v/openad)](https://pypi.org/project/openad/)
[![License MIT](https://img.shields.io/github/license/acceleratedscience/open-ad-toolkit)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Docs](https://img.shields.io/badge/website-live-brightgreen)](https://acceleratedscience.github.io/openad-docs/)

**Open Accelerated Discovery Client**<br>
[Documentation](https://acceleratedscience.github.io/openad-docs/)

OpenAD is an open-source framework developed by IBM Research, aggregating a number of molecular science toolkits into a single API that can be accessed by command line, a Jupyter Notebook and (soon) an API.

The goal of openAD is to provide a common language for scientists to interact with a multitude of of molecular tools to simplify the triage process and drastically accelerate your development timelines.

---
> **Pre-install Note:** 
For updating to 0.2.0 first remove toolkits `remove toolkit DS4SD` and `remove toolkit RXN` prior to updating

> **Whats New ?**
- Increased number of Molecules Functions for retrieving from pubchem molecules or creating your own in a working set, including visualisation, tracking of source info
- 3D displaying of molecules in your working set or direct from pubchem
- Attaching Analysis to target Molecules with the `enrich` command
- Enhanced Help and Tell Me command
- Linking to source documents in DeepSearch
- merging molecules and molsets together
- easy access to dataframes and results sets with the new `result` command
- smaller install package
- introductory molecule viewer

**Note: uninstall all toolkits before installing the new version**

## Quick Install <!-- omit from toc -->

> **Note:** This will install OpenAD in your global space. If you wish to use a virtual environment, please see more [detailed instructions](#installation) below.

    pip install openad
    openad


Get started with Jupyter:

    init_magic
    init_examples
    jupyter lab ~/openad_notebooks/Table_of_Contents.ipynb

<br>

---

### Before You Start <!-- omit from toc -->

-   OpenAD is available for Linux and MacOS
-   We support Windows 11 via WSL 2 (ubuntu 22.04) - see [Installing on Windows](#installing-on-windows)
-   When not installing into a virtual environment on MacOS, you may need to use `python3` and `pip3` instead of `python` and `pip` respectively<br>

## Table of Contents <!-- omit from toc -->

- [OpenAD Beta](#openad-beta)
- [Installation](#installation)
- [Getting Started - CLI](#getting-started---cli)
- [Getting Started - Jupyter](#getting-started---jupyter)
  - [Setting up Jupyter](#setting-up-jupyter)
  - [Launching OpenAD in Jupyter](#launching-openad-in-jupyter)
- [Interacting with the Toolkits](#interacting-with-the-toolkits)
    - [Registration](#registration)
    - [Adding a Toolkit](#adding-a-toolkit)
    - [Sample Commands](#sample-commands)
    - [Running Bash Commands (CLI)](#running-bash-commands-cli)
- [AI Assistant](#ai-assistant)
- [For Developers](#for-developers)
  - [Installation for Development](#installation-for-development)
  - [Testing a branch](#testing-a-branch)
- [Installing on Windows](#installing-on-windows)
  - [Before you start](#before-you-start)
  - [Installing WSL](#installing-wsl)
- [Linux Notes](#linux-notes)


---

<br>

# Installation

> **Note:** Contributors should skip to [Installation for Development](#installation-for-development)<br>
> **Note:** Linux users may want to check the [Linux Notes](#linux-notes)<br>
> **Note:** If you prefer using poetry and you know what you're doing, you can skip the instructions below and run `poetry add openad` instead.

1.  **Step 0: Before you start**<br>
Ensure you're running Python 3.10 or 3.11. There's multiple ways of updating Python, we'll use pyenv.

    > **Note:** Due to an issue with one of our dependencies, Python 3.12 is not yet supported.

        git clone https://github.com/pyenv/pyenv.git ~/.pyenv
        pyenv install 3.10

1.  **Step 1: Set up your virtual environment** (optional)<br>

        python -m venv ~/ad-venv
        source ~/ad-venv/bin/activate

    > **Note:** To exit the virtual environment, you can run `deactivate`

2.  **Step 2: Installation**

        pip install openad

<br>

# Getting Started - CLI

-   **Enter the virtual environment**
    
    > **Note:** If you just installed OpenAD, you probably already activated the virtual environment.

        source ~/ad-venv/bin/activate

-   **Enter the command shell**

        openad

    <!-- ![Landing](assets/screenshot-landing.png) -->
    <!-- <a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/screenshot-landing.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/screenshot-landing.png" /></a> -->

-   **Exit the command shell**<br>
    Hit `ctrl+c` or run:

        exit

-   **Run a single command from outside the command shell**

        openad <command>

-   **Exit the virtual environment**<br>

        deactivate

<br>

# Getting Started - Jupyter

## Setting up Jupyter

The following commands only need to be run once after installation:

1.  **Activate your virtual environment**

    > **Note:** If you just installed OpenAD, you probably already activated the virtual environment.

        source ~/ad-venv/bin/activate

1.  **Create an iPython kernel**<br>
    This ports your virtual environment to Jupyter.

        python -m ipykernel install --user --name=ad-venv
    
    > **Note:** To list your installed iPython kernels, you can run `jupyter kernelspec list`, and to remove the kernel you can run `jupyter kernelspec uninstall ad-venv`

1.  **Install the magic commands**<br>
    This enables OpenAD commands to be run within a Jupyter Notebook.

        init_magic
    
    <details>
    <summary><b>Alternative:</b> Manually add magic commands</summary>
    <div markdown="block">

    If you don't want to activate magic commands in all Notebooks, you can instead activate them for individual Notebooks.
    - Run `init_examples`
    - Copy the file `~/openad_notebooks/openad.ipynb` to the same directory as the Notebook you wish to activate.
    - In your Notebook, run this inside a code cell: `!run openad.ipynb`
	
    </div>
    </details>


2.  **Install example Notebooks**<br>
    This installs our example Notebooks at `~/openad_notebooks`.
    
        init_examples

## Launching OpenAD in Jupyter

1.  **Open any Notebook**<br>
    The following command will open up the example Notebook:

        jupyter lab ~/openad_notebooks/Table_of_Contents.ipynb

2.  **Select the kernel**<br>
    Make sure to select the "ad-venv" iPython kernel. You can do this under _Kernel > Change Kernel_, or in the latest versions of Jupyter by clicking the kernel name in the top right hand corner. If you don't see your iPython kernel, make sure you followed the Jupyter Setup instructions listed above.

<figure>
    <a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-notebook-kernel.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-notebook-kernel.png"></a>
    <figcaption align="center" style="font-size:0.9em;opacity:.6;margin-top:-30px;margin-bottom:50px"><i>Jupyter Notebook</i></figcaption>
</figure>
<figure>
    <a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-lab-kernel.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-lab-kernel.png"></a>
    <figcaption align="center" style="font-size:0.9em;opacity:.6;margin-top:-30px;margin-bottom:50px"><i>Jupyter Lab</i></figcaption>
</figure>

1.  **Magic Commands**<br>
    Magic commands let you run terminal commands from within Jupyter. They are invoked by the `%openad` prefix. All OpenAD CLI commands can be accessed like this. For example:<br>

        %openad list files

<br>

# Interacting with the Toolkits

OpenAD integrates with `DS4SD`, `RXN`, and has placeholder support for `GT4SD` and `ST4SD`.

<div class="notice" style="margin-top: 16px;" markdown="block">

**&#x26A0; Reminder:** when running commands from Jupyter, prepend them with `%openad`

</div>

### Registration

Before you can interact with the toolkits, you'll need to register with each individual toolkit.

<details>
<summary>Register with DS4SD (Deep Search)</summary>
<div markdown="block">

1. First, you'll need to generate an API key on the Deep Search website.

    - Visit the Deep Search website and create an account:<br>
      [deepsearch-experience.res.ibm.com](https://deepsearch-experience.res.ibm.com)<br>
    - Once logged in, click the Toolkit/API icon in the top right hand corner, then open the HTTP section
    - Click the "Generate new API key" button<br>
      <br>
      <!-- ![Landing](assets/ds4sd-api-key.png) -->
      <a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png" /></a>

1. Once inside the OpenAD client, you'll be prompted to authenticate when activating the Deep Search (DS4SD) toolkit. When running `set context ds4sd` :

   - **Hostname:** [https://sds.app.accelerate.science](https://sds.app.accelerate.science)
   - **Email:** Your email
   - **API_key:** The DS4SD API key you obtained following the instructions above.

1. You should get a message saying you successfully logged in.

    > **Note:** Your DS4SD auth config file is saved as `~/.openad/deepsearch_api.cred`. If you ever want to reset your DS4SD login information you can run `set context ds4sd reset`, or you can delete this file.<br>

</div>
</details>

<details>
<summary>Register with RXN</summary>
<div markdown="block">

1. First, you'll need to generate an API key on the RXN website.

    -   Sign up for an RXN account at [rxn.app.accelerate.science](https://rxn.app.accelerate.science)
    -   Obtain your API key by clicking the user profile icon in the top right hand corner and select "My profile".<br>
        <br>
        <!-- ![Landing](assets/rxn-api-key.png) -->
        <a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png" /></a>

1. When setting the context to RXN using `set context rxn` you'll be prompted to create a new auth configuration file:

    -   **Hostname:** [https://rxn.app.accelerate.science](https://rxn.app.accelerate.science)<br>
    -   **API_key:** The RXN API key you obtained following the instructions above.

1. You should get a message saying you successfully logged in.<br>

    > **Note:** Your RXN auth config file is saved as `~/.openad/rxn_api.cred`. If you ever want to reset your RXN login information you can run `set context rxn reset`, or you can delete this file.<br>

</div>
</details>

### Adding a Toolkit

First install the toolkit, then set the context to this toolkit.

    add toolkit ds4sd
    set context ds4sd

### Sample Commands

    # DS4SD
    display all collections

    # RXN
    list rxn models

### Running Bash Commands (CLI)

To run a command in bash mode, prepend it with `openad` and make sure to escape quotes.

    openad show molecules using file \'base_molecules.sdf\'

<br>

# AI Assistant

To enable our AI assistant, you'll need an account with OpenAI. There is a one month free trial.

> **Note:** watsonx coming soon

1. Go to [platform.openai.com](https://platform.openai.com) and create an account

2. Click on the profile icon in the top right and choose "View API keys"

3. Create a new key

4. Run `tell me` to be prompted for your OpenAI API credentials


<!-- ![Landing](readme/openai-api-key.png) -->

<a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/openai-api-key.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/openai-api-key.png" /></a>

<br>

# For Developers

OpenAD is fully open source and we encourage contributions. We plan to provide documentation on how to integrate your own toolkits in the future.

If you have any questions in the meantime, please [reach out]({% link about.md %}).

## Installation for Development

<details>
<summary>Install using the setup wizard (uses poetry)</summary>
<div markdown="block">

1.  **Step 1: Download the repo**

        git clone https://github.com/acceleratedscience/open-ad-toolkit.git

    > **Note:** To download a specific branch, you can run instead:<br>
    `git clone -b <branch_name> https://github.com/acceleratedscience/open-ad-toolkit.git`

1.  **Step 2: Launch the setup wizard**

        cd open-ad-toolkit
        ./setup.sh

</div>
</details>

<details>
<summary>Install using pip</summary>
<div markdown="block">

1.  **Step 0: Before you start**<br>
Ensure you're running Python 3.10.10 or above. There's multiple ways of doing this, we'll use pyenv.

        git clone https://github.com/pyenv/pyenv.git ~/.pyenv
        pyenv install 3.10

1.  **Step 1: Set up your virtual environment** (optional)<br>

        python -m venv ~/ad-venv
        source ~/ad-venv/bin/activate

    > **Note:** To exit the virtual environment, you can run `deactivate`

1.  **Step 2: Download the repo**

        git clone https://github.com/acceleratedscience/open-ad-toolkit.git

    > **Note:** To download a specific branch, you can run instead:<br>
    `git clone -b <branch_name> https://github.com/acceleratedscience/open-ad-toolkit.git`

1.  **Step 2: Install the requirements**

        cd open-ad-toolkit
        pip install -e .
    
    > **Note:** The -e flag stands for "editable". This means that instead of copying the package's files to the Python site-packages directory as in a regular installation, pip creates a symbolic link (symlink) from your package's source code directory into your Python environment.<br>This way you can make changes to the source code of the package, and those changes are immediately reflected in your Python environment. You don't need to reinstall the package every time you make a change.

</div>
</details>


## Testing a branch

To do a regular install from a particular branch, you can run:

    pip install git+https://github.com/acceleratedscience/open-ad-toolkit.git@<branch_name>

<br>

# Installing on Windows

In order to run OpenAD on Windows 11, you will need to install the Ubuntu WSL package ("Windows Subsystem for Linux").

## Before you start

-   **Verify Windows version**<br>
    To check if you are running Windows 11 or later, press `Win` + `R`, type "winver", and press `Enter`. A window will open showing your Windows version.

-   **Verify WSL**<br>
    To check if you already have WSL installed, run `wsl -l -v` into the terminal. To see more information about your current version of Ubuntu, run `lsb_release -a`

## Installing WSL

Install WSL and create a user called 'openad' or one of your choosing.

    wsl --install Ubuntu-22.04

**Optional:** To setup an Ubuntu Python environment from scratch, continue to [Linux Notes](#linux-notes)

<br>

# Linux Notes

If you wish to setup an Ubuntu Python environment from scratch, run:

    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt update
    sudo apt install python3.11-full
    sudo apt install python3-pip
    sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 100
    sudo pip install pip --upgrade

If you get an error when running `init_magic`, you may first need to setup the default iPython profile for magic commands.

    ipython profile create

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.accelerate.science/",
    "name": "openad",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.10",
    "maintainer_email": null,
    "keywords": "deepsearch, rxn, jupyter, magic commands, accelerated Discovery, science, retrosynthesis",
    "author": "Phil Downey",
    "author_email": "phil.downey1@ibm.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/f6/29407db9a3ed479ab09087a65daa7ce23137bafc1f2c3565866ad559dadc/openad-0.2.7.tar.gz",
    "platform": null,
    "description": "<!--\n\nFor screenshots to look good, they should be small and ideally\nall the same size. The script below lets you open the URLs in\nthe right size. Just paste this into the browser console and\npress enter.\n\nTo take the screenshots with browser UI included on Mac, press\ncmd+shift+4 followed by the spacebar, then click the window.\nFor consistency, stick to Chrome.\n\n- - -\n\nurls = [\n    'https://cps.foc-deepsearch.zurich.ibm.com',\n    'https://rxn.app.accelerate.science',\n    'https://sds.app.accelerate.science',\n    'https://platform.openai.com/account/api-keys'\n]\nfor (var i=0; i< urls.length; i++) {\n    window.open(urls[i], '_blank', 'width=1000,height=600');\n}\n\n-->\n\n# OpenAD Beta\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openad)](https://pypi.org/project/openad/)\n[![PyPI version](https://img.shields.io/pypi/v/openad)](https://pypi.org/project/openad/)\n[![License MIT](https://img.shields.io/github/license/acceleratedscience/open-ad-toolkit)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Docs](https://img.shields.io/badge/website-live-brightgreen)](https://acceleratedscience.github.io/openad-docs/)\n\n**Open Accelerated Discovery Client**<br>\n[Documentation](https://acceleratedscience.github.io/openad-docs/)\n\nOpenAD is an open-source framework developed by IBM Research, aggregating a number of molecular science toolkits into a single API that can be accessed by command line, a Jupyter Notebook and (soon) an API.\n\nThe goal of openAD is to provide a common language for scientists to interact with a multitude of of molecular tools to simplify the triage process and drastically accelerate your development timelines.\n\n---\n> **Pre-install Note:** \nFor updating to 0.2.0 first remove toolkits `remove toolkit DS4SD` and `remove toolkit RXN` prior to updating\n\n> **Whats New ?**\n- Increased number of Molecules Functions for retrieving from pubchem molecules or creating your own in a working set, including visualisation, tracking of source info\n- 3D displaying of molecules in your working set or direct from pubchem\n- Attaching Analysis to target Molecules with the `enrich` command\n- Enhanced Help and Tell Me command\n- Linking to source documents in DeepSearch\n- merging molecules and molsets together\n- easy access to dataframes and results sets with the new `result` command\n- smaller install package\n- introductory molecule viewer\n\n**Note: uninstall all toolkits before installing the new version**\n\n## Quick Install <!-- omit from toc -->\n\n> **Note:** This will install OpenAD in your global space. If you wish to use a virtual environment, please see more [detailed instructions](#installation) below.\n\n    pip install openad\n    openad\n\n\nGet started with Jupyter:\n\n    init_magic\n    init_examples\n    jupyter lab ~/openad_notebooks/Table_of_Contents.ipynb\n\n<br>\n\n---\n\n### Before You Start <!-- omit from toc -->\n\n-   OpenAD is available for Linux and MacOS\n-   We support Windows 11 via WSL 2 (ubuntu 22.04) - see [Installing on Windows](#installing-on-windows)\n-   When not installing into a virtual environment on MacOS, you may need to use `python3` and `pip3` instead of `python` and `pip` respectively<br>\n\n## Table of Contents <!-- omit from toc -->\n\n- [OpenAD Beta](#openad-beta)\n- [Installation](#installation)\n- [Getting Started - CLI](#getting-started---cli)\n- [Getting Started - Jupyter](#getting-started---jupyter)\n  - [Setting up Jupyter](#setting-up-jupyter)\n  - [Launching OpenAD in Jupyter](#launching-openad-in-jupyter)\n- [Interacting with the Toolkits](#interacting-with-the-toolkits)\n    - [Registration](#registration)\n    - [Adding a Toolkit](#adding-a-toolkit)\n    - [Sample Commands](#sample-commands)\n    - [Running Bash Commands (CLI)](#running-bash-commands-cli)\n- [AI Assistant](#ai-assistant)\n- [For Developers](#for-developers)\n  - [Installation for Development](#installation-for-development)\n  - [Testing a branch](#testing-a-branch)\n- [Installing on Windows](#installing-on-windows)\n  - [Before you start](#before-you-start)\n  - [Installing WSL](#installing-wsl)\n- [Linux Notes](#linux-notes)\n\n\n---\n\n<br>\n\n# Installation\n\n> **Note:** Contributors should skip to [Installation for Development](#installation-for-development)<br>\n> **Note:** Linux users may want to check the [Linux Notes](#linux-notes)<br>\n> **Note:** If you prefer using poetry and you know what you're doing, you can skip the instructions below and run `poetry add openad` instead.\n\n1.  **Step 0: Before you start**<br>\nEnsure you're running Python 3.10 or 3.11. There's multiple ways of updating Python, we'll use pyenv.\n\n    > **Note:** Due to an issue with one of our dependencies, Python 3.12 is not yet supported.\n\n        git clone https://github.com/pyenv/pyenv.git ~/.pyenv\n        pyenv install 3.10\n\n1.  **Step 1: Set up your virtual environment** (optional)<br>\n\n        python -m venv ~/ad-venv\n        source ~/ad-venv/bin/activate\n\n    > **Note:** To exit the virtual environment, you can run `deactivate`\n\n2.  **Step 2: Installation**\n\n        pip install openad\n\n<br>\n\n# Getting Started - CLI\n\n-   **Enter the virtual environment**\n    \n    > **Note:** If you just installed OpenAD, you probably already activated the virtual environment.\n\n        source ~/ad-venv/bin/activate\n\n-   **Enter the command shell**\n\n        openad\n\n    <!-- ![Landing](assets/screenshot-landing.png) -->\n    <!-- <a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/screenshot-landing.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/screenshot-landing.png\" /></a> -->\n\n-   **Exit the command shell**<br>\n    Hit `ctrl+c` or run:\n\n        exit\n\n-   **Run a single command from outside the command shell**\n\n        openad <command>\n\n-   **Exit the virtual environment**<br>\n\n        deactivate\n\n<br>\n\n# Getting Started - Jupyter\n\n## Setting up Jupyter\n\nThe following commands only need to be run once after installation:\n\n1.  **Activate your virtual environment**\n\n    > **Note:** If you just installed OpenAD, you probably already activated the virtual environment.\n\n        source ~/ad-venv/bin/activate\n\n1.  **Create an iPython kernel**<br>\n    This ports your virtual environment to Jupyter.\n\n        python -m ipykernel install --user --name=ad-venv\n    \n    > **Note:** To list your installed iPython kernels, you can run `jupyter kernelspec list`, and to remove the kernel you can run `jupyter kernelspec uninstall ad-venv`\n\n1.  **Install the magic commands**<br>\n    This enables OpenAD commands to be run within a Jupyter Notebook.\n\n        init_magic\n    \n    <details>\n    <summary><b>Alternative:</b> Manually add magic commands</summary>\n    <div markdown=\"block\">\n\n    If you don't want to activate magic commands in all Notebooks, you can instead activate them for individual Notebooks.\n    - Run `init_examples`\n    - Copy the file `~/openad_notebooks/openad.ipynb` to the same directory as the Notebook you wish to activate.\n    - In your Notebook, run this inside a code cell: `!run openad.ipynb`\n\t\n    </div>\n    </details>\n\n\n2.  **Install example Notebooks**<br>\n    This installs our example Notebooks at `~/openad_notebooks`.\n    \n        init_examples\n\n## Launching OpenAD in Jupyter\n\n1.  **Open any Notebook**<br>\n    The following command will open up the example Notebook:\n\n        jupyter lab ~/openad_notebooks/Table_of_Contents.ipynb\n\n2.  **Select the kernel**<br>\n    Make sure to select the \"ad-venv\" iPython kernel. You can do this under _Kernel > Change Kernel_, or in the latest versions of Jupyter by clicking the kernel name in the top right hand corner. If you don't see your iPython kernel, make sure you followed the Jupyter Setup instructions listed above.\n\n<figure>\n    <a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-notebook-kernel.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-notebook-kernel.png\"></a>\n    <figcaption align=\"center\" style=\"font-size:0.9em;opacity:.6;margin-top:-30px;margin-bottom:50px\"><i>Jupyter Notebook</i></figcaption>\n</figure>\n<figure>\n    <a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-lab-kernel.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/jupyter-lab-kernel.png\"></a>\n    <figcaption align=\"center\" style=\"font-size:0.9em;opacity:.6;margin-top:-30px;margin-bottom:50px\"><i>Jupyter Lab</i></figcaption>\n</figure>\n\n1.  **Magic Commands**<br>\n    Magic commands let you run terminal commands from within Jupyter. They are invoked by the `%openad` prefix. All OpenAD CLI commands can be accessed like this. For example:<br>\n\n        %openad list files\n\n<br>\n\n# Interacting with the Toolkits\n\nOpenAD integrates with `DS4SD`, `RXN`, and has placeholder support for `GT4SD` and `ST4SD`.\n\n<div class=\"notice\" style=\"margin-top: 16px;\" markdown=\"block\">\n\n**&#x26A0; Reminder:** when running commands from Jupyter, prepend them with `%openad`\n\n</div>\n\n### Registration\n\nBefore you can interact with the toolkits, you'll need to register with each individual toolkit.\n\n<details>\n<summary>Register with DS4SD (Deep Search)</summary>\n<div markdown=\"block\">\n\n1. First, you'll need to generate an API key on the Deep Search website.\n\n    - Visit the Deep Search website and create an account:<br>\n      [deepsearch-experience.res.ibm.com](https://deepsearch-experience.res.ibm.com)<br>\n    - Once logged in, click the Toolkit/API icon in the top right hand corner, then open the HTTP section\n    - Click the \"Generate new API key\" button<br>\n      <br>\n      <!-- ![Landing](assets/ds4sd-api-key.png) -->\n      <a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png\" /></a>\n\n1. Once inside the OpenAD client, you'll be prompted to authenticate when activating the Deep Search (DS4SD) toolkit. When running `set context ds4sd` :\n\n   - **Hostname:** [https://sds.app.accelerate.science](https://sds.app.accelerate.science)\n   - **Email:** Your email\n   - **API_key:** The DS4SD API key you obtained following the instructions above.\n\n1. You should get a message saying you successfully logged in.\n\n    > **Note:** Your DS4SD auth config file is saved as `~/.openad/deepsearch_api.cred`. If you ever want to reset your DS4SD login information you can run `set context ds4sd reset`, or you can delete this file.<br>\n\n</div>\n</details>\n\n<details>\n<summary>Register with RXN</summary>\n<div markdown=\"block\">\n\n1. First, you'll need to generate an API key on the RXN website.\n\n    -   Sign up for an RXN account at [rxn.app.accelerate.science](https://rxn.app.accelerate.science)\n    -   Obtain your API key by clicking the user profile icon in the top right hand corner and select \"My profile\".<br>\n        <br>\n        <!-- ![Landing](assets/rxn-api-key.png) -->\n        <a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png\" /></a>\n\n1. When setting the context to RXN using `set context rxn` you'll be prompted to create a new auth configuration file:\n\n    -   **Hostname:** [https://rxn.app.accelerate.science](https://rxn.app.accelerate.science)<br>\n    -   **API_key:** The RXN API key you obtained following the instructions above.\n\n1. You should get a message saying you successfully logged in.<br>\n\n    > **Note:** Your RXN auth config file is saved as `~/.openad/rxn_api.cred`. If you ever want to reset your RXN login information you can run `set context rxn reset`, or you can delete this file.<br>\n\n</div>\n</details>\n\n### Adding a Toolkit\n\nFirst install the toolkit, then set the context to this toolkit.\n\n    add toolkit ds4sd\n    set context ds4sd\n\n### Sample Commands\n\n    # DS4SD\n    display all collections\n\n    # RXN\n    list rxn models\n\n### Running Bash Commands (CLI)\n\nTo run a command in bash mode, prepend it with `openad` and make sure to escape quotes.\n\n    openad show molecules using file \\'base_molecules.sdf\\'\n\n<br>\n\n# AI Assistant\n\nTo enable our AI assistant, you'll need an account with OpenAI. There is a one month free trial.\n\n> **Note:** watsonx coming soon\n\n1. Go to [platform.openai.com](https://platform.openai.com) and create an account\n\n2. Click on the profile icon in the top right and choose \"View API keys\"\n\n3. Create a new key\n\n4. Run `tell me` to be prompted for your OpenAI API credentials\n\n\n<!-- ![Landing](readme/openai-api-key.png) -->\n\n<a href=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/openai-api-key.png\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/openai-api-key.png\" /></a>\n\n<br>\n\n# For Developers\n\nOpenAD is fully open source and we encourage contributions. We plan to provide documentation on how to integrate your own toolkits in the future.\n\nIf you have any questions in the meantime, please [reach out]({% link about.md %}).\n\n## Installation for Development\n\n<details>\n<summary>Install using the setup wizard (uses poetry)</summary>\n<div markdown=\"block\">\n\n1.  **Step 1: Download the repo**\n\n        git clone https://github.com/acceleratedscience/open-ad-toolkit.git\n\n    > **Note:** To download a specific branch, you can run instead:<br>\n    `git clone -b <branch_name> https://github.com/acceleratedscience/open-ad-toolkit.git`\n\n1.  **Step 2: Launch the setup wizard**\n\n        cd open-ad-toolkit\n        ./setup.sh\n\n</div>\n</details>\n\n<details>\n<summary>Install using pip</summary>\n<div markdown=\"block\">\n\n1.  **Step 0: Before you start**<br>\nEnsure you're running Python 3.10.10 or above. There's multiple ways of doing this, we'll use pyenv.\n\n        git clone https://github.com/pyenv/pyenv.git ~/.pyenv\n        pyenv install 3.10\n\n1.  **Step 1: Set up your virtual environment** (optional)<br>\n\n        python -m venv ~/ad-venv\n        source ~/ad-venv/bin/activate\n\n    > **Note:** To exit the virtual environment, you can run `deactivate`\n\n1.  **Step 2: Download the repo**\n\n        git clone https://github.com/acceleratedscience/open-ad-toolkit.git\n\n    > **Note:** To download a specific branch, you can run instead:<br>\n    `git clone -b <branch_name> https://github.com/acceleratedscience/open-ad-toolkit.git`\n\n1.  **Step 2: Install the requirements**\n\n        cd open-ad-toolkit\n        pip install -e .\n    \n    > **Note:** The -e flag stands for \"editable\". This means that instead of copying the package's files to the Python site-packages directory as in a regular installation, pip creates a symbolic link (symlink) from your package's source code directory into your Python environment.<br>This way you can make changes to the source code of the package, and those changes are immediately reflected in your Python environment. You don't need to reinstall the package every time you make a change.\n\n</div>\n</details>\n\n\n## Testing a branch\n\nTo do a regular install from a particular branch, you can run:\n\n    pip install git+https://github.com/acceleratedscience/open-ad-toolkit.git@<branch_name>\n\n<br>\n\n# Installing on Windows\n\nIn order to run OpenAD on Windows 11, you will need to install the Ubuntu WSL package (\"Windows Subsystem for Linux\").\n\n## Before you start\n\n-   **Verify Windows version**<br>\n    To check if you are running Windows 11 or later, press `Win` + `R`, type \"winver\", and press `Enter`. A window will open showing your Windows version.\n\n-   **Verify WSL**<br>\n    To check if you already have WSL installed, run `wsl -l -v` into the terminal. To see more information about your current version of Ubuntu, run `lsb_release -a`\n\n## Installing WSL\n\nInstall WSL and create a user called 'openad' or one of your choosing.\n\n    wsl --install Ubuntu-22.04\n\n**Optional:** To setup an Ubuntu Python environment from scratch, continue to [Linux Notes](#linux-notes)\n\n<br>\n\n# Linux Notes\n\nIf you wish to setup an Ubuntu Python environment from scratch, run:\n\n    sudo add-apt-repository ppa:deadsnakes/ppa\n    sudo apt update\n    sudo apt install python3.11-full\n    sudo apt install python3-pip\n    sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 100\n    sudo pip install pip --upgrade\n\nIf you get an error when running `init_magic`, you may first need to setup the default iPython profile for magic commands.\n\n    ipython profile create\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Open Accelerated Discovery Client ",
    "version": "0.2.7",
    "project_urls": {
        "Documentation": "https://acceleratedscience.github.io/openad-docs/",
        "Homepage": "https://www.accelerate.science/",
        "Repository": "https://github.com/acceleratedscience/open-ad-toolkit"
    },
    "split_keywords": [
        "deepsearch",
        " rxn",
        " jupyter",
        " magic commands",
        " accelerated discovery",
        " science",
        " retrosynthesis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96b3e3b74e6ef485fbfab80819be6b035dedbf9f5529aef00aa1385f647300ca",
                "md5": "4b668f6af9979414dfbabb573715729b",
                "sha256": "cf6afa2ac193d1b4c43396535c528df63a968224bbb7284c81b7191fd8c71897"
            },
            "downloads": -1,
            "filename": "openad-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b668f6af9979414dfbabb573715729b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.10",
            "size": 18691324,
            "upload_time": "2024-03-22T04:13:29",
            "upload_time_iso_8601": "2024-03-22T04:13:29.394034Z",
            "url": "https://files.pythonhosted.org/packages/96/b3/e3b74e6ef485fbfab80819be6b035dedbf9f5529aef00aa1385f647300ca/openad-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddf629407db9a3ed479ab09087a65daa7ce23137bafc1f2c3565866ad559dadc",
                "md5": "98264b43c24066bfe5094487061be977",
                "sha256": "1b706ea6fb0db7963b100f5238a533afa81df27eaedde8e492985133363af1a3"
            },
            "downloads": -1,
            "filename": "openad-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "98264b43c24066bfe5094487061be977",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.10",
            "size": 18056829,
            "upload_time": "2024-03-22T04:14:03",
            "upload_time_iso_8601": "2024-03-22T04:14:03.719473Z",
            "url": "https://files.pythonhosted.org/packages/dd/f6/29407db9a3ed479ab09087a65daa7ce23137bafc1f2c3565866ad559dadc/openad-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-22 04:14:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "acceleratedscience",
    "github_project": "open-ad-toolkit",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "openad"
}
        
Elapsed time: 0.21571s