Skip to main content

Python client for the BioNeMo Service

Project description

BioNeMo Service Python Client

The BioNeMo Service Python Client provides a python API into the BioNeMo inference service. The BioNeMo service uses NVIDIA Triton inference infrastructure to deploy ML models relevant to biology and chemistry applications. This client exposes easy-to-use python functions that call directly to the inference service, allowing users to use state-of-the-art models with little setup.

Learn more and apply for access to BioNeMo here.

Example: Generate novel protein sequences and perform folding

from bionemo.api import BionemoClient
from time import sleep

# Create a client instance
api = BionemoClient("APIKEY")

# Generate novel proteins
novel_proteins = api.protgpt2_sync(max_length=200, num_return_sequences=10)

# Request folding of novel proteins in parallel
submitted_requests = []
for protein in novel_proteins["generated_sequences"]:
    request_id = api.openfold_async(protein)
    submitted_requests.append(request_id)

# Wait for results, write to disk
while len(submitted_requests):
    sleep(10)
    for request_id in submitted_requests:
        if api.fetch_task_status(request_id) == "DONE":
            folded_protein = api.fetch_result(request_id)
            with open(str(request_id) + ".pdb", "w") as f:
                f.write(folded_protein)
            submitted_requests.remove(request_id)

Currently, the following models and workflows are available for inference:

Protein Structure Prediction:

  • AlphaFold-2
  • OpenFold
  • ESMFold

Protein Embedding:

  • ESM-2
  • ESM-1nv

Docking:

  • Diffdock

Protein Sequence Generation:

  • ProtGPT2

Small Molecule Embedding and Generation:

  • MegaMolBart
  • MoFlow
  • MolMIM

Multiple Sequence Alignment

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bionemo-0.3.1.post1-py3-none-any.whl (20.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page