# Openfold3

Structure prediction using OpenFold3, an open-weights PyTorch reproduction of...

- Repository: https://github.com/aipoch/open-science (5414 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add aipoch/open-science --skill openfold3 -g -a claude-code -y`
Codex: `npx skills add aipoch/open-science --skill openfold3 -g -a codex -y`
Cursor: `npx skills add aipoch/open-science --skill openfold3 -g -a cursor -y`
Gemini CLI: `npx skills add aipoch/open-science --skill openfold3 -g -a gemini-cli -y`

## Description

Structure prediction using OpenFold3, an open-weights PyTorch reproduction of AlphaFold3 from the AlQuraishi Lab. Use this skill when predicting protein/nucleic-acid/ligand complex structures with an Apache-2.0-licensed AF3 reimplementation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# OpenFold3 Structure Prediction

## Prerequisites

| Requirement    | Minimum | Recommended |
| -------------- | ------- | ----------- |
| Python         | 3.10+   | 3.11        |
| CUDA           | 12.1+   | 12.4+       |
| GPU VRAM       | 24GB    | 80GB (H100) |
| RAM            | 32GB    | 64GB        |
| Disk (weights) | 3GB     | -           |

## How to run

### Installation

```bash
pip install 'openfold3[cuequivariance]==0.4.1'
```

The default attention kernel is DeepSpeed `DS4Sci_EvoformerAttention`. If
DeepSpeed is unavailable, switch to the cuEquivariance triangle kernels (no
build-from-source) by overriding the eval memory settings in
`model_config.py` (`use_deepspeed_evo_attention: False`,
`use_cueq_triangle_kernels: True`). Some pre-built environments already ship
this override; check before re-patching.

### Weights

Apache-2.0, ~2.3 GB from HF `OpenFold/OpenFold3`. The repo is **gated** (auto-approval), accept the access form on the HF model page and authenticate (`huggingface-cli login` or `HF_TOKEN`) before downloading:

```bash
export OPENFOLD_CACHE=~/.openfold3
huggingface-cli download OpenFold/OpenFold3 checkpoints/of3-p2-155k.pt \
  --local-dir "$OPENFOLD_CACHE"
```

`run_openfold` will also auto-download to `$OPENFOLD_CACHE` on first run if
egress is open and HF credentials are available (either `HF_TOKEN` or a prior
`huggingface-cli login`) with repo access granted. The interactive
`setup_openfold` helper exists but prompts on stdin; prefer the explicit
download above for non-interactive runs.

### Running

```bash
export OPENFOLD_CACHE=/path/to/cache
run_openfold predict \
  --query_json=queries.json \
  --output-dir out/ \
  --use-msa-server false \
  --use-templates false
```

`run_openfold` discovers the checkpoint under `$OPENFOLD_CACHE` automatically.
Only pass `--inference-ckpt-path <file.pt>` if you have a non-standard layout
or multiple checkpoints and need to pin one explicitly.

The rest: https://github.com/aipoch/open-science/blob/HEAD/resources/skills/openfold3/SKILL.md
