Skip to content

Commit 71a0285

Browse files
committed
Version 2.0 Update
1 parent d9bb45c commit 71a0285

24 files changed

Lines changed: 1198 additions & 517 deletions

README.md

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,64 @@
1-
<h2><img align="center" src="https://github.com/NVIDIA-BioNeMo-blueprints/generative-virtual-screening/blob/main/nvidia-logo.png?raw=true">NVIDIA BioNeMo Blueprint: Generative Virtual Screening for Drug Discovery</h2>
21

3-
![Generative Virtual Screening for Drug Discovery-r2 (1)](https://github.com/user-attachments/assets/dbb1795a-7e3f-4363-9b20-4bc4d67d04bb)
4-
5-
The NVIDIA BioNeMo Blueprint for generative virtual screening shows how generative AI and accelerated NIM microservices can be used to design optimized small molecules smarter and faster.
2+
<h2><img align="center" src="https://github.com/NVIDIA-BioNeMo-blueprints/generative-virtual-screening/blob/main/docs/nvidia-logo.png?raw=true">NVIDIA BioNeMo Blueprint: Generative Virtual Screening for Drug Discovery</h2>
63

74
<hr>
85

9-
### Quick Start
6+
Use the following documentation to learn about the NVIDIA Generative Virtual Screening Blueprint.
107

11-
```bash
12-
cd deploy
13-
docker compose up
14-
cd ../src
15-
jupyter notebook
16-
```
8+
- [Overview](#overview)
9+
- [What's New](#whats-new)
10+
- [Get Started](#get-started)
11+
- [System Requirements](#system-requirements)
12+
- [Additional Documentation](#additional-documentation)
13+
14+
## Overview
15+
16+
![A workflow diagram of the Protein Design Blueprint](docs/Generative_Virtual_Screening_Diagram.png)
17+
18+
The NVIDIA BioNeMo Blueprint for generative virtual screening shows how generative AI and accelerated BioNeMo NIMs (NVIDIA Inference Microservices) can be used to design optimized small molecules smarter and faster. This Blueprint creates a streamlined virtual screening workflow for drug discovery. It highlights the use of cutting-edge generative AI models and GPU-accelerated microservices to predict protein structures, generate optimized molecules, and perform protein-ligand docking.
19+
20+
The workflow is applied to the SARS-CoV-2 main protease and Nirmatrelvir as an example, but it is highly flexible and can be adapted to any protein or molecule of interest. By combining these models, the notebook showcases the power of NVIDIA’s BioNeMo NIMs in accelerating drug discovery through AI-driven insights and predictions.
21+
22+
## Software Components
23+
Here’s an overview of the key NVIDIA NIMs featured in this workflow:
24+
- **MSA-Search (MMSeqs2)**: A GPU-accelerated toolkit for multiple sequence alignment, providing co-evolutionary information crucial for accurate protein structure prediction.
25+
- **OpenFold2**: A transformer-based generative model for predicting 3D protein structures from amino acid sequences, leveraging MSA data to enhance structural accuracy.
26+
- **GenMol**: A masked diffusion model designed for molecular generation and optimization, enabling the creation of drug-like molecules tailored to specific chemical properties.
27+
- **DiffDock**: A state-of-the-art generative model for protein-ligand docking that predicts binding poses without requiring predefined binding pockets, facilitating blind docking.
1728

18-
### Get Started
1929

20-
* [Deploy](deploy/)
21-
* [Source code](src/)
2230

23-
### Set Up With Docker Compose
2431

25-
Navigate to the [deploy](deploy/) directory to learn how to start up the NIMs.
32+
## What's New ?
33+
- MSA-Search (MMSeqs2) was extracted from the AlphaFold2 NIM to serve as an independent, GPU-accelerated tool for generating multiple sequence alignments, enhancing flexibility and performance in protein structure prediction workflows.
34+
- We swapped AlphaFold2 NIM with OpenFold2 NIM- a reproduction of AlphaFold2 that achieves similar accuracy but offers significant performance improvements when integrated into the BioNeMo platform. It is accelerated by up to 6x on NVIDIA GPUs, enabling faster predictions and larger-scale experiments.
35+
- GenMol (replaces MolMIM) applies a fragment-based scheme of generation, allowing for a controlled generation with desired molecular fragments (i.e., motif or scaffold) being kept during the optimization loops.
36+
- DiffDock V2 offers batch-docking to more efficiently dock multiple molecules to the same receptor concurrently and largely improved docking accuracy by the in-house model trained with PLINDER dataset.
37+
38+
## Hardware Requirements
39+
40+
The following specifications are required:
41+
- At least 1300 GB (1.3 TB) of fast NVMe SSD space. (For MSA databases)
42+
- A modern CPU with at least 24 CPU cores
43+
- At least 64 GB of RAM
44+
- 4 X NVIDIA L40s, A100, or H100 GPUs across your cluster.
45+
46+
## Get Started
47+
Deploy the blueprint using [Helm](./generative-virtual-screening-chart/)
48+
49+
```bash
50+
# Launch the Jupyter notebook
51+
cd src/
52+
jupyter notebook
53+
```
54+
55+
* [Helm Deployment](./generative-virtual-screening-chart/)
56+
* [Notebook](./src/)
2657

2758
## Notebook
2859

2960
An example of how to call each generative virtual screening step is located in `src/generative-virtual-screening.ipynb`.
3061

31-
### Additional Documentation
32-
33-
You can try this Blueprint and find its Blueprint Card on [build.nvidia.com](https://build.nvidia.com/nvidia/generative-virtual-screening-for-drug-discovery)
62+
## Additional Documentation
3463

64+
You can try this Blueprint and find its Blueprint Card on [build.nvidia.com/nvidia/generative-virtual-screening-for-drug-discovery](https://build.nvidia.com/nvidia/generative-virtual-screening-for-drug-discovery)

deploy/README.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

deploy/docker-compose.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.
79.4 KB
Loading
File renamed without changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: generative-virtual-screening-chart
3+
description: A Helm chart for Generative Virtual Screening NIM Workflow
4+
type: application
5+
version: 0.1.0
6+
appVersion: "1.0.0"
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Deploy with Helm
2+
3+
## Set up Dependencies
4+
- [Docker](https://docs.docker.com/engine/install/ubuntu/)
5+
- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
6+
- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
7+
- [Minikube](https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Farm64%2Fstable%2Fbinary+download) / Kubernetes cluster created using [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)
8+
- [Helm](https://helm.sh/docs/intro/install/)
9+
10+
## Minikube Specific Configuration
11+
12+
Start Minikube:
13+
```bash
14+
minikube start --driver docker --container-runtime docker --gpus all --cpus 8
15+
minikube addons enable nvidia-device-plugin
16+
```
17+
Minikube has a limitation when dealing with symbolic links - symbolic links inside a minikube pod can not be created in a mounted path from the host using `minikube mount <host_folder>:<minikube_target_path>`.
18+
19+
Instead, you can copy over the data using `minikube cp <Host models path> /data/nim` command from your host SSD to minikube host.
20+
in [Values.yaml](generative-virtual-screening-chart/values.yaml), we define the minikube folder path that the PV is created under.
21+
22+
Note, it is important to save the copied files under a [specific locations](https://minikube.sigs.k8s.io/docs/handbook/persistent_volumes/) on the minikube container to prevent data loss between reboots.
23+
24+
Copying over a large number of files from your host machine to the minikube container will increase its volume size. You can modify the default path (`/var/lib/docker`) of the docker data dir to be under a dedicated mounted SSD.
25+
To do so, first stop the docker service
26+
```bash
27+
sudo systemctl stop docker
28+
```
29+
Edit (or create) `/etc/docker/daemon.json` and add a `data-root` entry:
30+
```bash
31+
{ .
32+
.
33+
.
34+
"data-root": "/path/to/new/docker/data/directory"
35+
}
36+
```
37+
Copy the existing docker data to:
38+
```bash
39+
sudo rsync -avxP /var/lib/docker/ /path/to/new/docker/data/directory
40+
```
41+
Start the docker service
42+
```bash
43+
sudo systemctl start docker
44+
```
45+
46+
## Configure Cluster & Helm Deployment
47+
Set your NGC key as a Kubernetes secret:
48+
```bash
49+
kubectl create secret generic ngc-registry-secret --from-literal=NGC_REGISTRY_KEY=<YOUR_NGC_REGISTRY_KEY>
50+
```
51+
Set an environment varible with your desired chart name
52+
```bash
53+
export CHART_NAME=<your-chart-name>
54+
```
55+
Install Helm Chart:
56+
```bash
57+
cd generative-virtual-screening-chart/
58+
helm install "${CHART_NAME}" . --debug
59+
```
60+
Uninstall Helm Chart:
61+
```bash
62+
cd generative-virtual-screening-chart/
63+
helm uninstall "${CHART_NAME}" --wait
64+
```
65+
Test pod GPU Access:
66+
```bash
67+
kubectl run gpu-test1 --image=nvidia/cuda:12.6.2-base-ubuntu22.04 --restart=Never --command -- nvidia-smi
68+
```
69+
70+
Set up port forwarding to make requests from your local machine to all the 4 services:
71+
```bash
72+
kubectl port-forward service/"${CHART_NAME}"-generative-virtual-screening-chart-msa 8081:8081 & \
73+
kubectl port-forward service/"${CHART_NAME}"-generative-virtual-screening-chart-openfold2 8082:8082 & \
74+
kubectl port-forward service/"${CHART_NAME}"-generative-virtual-screening-chart-genmol 8083:8083 & \
75+
kubectl port-forward service/"${CHART_NAME}"-generative-virtual-screening-chart-diffdock 8084:8084
76+
```
77+
78+
## Troubleshooting and Debugging Kubernetes Pods
79+
List all pods:
80+
```bash
81+
kubectl get pods
82+
```
83+
84+
Display detailed information about a specific pod:
85+
```bash
86+
kubectl describe pod <pod_name>
87+
```
88+
89+
View the logs of a pod:
90+
```bash
91+
kubectl logs <pod_name>
92+
```
93+
94+
Open an interactive shell in a pod's container:
95+
```bash
96+
kubectl exec -it <pod name> -- bash
97+
```
98+
99+
## Running the Blueprint With the Helm Deployment
100+
101+
Note, due to the large size of the model files, a substantial `initialDelay` was set for the `livenessProbe` and `readinessProbe` in [each deployment](./templates/). This extended delay prevents premature pod termination, allowing sufficient time for the model files to load before the probes begin their checks.
102+
You can adjust these values once the models are downloaded and cached in the PV.
103+
104+
Before executing the notebook, ensure each pod's web server is actively listening and ready to handle incoming requests. Verify this by checking the [pod log output](#troubleshooting-and-debugging-kubernetes-pods). If you attempt to access a pod before it is fully operational, the port-forwarding command will terminate. In such case, you’ll need to execute `pkill -f "kubectl port-forward"` to stop any existing port-forwarding processes, then reinitiate the port-forwarding command as described [here](#configure-cluster--helm-deployment)
105+
106+
Run the [protein-binder-design.ipynb](../src/protein-binder-design.ipynb) notebook

0 commit comments

Comments
 (0)