{"slug": "design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search", "title": "Design Proteins with RFD4-Proteina Using Reward-Guided Inference-Time Search", "summary": "NVIDIA BioNeMo and the Institute for Protein Design at the University of Washington's School of Medicine released RFD4-Proteina, an open protein-design model that co-designs sequences and all-atom structures and uses reward-guided inference-time search to target binder candidates against PD-L1. RFD4-Proteina cuts diffusion sampling from about 400 steps in Proteina-Complexa to 60 by working on a residue-level latent representation, and its autoencoder decoder removes the separate inverse-folding handoff to a model such as ProteinMPNN. The model is available as an open model on GitHub for training and method development or as a NIM microservice for HTTP-based inference deployment.", "body_md": "Protein design is a search problem. Choose amino acids for an eight-residue protein sequence and more than 25 billion combinations are possible. Choose amino acids for a 100-residue protein sequence and the number of possibilities exceeds the number of atoms in the observable universe. Somewhere in that space is a protein that opens a path to a new therapy. There are too many combinations to search exhaustively, so finding it depends on knowing where to look.\n\n[RFD4-Proteina](https://github.com/RosettaCommons/RFD4-Proteina), an NVIDIA [BioNeMo](https://github.com/NVIDIA-BioNeMo/) open model co-developed with the Institute for Protein Design at the University of Washington’s School of Medicine, navigates that space using patterns learned from nature. It co-designs protein sequences and all-atom structures, and uses reward-guided inference-time search to focus compute on the most promising candidates.\n\nThis tutorial shows computational biologists, ML engineers and drug discovery researchers how to design protein binder candidates against PD-L1, an oncology target, using reward-guided inference-time search and introduces experimental validation results across design tasks.\n\nYou can access RFD4-Proteina in two ways:\n\n- Choose the [open model](https://github.com/RosettaCommons/RFD4-Proteina) for training, inference, method development, and direct control over sampling code or\n- Choose the [NIM microservice](https://build.nvidia.com/ipd/rfd4-proteina) for rapid inference deployment with an HTTP interface\n\nBuilding on [Proteina-Complexa](https://github.com/NVIDIA-BioNeMo/Proteina-Complexa)’s partially latent approach, RFD4-Proteina combines explicit backbone coordinates with latent representation, learned sequence and atomistic variables. Its autoencoder decoder produces the sequence and all-atom structure together, removing the separate inverse-folding handoff to a model such as [ProteinMPNN](https://github.com/dauparas/ProteinMPNN).\n\n### **Prerequisites**\n\n- **Open model**  - Supported Linux GPU host and Python 3.12; follow [the repository setup guide and use a supported NVIDIA GPU.](https://rosettacommons.github.io/RFD4-Proteina/installation.html)\n  - **Model cache:** Setup downloads the Hugging Face bundle automatically; set HF_HOME only if you want a different cache directory.\n- Supported Linux GPU host and Python 3.12; follow \n- **NIM**  - **Self-host:** x86_64 or arm64 Linux meeting the[NIM prerequisites](https://docs.nvidia.com/nim/bionemo/rfd4-proteina/latest/index.html) , Docker, NVIDIA Driver, NVIDIA Container Toolkit, and an[NGC API key](https://org.ngc.nvidia.com/setup/api-key) .\n  - **NIM API endpoint (not recommended for production runs):** HTTP access through NVIDIA[build.nvidia.com](http://build.nvidia.com) via Shell and Python scripts, no local GPU or model installation required.\n\n## About RFD4-Proteina\n\nThe search loop shown in Figure 1, above, is where RFD4-Proteina focuses its compute.\n\nDuring inference-time reasoning search, the model denoises generation trajectories to obtain structures, scores these designs, retains and branches promising partial states, and continues until the generation criteria are reached.\n\nRewards can measure geometry, interactions, or independent prediction confidence. This kind of extra search optimizes designs against a specified objective to yield higher-scoring designs. Later in this tutorial, you will see how a user can enable this functionality through the open model and the NIM.\n\nRFD4-Proteina is faster and uses less memory than RFD3 for several reasons:\n\n- It works on a residue-level latent representation instead of atom-level, which avoids memory blow-up.\n- Engineering of the diffusion process cuts sampling from about 400 steps in Proteina-Complexa to 60, and computation is concentrated on the parts of the process that matter most thanks to reasoning capabilities in the model.\n- Inference-time search is also faster, since the oracles (OF3 and physics methods like [tmol](https://github.com/uw-ipd/tmol) ) are CUDA-accelerated.\n- The model and kernels were co-designed with the cuEquivariance and BioNeMo Inference Runtime (BIR) teams for speed and scalability.\n\n## From a molecular design idea to candidate designs\n\nThe workflow in Figure 3, above, demonstrates how to use RFD4-Proteina to go from a scientific objective to candidates for experimental testing. An [agent](https://developer.nvidia.com/blog/build-an-ai-scientist-for-life-science-discovery-with-nvidia-bionemo-agent-toolkit/) can coordinate these tools and track results, while scientists define the objectives and use experimental evidence to guide the next round.\n\n## Preparing the molecular inputs and environment\n\nBegin by defining the criteria and requirements for generation. For example, RFD4-Proteina expects users to define what may change, what must remain fixed, and computational and experimental success criteria.\n\nUse AtomWorks to generate /manipulate the input data. [AtomWorks](https://github.com/RosettaCommons/atomworks) is the molecular data layer used to prepare structures and design annotations for RFD4-Proteina. Its [Python and PyMOL workflows](https://github.com/RosettaCommons/RFD4-Proteina/blob/main/docs/workflow/inputs.md) prepare fixed atoms, designable residues, hotspots, and molecular context. Preserve the supplied ligand or motif chemistry when designing surrounding protein.\n\nBoth the open model and NIM accept annotated CIFs or a condition specification plus its source structure. The specification below fixes the target and defines the new binder.\n\nThe repository’s cropped PD-L1 structure from [PDB 5O45](https://www.rcsb.org/structure/5O45) serves as the target. Fix the target’s sequence and backbone coordinates, allow its side chains to repack, and direct binder generation toward hotspot atoms on Tyr56, Met115, and Tyr123. The new binder has 100–150 residues, with free sequence and coordinates.\n\nClone the repository, then run the examples from its root. This writes `pdl1.json`; both paths use the same target CIF and conditions.\n\n```\ngit clone https://github.com/RosettaCommons/RFD4-Proteina.git\ncd RFD4-Proteina\n\ncat > pdl1.json <<'JSON'\n{\n  \"pdl1_binder\": {\n    \"input\": \"docs/examples/inputs/5o45_cropped.cif\",\n    \"contig\": \"100-150, /0, A17-131\",\n    \"conditions\": {\n      \"C_CRD\": {\"true\": [{\"select\": \"sel('A') and is_protein_backbone\"}]},\n      \"C_SEQ\": {\"true\": [{\"select\": \"sel('A')\"}]},\n      \"C_HOT\": {\"true\": [\n        {\"select\": \"sel('A/*/56/[CG,OH]')\"},\n        {\"select\": \"sel('A/*/115/[CG,SD]')\"},\n        {\"select\": \"sel('A/*/123/[CD2,OH]')\"}\n      ]}\n    }\n  }\n}\nJSON\n```\n\n### Open model setup\n\nOn a supported Linux/CUDA system, install the repository environment with a current uv release (validated with 0.12.24). If uv is already installed, update it first so it recognizes CUDA 13.2. Setup caches the Hugging Face model bundle, including the paired autoencoder. While the model repository is private, authenticate with hf auth login using an account with access.\n\n```\nbash setup.sh --native\nsource .venv/bin/activate\n```\n\n### NIM environment setup\n\nTo host the NIM, run this block in Bash on a supported GPU host with Docker and NVIDIA Container Toolkit installed.\n\n```\nread -rsp 'NGC API key: ' NGC_API_KEY; echo\nexport NGC_API_KEY\nprintf '%s' \"$NGC_API_KEY\" | docker login nvcr.io \\\n  -u '$oauthtoken' --password-stdin\nimage=nvcr.io/nim/ipd/rfd4-proteina:latest\ndocker pull \"$image\"\nexport RFD4_NIM_IMAGE=\"$(docker image inspect \\\n  --format '{{index .RepoDigests 0}}' \"$image\")\"\nprintf '%s\\n' \"$RFD4_NIM_IMAGE\" > nim-image.txt\nexport LOCAL_NIM_CACHE=\"$HOME/.cache/nim\"\nmkdir -p \"$LOCAL_NIM_CACHE\"\ndocker run -d --rm --name rfd4-proteina \\\n  --runtime=nvidia --gpus 'device=0' -p 8000:8000 \\\n  -e NGC_API_KEY -v \"$LOCAL_NIM_CACHE\":/opt/nim/.cache \\\n  --shm-size=16g \"$RFD4_NIM_IMAGE\"\n```\n\n## Generate sequences and structures\n\n### **Open-model generation**\n\nSave the following as `design.py` in the repository root. The same script supports generation and search. `Proteina.from_pretrained(\"nvidia/RFD4-Proteina\")` loads the current Hugging Face model and paired autoencoder checkpoints.\n\n``` python\nimport hydra\nfrom rfd4_proteina import Proteina\nfrom rfproteina.generate import run_generation\n\n@hydra.main(config_path=\"configs\", config_name=\"inference\", version_base=\"1.3\")\ndef main(cfg):\n    model = Proteina.from_pretrained(\"nvidia/RFD4-Proteina\")\n    run_generation(cfg, model=model)\n\nif __name__ == \"__main__\":\n    main()\n```\n\nGenerate one candidate from the repository root:\n\n```\npython design.py inputs=pdl1.json out_dir=runs/pdl1-open seed=42 compile_lengths=null\n```\n\nOutputs are saved under runs/pdl1-open/inference_samples/. Add num_replicates=10 for ten candidates and choose a new out_dir for each run. Hugging Face caches downloads; add revision=”<commit>” to from_pretrained to reproduce a particular model version.\n\n### NIM generation\n\nSave this as `nim_client.py`. It sends the PD-L1 condition spec and target CIF to the NIM, then saves generated structures and response metrics.\n\n``` python\nimport json\nfrom pathlib import Path\nimport requests\n\nspec = json.loads(Path(\"pdl1.json\").read_text())[\"pdl1_binder\"]\ntarget = Path(spec[\"input\"])\nspec[\"input\"] = target.name\npayload = {\n    \"task\": \"motif_scaffolding\",\n    \"input\": {\"format\": \"condition_spec\", \"example_id\": \"pdl1_binder\",\n              \"spec\": spec, \"files\": [{\"filename\": target.name, \"content\": target.read_text()}]},\n    \"sampling\": {\"num_replicates\": 1, \"seed\": 42},\n    \"metrics\": {\"tags\": [\"design\", \"hotspot_conditioning\"]},\n}\n\ndef submit(payload, out):\n    out.mkdir(parents=True, exist_ok=True)\n    response = requests.post(\"http://localhost:8000/biology/ipd/rfd4-proteina/generative\",\n                             json=payload, timeout=1800)\n    response.raise_for_status()\n    result = response.json()\n    (out / \"response.json\").write_text(json.dumps(result, indent=2))\n    for i, design in enumerate(result[\"designs\"]):\n        dest = out / f\"design-{i}.cif\"\n        dest.write_text(design[\"structure\"][\"content\"])\n        print(design[\"design_id\"], dest)\n\nif __name__ == \"__main__\":\n    submit(payload, Path(\"runs/pdl1-nim\"))\n```\n\nInstall requests and run the client from the repository root. Keep `pdl1.json` beside the target CIF.\n\n```\npython -m pip install requests\npython nim_client.py\n```\n\n### Performance optimizations across open model and NIM\n\nFor faster design iteration, the [BioIR backend](https://github.com/NVIDIA-BioNeMo/BioNeMo-Inference-Runtime) accelerates RFD4-Proteina by 1.37–1.73× over the default compiled backend across six tested Hopper GPU configurations (see Figure 4, below). On H100 PCIe, total suite time drops from 161 to 111 seconds, about 31% less runtime. The benchmark uses batch size 1 and sums warm end-to-end timings across 15 sequence lengths (128–1,024 tokens).\n\n## Inference-time search with external oracles\n\n### Open-model search with OpenFold3\n\nInstall the optional OpenFold3 runtime and weights with `./scripts/download_example_data.sh ./data_path`. Set `OF3_IMAGE`, `OF3_MODEL_DIR`, and `OF3_JAX_CACHE_DIR` to the paths it prints, then run `mkdir -p \"$OF3_JAX_CACHE_DIR\"`. Apptainer must be available on the GPU host.\n\nThis example uses the [AlphaFold3 codebase](https://github.com/google-deepmind/alphafold3), which is [released under the open-source Apache 2.0 license](https://github.com/google-deepmind/alphafold3?tab=Apache-2.0-1-ov-file), and the [OpenFold3 model weights](https://github.com/aqlaboratory/openfold-3), which are also [released under the Apache 2.0 license](https://github.com/aqlaboratory/openfold-3?tab=Apache-2.0-1-ov-file).\n\nReuse design.py with the search preset:\n\n```\npython design.py inference_experiment=inference_beam_example \\\n  metrics/refolding_oracles=of3 inputs=pdl1.json subset_to_examples=null \\\n  num_replicates=1 out_dir=runs/pdl1-open-search seed=42 compile_lengths=null\n```\n\nThe preset uses two branches, a beam width of three, and scoring at steps 20, 40, 50 and 60. It rewards the designed chain’s OpenFold3 pLDDT (`oracle.plddt_coi`), with a floor of 50, and saves qualifying rollouts at reward 80. This measures confidence in the binder, not evidence of binding; inspect interface and refolding metrics separately. Outputs are under runs/pdl1-open-search/.\n\n### NIM search with OpenFold3\n\nSave this as `nim_search_request.py`. It reuses the PD-L1 input and submits a reward-guided OpenFold3 search.\n\n``` python\nfrom pathlib import Path\nfrom nim_client import payload, submit\n\nkey = \"oracle_of3_nvcf.overall_plddt\"\npayload[\"sampling\"][\"num_steps\"] = 60\npayload[\"search\"] = {\n    \"step_checkpoints\": [0, 20, 40, 50, 60],\n    \"n_branch\": 2, \"beam_width\": 3,\n    \"reward_metrics_tags\": [\"unconditional_refolding\"],\n    \"weights\": {key: 1.0}, \"clip_values\": {key: {\"min\": 50.0}},\n    \"intermediate_save_min_reward\": 80.0,\n}\npayload[\"metrics\"] = {\"tags\": [\"design\", \"unconditional_refolding\"]}\nsubmit(payload, Path(\"runs/pdl1-nim-search\"))\n```\n\n### **Enable the NIM oracle**\n\nMount the OpenFold3 reward.py callback as described in the [oracle guide](https://nim-tme.gitlab-master-pages.nvidia.com/documentation/mr-1792/docs/bionemo/rfd4-proteina/latest/oracle.html#openfold3). It reports oracle_of3_nvcf.overall_plddt for the whole complex; evaluate the binder interface separately.\n\nSave the OpenFold3 NVCF callback from the oracle guide as `reward.py` and export `OF3_NIM_API_KEY` with an NVCF invoke credential. Relaunch the service with this callback:\n\n```\ndocker stop rfd4-proteina\ndocker run -d --rm --name rfd4-proteina \\\n  --gpus 'device=0' -p 8000:8000 --shm-size=16g \\\n  -e NGC_API_KEY -v \"$LOCAL_NIM_CACHE:/opt/nim/.cache\" \\\n  -v \"$PWD/reward.py:/opt/nim/reward.py:ro\" \\\n  -e NIM_ALLOW_ORACLE_PLUGIN=true -e OF3_NIM_API_KEY \\\n  \"$RFD4_NIM_IMAGE\"\n```\n\nRun the search script. It saves designs and response metrics under runs/pdl1-nim-search/.\n\n```\npython nim_search_request.py\n```\n\nThis request uses two branches, checkpoints [0, 20, 40, 50, 60], and a beam width of three. It sets a reward floor of 50 and saves intermediate designs with scores of at least 80. These are example thresholds for OpenFold3 overall pLDDT, a prediction-confidence metric for the whole complex. Search-time reward tags and final reporting tags are separate.\n\nSearch output counts vary. Inspect the generated CIFs and retained metrics before selecting candidates. Include refolding and scoring in compute comparisons.\n\n### Filter and rank candidates\n\nCheck constraints, motif preservation, clashes, interfaces, refolding consistency, and structural diversity metrics. [OpenFold3](https://github.com/aqlaboratory/openfold-3), and [RoseTTAFold3](https://github.com/RosettaCommons/foundry/blob/production/models/rf3/README.md) provide prediction options; [TMol](https://github.com/uw-ipd/tmol) provides Rosetta-inspired all-atom scoring and optimization.\n\nCommon metrics include ipTM (interface Predicted Template Modeling), ipSAE (interaction prediction Score from Aligned Errors), and RMSD (Root Mean Square Deviation) scores from protein structure prediction models like OpenFold 3, along with interaction energies from physics-based models like TMol.\n\n## Test experimentally and refine\n\nTable 1, above, highlights RFD4-Proteina’s broad range of capabilities across molecular tasks. It not only supports this variety of tasks, in the accompanying manuscript it is demonstrated that the model is also the state-of-the-art model across this breadth of molecular tasks, both in terms of output quality and throughput.\n\nTurn that throughput into scientific progress by selecting diverse candidates for synthesis, expression, and task-specific assays. Feed experimental outcomes back into the objective, constraints, and ranking criteria for the next round.\n\n## Run a campaign with an AI agent\n\nUse the [**rfd4-proteina-campaign**](https://github.com/RosettaCommons/RFD4-Proteina/tree/main/skills/rfd4-proteina-campaign) skill to coordinate generation, search and evaluation with a record of inputs, model versions and compute use. The [**rfd4-proteina-package**](https://github.com/RosettaCommons/RFD4-Proteina/tree/main/skills/rfd4-proteina-package) skill produces a results archive with structures, metrics and a filtering report.\n\n```\nUse rfd4-proteina-campaign to design 100–150-residue PD-L1 binders from pdl1.json, preserving its target and hotspot constraints. Use the Hugging Face model via from_pretrained and OpenFold3. Agree on criteria and a compute budget, then compare generation with reward-guided search and run a campaign via rfd4-proteina-campaign. Return up to ten diverse candidates with scores and compute usage; package the results with rfd4-proteina-package.\n```\n\n## Apply the workflow to your design problem\n\nRFD4-Proteina combines fast generation, smart search, and agent programmability in one workflow. Joint sequence and all-atom structure generation streamlines candidate creation, while reward-guided search focuses compute on task-specific objectives. Shared condition specifications connect both form factors to common evaluation tools, and NIM’s HTTP API lets agents submit requests and inspect results.\n\nUse the open model for method development and NIM for application integration with optional BioIR acceleration, bringing computational exploration and experimental feedback into an iterative design campaign.\n\nGet started with the [RFD4-Proteina NIM microservice](https://build.nvidia.com/ipd/rfd4-proteina), [explore the open model on GitHub](https://github.com/RosettaCommons/RFD4-Proteina), or point your agent at [BioNeMo Agent Toolkit skills](https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit/tree/main).", "url": "https://wpnews.pro/news/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search", "canonical_source": "https://developer.nvidia.com/blog/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search/", "published_at": "2026-10-21 12:30:00+00:00", "updated_at": "2026-10-21 12:44:27.510677+00:00", "lang": "en", "topics": ["ai-research", "machine-learning", "artificial-intelligence", "ai-tools"], "entities": ["NVIDIA BioNeMo", "RFD4-Proteina", "Institute for Protein Design", "University of Washington School of Medicine", "Proteina-Complexa", "ProteinMPNN", "PD-L1", "RFD3"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search", "markdown": "https://wpnews.pro/news/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search.md", "text": "https://wpnews.pro/news/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search.txt", "jsonld": "https://wpnews.pro/news/design-proteins-with-rfd4-proteina-using-reward-guided-inference-time-search.jsonld"}}