msa-structure-prediction-pipeline
NOTE: your protein sequence and the retrieved MSA alignment are transmitted to external NVIDIA-hosted APIs (health.api.nvidia.com) on every call. Use local NIM containers for confidential or proprietary sequences. Run a complete protein structure prediction pipeline using NVIDIA
Install
npx skills add https://github.com/NVIDIA/skills/tree/main/skills/bionemo-msa-structure-prediction-pipeline
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install nvidia-skills@llmmart
git clone https://github.com/NVIDIA/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole nvidia/skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
MSA Structure Prediction Pipeline
Predict protein structures with high accuracy by chaining two BioNeMo NIMs:
Step 1: MSA-Search → Step 2: OpenFold3
(Search homologs) (Predict structure with MSA)
Overview
Why chain these NIMs?
- MSA-Search finds evolutionary homologs in UniRef30 and ColabFold databases using GPU-accelerated MMSeqs2. The resulting alignment provides crucial evolutionary information.
- OpenFold3 uses the MSA to improve structure prediction accuracy — especially for sequences where no close homolog exists in PDB.
- Running MSA-Search first means OpenFold3 gets the full evolutionary context rather than a single-sequence prediction.
Before you start
Confirm with the user:
- Query sequence: amino acid sequence to predict
- MSA depth: how many sequences to retrieve (default 500; more = slower but more context)
- API mode: hosted or local Docker?
Note: local MSA-Search requires 1.4 TB of database storage — strongly recommend hosted unless the user has that infrastructure.
For local Docker, do not assume MSA-Search and OpenFold3 are both on
localhost:8000 concurrently. Run one container at a time and hand off the A3M
file, or start each NIM on a distinct host port and set the URLs explicitly.
Step 1: Search for MSA with MSA-Search
import requests, json, os
from pathlib import Path
NGC_API_KEY = os.getenv("NGC_API_KEY")
HOSTED = True
query_sequence = "<YOUR_PROTEIN_SEQUENCE>"
if HOSTED:
msa_url = "https://health.api.nvidia.com/v1/biology/colabfold/msa-search/predict"
headers = {"Content-Type": "application/json",
"Authorization": f"Bearer {NGC_API_KEY}"}
else:
msa_url = "http://localhost:8000/biology/colabfold/msa-search/predict"
headers = {"Content-Type": "application/json"}
payload = {
"sequence": query_sequence,
"databases": ["Uniref30_2302", "colabfold_envdb_202108"],
"e_value": 0.0001,
"output_alignment_formats": ["a3m"],
}
r = requests.post(msa_url, headers=headers, json=payload)
r.raise_for_status()
msa_result = r.json()
# Extract the A3M alignment
a3m_alignment = msa_result["alignments"]["Uniref30_2302"]["a3m"]["alignment"]
# Save for reference
with open("query_msa.a3m", "w") as f:
f.write(a3m_alignment)
# Count sequences in alignment
n_seqs = a3m_alignment.count(">")
print(f"Step 1 complete: found {n_seqs} homologous sequences")
print(f"MSA saved to query_msa.a3m")
Step 2: Predict structure with OpenFold3
Pass the MSA directly into OpenFold3's msa field:
if HOSTED:
of3_url = "https://health.api.nvidia.com/v1/biology/openfold/openfold3/predict"
else:
of3_url = "http://localhost:8000/biology/openfold/openfold3/predict"
# Build the OpenFold3 MSA structure from the retrieved alignment
msa_data = {
"uniref30": {
"a3m": {
"alignment": a3m_alignment,
"format": "a3m"
}
}
}
# Optionally also include colabfold_envdb alignment if requested
# env_alignment = msa_result["alignments"]["colabfold_envdb"]["a3m"]["alignment"]
# msa_data["colabfold_env"] = {"a3m": {"alignment": env_alignment, "format": "a3m"}}
payload = {
"inputs": [{
"input_id": "prediction_with_msa",
"output_format": "pdb",
"molecules": [
{
"type": "protein",
"sequence": query_sequence,
"diffusion_samples": 1,
"msa": msa_data
}
]
}]
}
r = requests.post(of3_url, headers=headers, json=payload, timeout=300)
r.raise_for_status()
result = r.json()
output = result["outputs"][0]
for i, sample in enumerate(output["structures_with_scores"]):
fmt = sample["format"]
filename = f"predicted_structure_{i+1}.{fmt}"
with open(filename, "w") as f:
f.write(sample["structure"])
print(f"\nStep 2 complete: {filename} saved")
print(f" Confidence: {sample['confidence_score']:.4f}")
print(f" pLDDT: {sample['complex_plddt_score']:.4f}")
print(f" pTM: {sample['ptm_score']:.4f}")
Comparing single-sequence vs MSA-informed prediction
If the user wants to see the impact of MSA, run OpenFold3 twice — once with the full MSA and once with just the query sequence as a minimal alignment:
# Minimal MSA (single sequence — same as no MSA context):
minimal_msa = {
"main": {
"a3m": {
"alignment": f">query\n{query_sequence}",
"format": "a3m"
}
}
}
A larger, higher-quality MSA typically yields higher pLDDT and lower pDE, especially for proteins with many known homologs.
For protein complexes
Use the /paired/predict endpoint of MSA-Search to get paired alignments for multi-chain complexes, then pass each chain's alignment into the corresponding molecule's msa field and paired_msa fields:
# Paired MSA search endpoint for complexes:
msa_paired_url = "https://health.api.nvidia.com/v1/biology/colabfold/msa-search/paired/predict"
paired_payload = {
"sequences": [chain_A_sequence, chain_B_sequence],
"e_value": 0.0001,
}
Quick reference — skill dependencies
| Step | Skill | Key endpoint |
|---|---|---|
| MSA search | msa-search-nim |
/biology/colabfold/msa-search/predict |
| Structure prediction | openfold3-nim |
/biology/openfold/openfold3/predict |
Files (skills)
-
evals
-
evals.json 7.8 KB
{ "skill_name": "msa-structure-prediction-pipeline", "evals": [ { "id": "eval-1-basic-structure-prediction", "prompt": "I have a protein sequence and I want the most accurate structure prediction possible. Here's the sequence: MTEYKLVVVGACGVGKSALTIQLIQNHFVDEYDPTIEDSY. Can you run the full MSA-Search then OpenFold3 pipeline using the hosted NVIDIA API? My NGC_API_KEY is in my environment.", "expected_output": "A Python script that calls the hosted MSA-Search endpoint with the sequence and the case-correct database name 'Uniref30_2302', extracts the A3M alignment from the response using the matching case key, then submits it to the hosted OpenFold3 endpoint in the correct 3-level nested msa structure, and prints the confidence scores from the result.", "files": [], "assertions": [ "[msa-search-hosted-endpoint] Uses the correct hosted MSA-Search endpoint URL: Script contains 'health.api.nvidia.com/v1/biology/colabfold/msa-search/predict'", "[case-sensitive-database-name] Database name in MSA-Search payload is 'Uniref30_2302' (capital U, not 'uniref30_2302'): Script contains the string 'Uniref30_2302' (with capital U) in the databases list, not the lowercase form 'uniref30_2302'", "[alignment-extracted-with-matching-key] A3M alignment is extracted from the response using the same case key 'Uniref30_2302': Script accesses the MSA-Search response alignments dict using the key 'Uniref30_2302' (capital U), matching the case-sensitive key that was sent", "[openfold3-hosted-endpoint] Uses the correct hosted OpenFold3 endpoint URL: Script contains 'health.api.nvidia.com/v1/biology/openfold/openfold3/predict'", "[bearer-auth-header] Both requests use Bearer token from NGC_API_KEY environment variable: Script contains 'Authorization' and 'Bearer' and 'NGC_API_KEY' for authenticating requests", "[confidence-score-output] Prints confidence scores from the OpenFold3 response: Script accesses 'confidence_score' or 'complex_plddt_score' or 'ptm_score' from the OpenFold3 response" ] }, { "id": "eval-2-high-depth-msa-retrieval", "prompt": "I'm trying to improve my OpenFold3 structure prediction by feeding in a deep MSA. Please run MSA-Search against Uniref30 and then pass the alignment into OpenFold3's msa field correctly. The protein is ACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWY. Use the hosted API.", "expected_output": "A Python script that retrieves the A3M alignment from MSA-Search using 'Uniref30_2302', then threads that alignment text into OpenFold3's payload under the correct 3-level nested msa structure (msa.uniref30.a3m.alignment and msa.uniref30.a3m.format), not as a flat string.", "files": [], "assertions": [ "[msa-search-uniref30-correct-case] MSA-Search databases list uses 'Uniref30_2302' with capital U and full versioned name: Script contains 'Uniref30_2302' in the MSA-Search payload databases list", "[openfold3-nested-msa-structure] OpenFold3 msa field uses 3-level nesting: msa[db_key][format_key][fields], not a flat alignment string: Script constructs the OpenFold3 msa payload with nested dict levels — an outer key (like 'uniref30'), an inner key (like 'a3m'), and fields inside including 'alignment' and 'format' — rather than passing the alignment text directly as a string to a flat 'msa' field", "[a3m-format-field-present] The innermost a3m dict includes the 'format' field set to 'a3m': Script includes 'format': 'a3m' inside the nested msa structure passed to OpenFold3", "[alignment-text-threaded-from-step1] The alignment text from MSA-Search is used as the value of 'alignment' in the OpenFold3 payload: Script uses the A3M alignment text retrieved from the MSA-Search response as the value of the 'alignment' field in the OpenFold3 msa payload", "[output-format-pdb] OpenFold3 payload sets output_format to 'pdb': Script contains 'output_format' and 'pdb' in the OpenFold3 payload", "[structure-saved-to-file] The predicted structure is saved to a file: Script writes the structure content from the OpenFold3 response to a local file" ] }, { "id": "eval-3-multi-database-msa", "prompt": "I want to run structure prediction with the best possible MSA coverage. Please search both Uniref30 and the ColabFold environmental database, then use both alignments when calling OpenFold3. Sequence: MTEYKLVVVGACGVGKSALTIQLIQNHFVDE. Hosted API please.", "expected_output": "A Python script that queries MSA-Search with both 'Uniref30_2302' and 'colabfold_envdb_202108' (full versioned names), extracts both A3M alignments from the response, and integrates both into the OpenFold3 msa payload as separate nested entries.", "files": [], "assertions": [ "[colabfold-envdb-full-versioned-name] MSA-Search payload uses 'colabfold_envdb_202108' — the full versioned name, not the bare 'colabfold_envdb': Script contains 'colabfold_envdb_202108' (with the full version suffix _202108) in the databases list, not the shortened form 'colabfold_envdb'", "[uniref30-correct-case-in-list] MSA-Search payload also contains 'Uniref30_2302' with correct case: Script contains 'Uniref30_2302' in the databases list alongside the colabfold_envdb_202108 entry", "[both-alignments-extracted] Both alignments are extracted from the MSA-Search response using their exact database name keys: Script accesses the MSA-Search response alignments dict for both 'Uniref30_2302' and 'colabfold_envdb_202108' keys to retrieve each alignment", "[both-alignments-in-openfold3-payload] Both alignments are passed into the OpenFold3 msa field as separate nested entries: Script includes two separate entries in the OpenFold3 msa dict — one for each alignment source — each with its own nested a3m alignment and format fields", "[openfold3-correct-hosted-endpoint] OpenFold3 call uses the correct hosted endpoint: Script contains 'health.api.nvidia.com/v1/biology/openfold/openfold3/predict'" ] }, { "id": "eval-4-full-hosted-pipeline-with-scores", "prompt": "Can you run a complete structure prediction pipeline for my protein using both NIMs in sequence? First MSA-Search to get homologous alignments, then OpenFold3 to predict the structure. I want all the confidence metrics printed at the end. Sequence: MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEAL. Use the hosted API endpoints.", "expected_output": "A Python script that runs the full two-step pipeline against the hosted endpoints, extracts all three score fields (confidence_score, complex_plddt_score, ptm_score) from outputs[0]['structures_with_scores'][0], and prints them.", "files": [], "assertions": [ "[msa-search-hosted-endpoint-url] MSA-Search call uses the correct hosted endpoint URL: Script contains 'health.api.nvidia.com/v1/biology/colabfold/msa-search/predict'", "[openfold3-hosted-endpoint-url] OpenFold3 call uses the correct hosted endpoint URL: Script contains 'health.api.nvidia.com/v1/biology/openfold/openfold3/predict'", "[confidence-score-field] Script reads 'confidence_score' from structures_with_scores: Script accesses 'confidence_score' from the OpenFold3 response structures_with_scores entry", "[complex-plddt-score-field] Script reads 'complex_plddt_score' from structures_with_scores: Script accesses 'complex_plddt_score' from the OpenFold3 response structures_with_scores entry", "[ptm-score-field] Script reads 'ptm_score' from structures_with_scores: Script accesses 'ptm_score' from the OpenFold3 response structures_with_scores entry", "[correct-response-path] Scores are read from the correct nested path outputs[0]['structures_with_scores'][0]: Script navigates the OpenFold3 response through 'outputs' (index 0), then 'structures_with_scores' (index 0) to read the score fields, not from a flat top-level key" ] } ] }
-
-
BENCHMARK.md 7.7 KB
# Skill Benchmark: msa-structure-prediction-pipeline > ✅ **Overall verdict: PASS — Recommended for publication** ## Publication Recommendation Recommended for publication based on the completed evaluation evidence in this report. ## Evaluation Metadata - Skill: `msa-structure-prediction-pipeline` - Evaluation date: 2026-09-19 - Evaluator version: `1.5.6` - Agents: Claude Code (`aws/anthropic/bedrock-claude-opus-4-8`), Codex (`openai/openai/gpt-5.5`) - Tasks: 4 evaluation tasks (4 positive) - Dataset digest: `sha256:69feec5f4715fb1d6f8488fa2a2b2948f573b98d6347fd0538cf9f6a9d65ac8b` (skill-evaluator-dataset-snapshot/1) - Attempts per task: 3 - Environment: `k8s-sandbox` - Tier 2 evidence: required for publication - Tier 3 evidence: required for publication Each task attempt ran in its own isolated sandbox pod. ## What This Report Answers The three-tier evaluation checks whether the skill: - is safe to use; - produces correct answers; - is discovered and activated when needed; - helps the agent complete the user's goal and expected workflow; and - avoids wasted skill and tool usage. ## Results at a Glance | Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | |---|---:|---:| | Overall | 65.5% — baseline ran, but no comparable score was available; uplift unavailable | 83.2% — baseline ran, but no comparable score was available; uplift unavailable | | Security | 60.0% → 50.0% (-10.0 points) | 37.5% → 100.0% (+62.5 points) | | Correctness | 34.0% → 83.3% (+49.3 points) | 72.5% → 85.0% (+12.5 points) | | Discoverability | 99.2% — baseline ran, but no comparable score was available; uplift unavailable | 86.3% — baseline ran, but no comparable score was available; uplift unavailable | | Effectiveness | 11.6% → 26.1% (+14.5 points) | 40.2% → 58.3% (+18.1 points) | | Efficiency | 68.7% — baseline ran, but no comparable score was available; uplift unavailable | 86.2% — baseline ran, but no comparable score was available; uplift unavailable | **How to read this table:** baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points. Example: `47.0% → 92.0% (+45.0 points)` means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline. ## Token Usage Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions. | Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage | |---|---|---:|---:|---:|---:|---| | claude-code | All cases | 1,525,021 | 4,412,102 | N/A | N/A | skill 6/6; base 10/10 | | claude-code | eval-1-basic-structure-prediction | 569,669 | 1,697,001 | N/A | N/A | skill 2/2; base 3/3 | | claude-code | eval-2-high-depth-msa-retrieval | 349,168 | 457,656 | N/A | N/A | skill 1/1; base 3/3 | | claude-code | eval-3-multi-database-msa | 372,967 | 670,230 | N/A | N/A | skill 2/2; base 1/1 | | claude-code | eval-4-full-hosted-pipeline-with-scores | 233,217 | 1,587,215 | N/A | N/A | skill 1/1; base 3/3 | | codex | All cases | 608,000 | 3,848,751 | N/A | N/A | skill 4/4; base 8/8 | | codex | eval-1-basic-structure-prediction | 117,699 | 906,297 | N/A | N/A | skill 1/1; base 3/3 | | codex | eval-2-high-depth-msa-retrieval | 174,594 | 1,891,798 | N/A | N/A | skill 1/1; base 3/3 | | codex | eval-3-multi-database-msa | 149,019 | 636,448 | -487,429 | -76.59% | skill 1/1; base 1/1 | | codex | eval-4-full-hosted-pipeline-with-scores | 166,688 | 414,208 | -247,520 | -59.76% | skill 1/1; base 1/1 | | ALL AGENTS | Dataset aggregate | 2,133,021 | 8,260,853 | N/A | N/A | skill 10/10; base 18/18 | Prompt tokens include cached reads, so total tokens are `prompt + completion` (cached is not added twice). The Efficiency score uses `(prompt - cached) + completion`. N/A means the relevant trajectory counters were not available; coverage is never estimated. ## Tier Status | Tier | Purpose | Status | Evidence | |---|---|---|---| | Tier 1 | Static validation | **PASSED WITH OBSERVATIONS** | 11 validator(s); 17 finding(s) | | Tier 2 | Semantic deduplication | **PASSED** | 2 validator(s); 0 finding(s) | | Tier 3 | Live agent evaluation | **PASS** | 2 agent(s); 4 task(s) | ## Findings and Observations <details> <summary>Show detailed findings and successful checks</summary> - **MEDIUM** QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.author' (`skills/bionemo-agent-toolkit/skills/msa-structure-prediction-pipeline/SKILL.md`) - **MEDIUM** QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (`skills/bionemo-agent-toolkit/skills/msa-structure-prediction-pipeline/SKILL.md`) - **MEDIUM** QUALITY/quality_discoverability: Description uses first/second person (`skills/bionemo-agent-toolkit/skills/msa-structure-prediction-pipeline/SKILL.md`) - **MEDIUM** SCHEMA/folder_hierarchy: Unexpected nesting depth for general skill (`skills/bionemo-agent-toolkit/skills/msa-structure-prediction-pipeline`) - **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (`skills/bionemo-agent-toolkit/skills/msa-structure-prediction-pipeline/SKILL.md`) - 12 additional finding(s) are available in the full evaluation artifacts. </details> ## Scoring Methodology <details> <summary>Show dimension definitions, source signals, and thresholds</summary> | Dimension | Question | Scored signals | |---|---|---| | Security | Is it safe to use? | `security` (100%) | | Correctness | Is the answer correct? | `accuracy` (100%) | | Discoverability | Was the right skill loaded when needed? | `skill_execution` (100%) | | Effectiveness | Did the skill help complete the task? | `goal_accuracy` (50%) + `behavior_check` (50%) | | Efficiency | Did it avoid wasted tool calls and token usage? | `skill_efficiency` (50%) + `token_efficiency` (50%) | - Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%. - Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL. - Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate. - The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold. - Effectiveness is the equal-weight mean of goal completion (`goal_accuracy`) and expected workflow adherence (`behavior_check`). - Efficiency is 50% tool-call productivity (the backward-compatible `skill_efficiency` wire id) and 50% `token_efficiency`. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial. Signals present in this run: - `security` (Security): unsafe operations, secret leakage, and unauthorized access. - `skill_execution` (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed. - `skill_efficiency` (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability). - `accuracy` (Accuracy): final-answer correctness against the reference answer. - `goal_accuracy` (Goal Accuracy): whether the user's goal was achieved. - `behavior_check` (Behavior Check): whether the expected workflow behavior was followed. - `token_efficiency` (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency). </details> ## Freshness Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes. -
skill-card.md 4.1 KB
## Description: <br> Run a complete protein structure prediction pipeline using NVIDIA BioNeMo NIMs: search for MSA alignments with MSA-Search (ColabFold), then predict the structure with OpenFold3 using the retrieved alignments. <br> This skill is ready for commercial/non-commercial use. <br> ## Owner NVIDIA <br> ### License/Terms of Use: <br> Apache-2.0 AND CC-BY-4.0 <br> ## Use Case: <br> Developers and computational biologists who need to predict protein structures with maximum accuracy by chaining MSA homolog search with MSA-informed structure prediction using NVIDIA BioNeMo NIMs. <br> ### Deployment Geography for Use: <br> Global <br> ## Requirements / Dependencies: <br> **Requires API Key or External Credential:** [Yes] <br> **Credential Type(s):** [API key] <br> Do not include secrets in prompts/logs/output; use least-privilege credentials; rotate keys as appropriate. <br> ## Known Risks and Mitigations: <br> Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills. <br> Mitigation: Review and scan skill before deployment. <br> ## Reference(s): <br> - [NVIDIA BioNeMo Agent Toolkit (GitHub)](https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit) <br> ## Skill Output: <br> **Output Type(s):** [Code, Files, Analysis] <br> **Output Format:** [Markdown with inline Python code blocks] <br> **Output Parameters:** [1D] <br> **Other Properties Related to Output:** [None] <br> ## Evaluation Agents Used: <br> - Claude Code (`aws/anthropic/bedrock-claude-opus-4-8`) <br> - Codex (`openai/openai/gpt-5.5`) <br> ## Evaluation Tasks: <br> 4 evaluation tasks (4 positive), each with 3 attempts per task, evaluated in isolated k8s-sandbox pods. <br> ## Evaluation Metrics Used: <br> Reported benchmark dimensions: <br> - Security: Whether the skill avoids unsafe operations, secret leakage, and unauthorized access. <br> - Correctness: Whether the final answer is correct against the reference answer. <br> - Discoverability: Whether the expected skill was selected, decoys were avoided, and the workflow executed. <br> - Effectiveness: Whether the skill helped complete the user's goal (50% goal completion + 50% expected workflow adherence). <br> - Efficiency: Whether the skill avoided wasted tool calls and token usage (50% tool-call productivity + 50% token efficiency). <br> Underlying evaluation signals used in this run: <br> - `security`: Checks for unsafe operations, secret leakage, and unauthorized access. <br> - `skill_execution`: Whether the expected skill was selected and the workflow executed correctly. <br> - `accuracy`: Final-answer correctness against the reference answer. <br> - `goal_accuracy`: Whether the user's goal was achieved. <br> - `behavior_check`: Whether the expected workflow behavior was followed. <br> - `skill_efficiency`: Tool-call productivity measured during skill execution. <br> - `token_efficiency`: Actual uncached prompt plus completion token usage. <br> ## Evaluation Results: <br> | Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | |---|---:|---:| | Overall | 65.5% | 83.2% | | Security | 60.0% → 50.0% (-10.0 points) | 37.5% → 100.0% (+62.5 points) | | Correctness | 34.0% → 83.3% (+49.3 points) | 72.5% → 85.0% (+12.5 points) | | Discoverability | 99.2% | 86.3% | | Effectiveness | 11.6% → 26.1% (+14.5 points) | 40.2% → 58.3% (+18.1 points) | | Efficiency | 68.7% | 86.2% | ## Skill Version(s): <br> 0.1.0 (source: pyproject.toml) <br> ## Ethical Considerations: <br> NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse. <br> (For Release on NVIDIA Platforms Only) <br> Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://app.intigriti.com/programs/nvidia/nvidiavdp/detail). <br> -
SKILL.md 6.4 KB
--- name: msa-structure-prediction-pipeline description: > NOTE: your protein sequence and the retrieved MSA alignment are transmitted to external NVIDIA-hosted APIs (health.api.nvidia.com) on every call. Use local NIM containers for confidential or proprietary sequences. Run a complete protein structure prediction pipeline using NVIDIA BioNeMo NIMs: search for MSA alignments with MSA-Search (ColabFold), then predict the structure with OpenFold3 using the retrieved alignments. Use this skill whenever the user wants to predict a protein structure with maximum accuracy using MSA context, run the full AlphaFold3-style pipeline, generate MSA-informed structure predictions, or improve structure prediction accuracy by providing evolutionary information. Triggers on: MSA structure prediction pipeline, structure prediction pipeline, MSA-informed prediction, OpenFold3, ColabFold MSA, AlphaFold3 pipeline, protein structure, homology search, a3m alignment, UniRef30, NIM microservice. This pipeline chains MSA-Search and OpenFold3. license: Apache-2.0 AND CC-BY-4.0 allowed-tools: Bash, Read, Write, AskUserQuestion --- # MSA Structure Prediction Pipeline Predict protein structures with high accuracy by chaining two BioNeMo NIMs: ``` Step 1: MSA-Search → Step 2: OpenFold3 (Search homologs) (Predict structure with MSA) ``` --- ## Overview Why chain these NIMs? - **MSA-Search** finds evolutionary homologs in UniRef30 and ColabFold databases using GPU-accelerated MMSeqs2. The resulting alignment provides crucial evolutionary information. - **OpenFold3** uses the MSA to improve structure prediction accuracy — especially for sequences where no close homolog exists in PDB. - Running MSA-Search first means OpenFold3 gets the full evolutionary context rather than a single-sequence prediction. --- ## Before you start Confirm with the user: 1. **Query sequence**: amino acid sequence to predict 2. **MSA depth**: how many sequences to retrieve (default 500; more = slower but more context) 3. **API mode**: hosted or local Docker? Note: local MSA-Search requires 1.4 TB of database storage — strongly recommend hosted unless the user has that infrastructure. For local Docker, do not assume MSA-Search and OpenFold3 are both on `localhost:8000` concurrently. Run one container at a time and hand off the A3M file, or start each NIM on a distinct host port and set the URLs explicitly. --- ## Step 1: Search for MSA with MSA-Search ```python import requests, json, os from pathlib import Path NGC_API_KEY = os.getenv("NGC_API_KEY") HOSTED = True query_sequence = "<YOUR_PROTEIN_SEQUENCE>" if HOSTED: msa_url = "https://health.api.nvidia.com/v1/biology/colabfold/msa-search/predict" headers = {"Content-Type": "application/json", "Authorization": f"Bearer {NGC_API_KEY}"} else: msa_url = "http://localhost:8000/biology/colabfold/msa-search/predict" headers = {"Content-Type": "application/json"} payload = { "sequence": query_sequence, "databases": ["Uniref30_2302", "colabfold_envdb_202108"], "e_value": 0.0001, "output_alignment_formats": ["a3m"], } r = requests.post(msa_url, headers=headers, json=payload) r.raise_for_status() msa_result = r.json() # Extract the A3M alignment a3m_alignment = msa_result["alignments"]["Uniref30_2302"]["a3m"]["alignment"] # Save for reference with open("query_msa.a3m", "w") as f: f.write(a3m_alignment) # Count sequences in alignment n_seqs = a3m_alignment.count(">") print(f"Step 1 complete: found {n_seqs} homologous sequences") print(f"MSA saved to query_msa.a3m") ``` --- ## Step 2: Predict structure with OpenFold3 Pass the MSA directly into OpenFold3's `msa` field: ```python if HOSTED: of3_url = "https://health.api.nvidia.com/v1/biology/openfold/openfold3/predict" else: of3_url = "http://localhost:8000/biology/openfold/openfold3/predict" # Build the OpenFold3 MSA structure from the retrieved alignment msa_data = { "uniref30": { "a3m": { "alignment": a3m_alignment, "format": "a3m" } } } # Optionally also include colabfold_envdb alignment if requested # env_alignment = msa_result["alignments"]["colabfold_envdb"]["a3m"]["alignment"] # msa_data["colabfold_env"] = {"a3m": {"alignment": env_alignment, "format": "a3m"}} payload = { "inputs": [{ "input_id": "prediction_with_msa", "output_format": "pdb", "molecules": [ { "type": "protein", "sequence": query_sequence, "diffusion_samples": 1, "msa": msa_data } ] }] } r = requests.post(of3_url, headers=headers, json=payload, timeout=300) r.raise_for_status() result = r.json() output = result["outputs"][0] for i, sample in enumerate(output["structures_with_scores"]): fmt = sample["format"] filename = f"predicted_structure_{i+1}.{fmt}" with open(filename, "w") as f: f.write(sample["structure"]) print(f"\nStep 2 complete: {filename} saved") print(f" Confidence: {sample['confidence_score']:.4f}") print(f" pLDDT: {sample['complex_plddt_score']:.4f}") print(f" pTM: {sample['ptm_score']:.4f}") ``` --- ## Comparing single-sequence vs MSA-informed prediction If the user wants to see the impact of MSA, run OpenFold3 twice — once with the full MSA and once with just the query sequence as a minimal alignment: ```python # Minimal MSA (single sequence — same as no MSA context): minimal_msa = { "main": { "a3m": { "alignment": f">query\n{query_sequence}", "format": "a3m" } } } ``` A larger, higher-quality MSA typically yields higher pLDDT and lower pDE, especially for proteins with many known homologs. --- ## For protein complexes Use the `/paired/predict` endpoint of MSA-Search to get paired alignments for multi-chain complexes, then pass each chain's alignment into the corresponding molecule's `msa` field and `paired_msa` fields: ```python # Paired MSA search endpoint for complexes: msa_paired_url = "https://health.api.nvidia.com/v1/biology/colabfold/msa-search/paired/predict" paired_payload = { "sequences": [chain_A_sequence, chain_B_sequence], "e_value": 0.0001, } ``` --- ## Quick reference — skill dependencies | Step | Skill | Key endpoint | |---|---|---| | MSA search | `msa-search-nim` | `/biology/colabfold/msa-search/predict` | | Structure prediction | `openfold3-nim` | `/biology/openfold/openfold3/predict` | -
skill.oms.sig 4.5 KB · in bundle
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.