Skip to main content
License: RFD4-Proteina is open source and free for academic and commercial use under a BSD-3-Clause license. Please refer to the license for full terms.

Proto is not affiliated with Institute for Protein Design and NVIDIA. This toolkit is open source and builds on the implementations produced by these organizations. Product names, logos, and trademarks are the property of their respective owners.


RosettaCommons/RFD4-Proteina
RosettaCommons/RFD4-Proteina
View repo
rfd4-proteina.org
Visit website
Read preprint
@articlecorley2026rfd4proteina
Copy citation
ProtoProtoevo-design/proto-tools
View source
Open Notebook
Open notebook
proto-tools on GitHub
Run locally with proto-tools
Toolkit contributors

Background

RFD4-Proteina (Corley et al., 2026) uses a flow-based generative framework to model biomolecular sequences and three-dimensional structures. Its central contribution is a shared representation of molecular geometry and chemical identity, allowing sequence and structure to be generated together rather than treated as separate prediction problems. The model uses a partially latent representation. Polymer backbones are represented by explicit anchor coordinates, such as the Cα atoms of proteins, while additional residue-level features encode chemical identity and local conformation. An associated autoencoder converts these latent features into amino acid sequences and all-atom structures. Atomized components, including small-molecule ligands, retain information about their constituent atoms and chemical connectivity. RFD4-Proteina builds on the Proteina line of models and incorporates several architectural and training improvements. Its training data extend beyond experimentally determined structures to include predicted structures and physically simulated conformations, broadening the range of molecular systems represented during training. The model also uses more extensive pairwise representations and recurrent updates during generation. Two approaches allow additional computation to be applied during inference. The first, termed intrinsic reasoning by the authors, repeatedly updates intermediate representations during individual generative steps. Increasing these recurrent updates gives the model additional opportunities to refine the evolving structure. The second, extrinsic reasoning, uses search over candidate generation trajectories, selecting candidates according to external structural, geometric, or energetic scores. The latter is supported upstream but is not exposed through this Proto toolkit. The authors report improved performance across several computational protein-design benchmarks, including protein binding, small-molecule binding, enzyme design, and DNA binding. For example, the reported clustered pass rates for small-molecule and DNA binding were 14.3% and 3.5%, respectively, compared with 2.4% and 0.5% for the corresponding RFdiffusion3 comparisons. These are computational success metrics based on structural and predictive criteria, rather than direct measurements of experimental binding or activity. The paper also presents separate experimental validation of selected designs. For practical design workflows, the principal advantage is the joint generation of sequence and structure. RFD4-Proteina produces an all-atom model with its corresponding sequence, avoiding the need to run a separate inverse-folding model simply to assign amino acid identities to a generated backbone. The resulting designs should still be evaluated independently, for example through structure prediction, sequence analysis, or experimental characterization. The model supports a range of conditioning options, including fixed and flexible structural motifs, sequence constraints, target hotspots, ligand interactions, solvent exposure, hydrogen-bond roles, secondary structure, CATH fold classifications, and specified amino acid probabilities. These are documented in the upstream annotations reference. Symmetry-conditioned generation is not currently supported.

Learning Resources

Tools

RFD4-Proteina Design (rfd4-design)

Generates protein sequences and all-atom structures according to the constraints specified in each RFD4DesignSpec. Each specification represents an independent design task and produces num_replicates candidate designs. Results are returned as RFD4Designs collections, with one collection corresponding to each input specification.

API Reference

Source
List[RFD4DesignSpec]
Independent design tasks, each with its own input structure and constraints. Processed in a single run.
string
Raw upstream condition-spec JSON for callers who need conditions without a typed field. When set, design_specs is ignored and the JSON is forwarded as-is, so input paths must already point at CIF files and residue ids must already be in label numbering.
Source
number
default:"1.0"
Classifier-free guidance weight. 1.0 is no guidance; 0.0 excludes the main model.
number
Run only the final fraction of the trajectory, to refine or diversify an input rather than generate from scratch. 0.3 runs the last 30% and stays close to the input; higher values drift further. Mutually exclusive with the partial_t_* settings.
number
Starting corruption level for the backbone, in (0, 1). Note the inverted sense relative to partial_trajectory_fraction_steps: values near 1 stay close to the input, near 0 approach full generation.
number
Starting corruption level for the sidechain/sequence latents, in (0, 1), with the same inverted sense.
boolean
default:"False"
Derive the unset modality’s corruption level from the one that is set, through the default schedule coupling.
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
string
default:"cuda"
Execution device. rfd4-generate builds its Lightning trainer with accelerator="gpu" unconditionally, so a GPU is required.
integer
default:"3600"
Maximum execution time in seconds. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
integer
default:"1"
Designs generated per input spec.
integer
default:"1"
Designs denoised in parallel on the GPU. Confirm the longest input fits at 1 before raising it.
integer
default:"60"
Integration steps per design (upstream default 60). A recycle_strategy preset expands to exactly 60 steps and upstream requires the two to agree, so changing this requires recycle_strategy=None.
string
default:"thinking_medium"
Trunk recycling schedule as <low|medium|high>/<flat|midpeak|front_loaded>, trading compute for quality. midpeak totals 120/150/180 trunk passes; flat and front_loaded total 120/180/300. The thinking_* aliases are the front-loaded schedules. Setting any preset pins nsteps to 60. None disables the schedule and runs a fixed recycle depth of 0, which is the only way to use a custom nsteps.
RFD4SamplerTuning
Temperature for the backbone modality.
RFD4SamplerTuning
Temperature for the sidechain/sequence latent modality. Lowering tsr_k raises sequence diversity.
boolean
default:"False"
Switch both modalities to ODE integration, with no mid-trajectory noise injection.
string
default:"nvidia/RFD4-Proteina"
HuggingFace repo id or a local model-bundle directory. The denoiser and its matching autoencoder always load together.
string
default:"a06e2509c7033b010fc43614e9fd840303588502"
HuggingFace commit to pin, for reproducible loads. Ignored when model_checkpoint is a local directory.
string
Local PEFT/LoRA adapter directory, loaded onto the base and autoencoder pair it was fine-tuned against.
boolean
default:"False"
Compile the trunk across the upstream length buckets. Off by default: the first call otherwise pays a long compile across 15 buckets, which only pays off for large runs.
integer
default:"0"
Snapshot the trajectory every N steps. 0 disables. Rejected unless output_dir is set.
string
Directory for run outputs; None uses a tempdir. Each call writes into a fresh run-<id> subdirectory of it, so a reused output_dir cannot return a previous run’s designs, and the trajectory frames for a run land in that run’s own subdirectory. The <id> is random and is deliberately not returned, since a per-run path in the output would break seeded reproducibility; locate a run by directory mtime, or pass a fresh output_dir per call.
Source
List[RFD4Designs]
One bundle per input spec, in input order. Total design count is at most len(design_specs) * num_replicates; a spec that produced nothing contributes an empty bundle.

Applications

Use rfd4-design when both the protein sequence and structure are design variables. Applications include de novo protein generation, binder design against specified target sites, scaffolding of structural or functional motifs, enzyme active-site design, and generation conditioned on fold class or solvent exposure.The tool also supports partial diffusion, allowing an existing design to be modified rather than generated entirely from scratch. Fixed-coordinate motifs can be used when their positions must be preserved, while internal-coordinate constraints allow motifs to retain their internal geometry without fixing their global orientation.Because the model generates sequences alongside structures, designs can proceed directly to independent evaluation without a separate inverse-folding stage. A useful initial assessment is to predict the structure from the generated sequence and compare the result with the designed structure.

Usage Tips

  • Input structures and file formats. The Proto implementation accepts both PDB and mmCIF structures and prepares an mmCIF input for RFD4-Proteina. The upstream implementation requires mmCIF because PDB files do not reliably preserve all of the chemical connectivity and formal-charge information required by the model. During normal input preparation, the Proto implementation also standardizes chain identifiers so selections refer to the expected chains. Setting input_as_annotated_cif=True bypasses this conversion and preserves the supplied mmCIF, including existing conditioning annotations. Use this option for annotated structures produced by previous RFD4 runs.
  • Residue numbering. RFD4-Proteina resolves residue selections using the mmCIF label_seq_id field rather than the author-provided auth_seq_id numbering. By default, Proto uses residue_numbering="auth" and translates selections into the numbering used by the prepared input. This is convenient when working from PDB files or structures whose displayed residue numbers differ from their internal indices. Set residue_numbering="label" when specifying label_seq_id values directly. Annotated mmCIF inputs are passed through without translation, and selections supplied through raw_conditions are likewise not modified. Check the numbering in the actual mmCIF whenever using either option.
  • Contig specification. The contig field defines which parts of an input structure are retained and where new residues may be generated. Its comma-separated syntax resembles that of RFdiffusion3: A42-48 retains an existing segment, 20-30 defines an expandable segment, and /0 separates output chains. RFD4 additionally supports named expandable segments such as E1:2-20, single-residue selections such as A52, and polymer-type suffixes such as 10R for an RNA segment. Preserved residues are selected using the original input’s label_seq_id values, and output chain assignment follows the upstream contig rules. A contig must include at least one preserved segment; fully de novo generation instead requires an appropriately prepared input structure, such as an annotated expandable-chain template. Older specification fields, including length, symmetry, unindex, and select_*, are not supported. Omitting contig retains the full input structure.
  • Combining conditions. Different conditioning types can interact. Fixing sidechain coordinates also constrains the corresponding sequence identity, while atomized components such as ligands and modified residues retain their chemical identities. Within a condition, overlapping selections are applied in order, with later entries taking precedence. Absolute and internal-coordinate conditioning cannot be applied simultaneously to the same atom. To move an atom from a fixed-coordinate region into a rigid_groups region, first release its absolute-coordinate constraint using free_coordinates. Ligands and modified residues should also have valid bond orders, including explicit Kekulized aromatic bonds rather than generic AROMATIC bonds.
  • Recycling and inference settings. recycle_strategy controls the number and distribution of recurrent model evaluations during generation. The available schedules combine a computational budget (low, medium, or high) with a distribution (flat, midpeak, or front_loaded). The midpeak schedules use 120, 150, or 180 trunk evaluations, while the flat and front_loaded schedules use 120, 180, or 300. The thinking_low, thinking_medium, and thinking_high aliases correspond to the front-loaded schedules. By default, thinking_medium performs 180 evaluations across 60 integration steps. All recycling presets require nsteps=60, and the implementation validates this combination before execution. Set recycle_strategy=None to disable the preset schedule and specify a different number of integration steps.
  • Choosing an inference budget. The released recycling presets are the recommended settings for design generation. Shorter runs without recycling can be useful for verifying that an input is valid and that the execution environment works, but they should not be assumed to produce comparable design quality. In local testing, a run with recycle_strategy=None and nsteps=20 produced a degenerate poly-alanine sequence. This observation does not establish that every shortened run will fail, but it provides a reason to avoid treating minimal test configurations as production settings. For less expensive generation using the supported schedules, start with a low preset.
  • Partial diffusion. Partial diffusion generates a modified design by beginning from an existing structure partway through the generative process. The implementation exposes two alternative controls. partial_trajectory_fraction_steps specifies the fraction of the trajectory to execute, while partial_t_backbone and partial_t_latent specify the starting levels of corruption for the corresponding modalities. The direction of these controls differs: a smaller trajectory fraction preserves more of the input, whereas larger values of the partial_t_* controls correspond to lower corruption. The two interfaces cannot be used together. When refining an earlier RFD4 design, input_as_annotated_cif=True preserves its existing conditioning information.
  • Sequence probabilities. sequence_probabilities allows individual residue identities to be encouraged, constrained, or excluded. For example, setting the probability of CYS to 0.0 explicitly excludes cysteine at the selected positions. Amino acid identities without specified probabilities remain unconstrained and share the remaining probability mass. The probabilities assigned to a residue cannot sum to more than 1.

RFD4-Proteina Inverse Folding (rfd4-inverse-folding)

Generates amino acid sequences and sidechain conformations for a specified protein backbone. The backbone is held fixed during design, while the model samples compatible sequence identities and sidechain geometries. Each replicate provides a candidate sequence together with its corresponding all-atom structure.

API Reference

Source
List[RFD4DesignSpec]
Independent design tasks, each with its own input structure and constraints. Processed in a single run.
string
Raw upstream condition-spec JSON for callers who need conditions without a typed field. When set, design_specs is ignored and the JSON is forwarded as-is, so input paths must already point at CIF files and residue ids must already be in label numbering.
Source
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
string
default:"cuda"
Execution device. rfd4-generate builds its Lightning trainer with accelerator="gpu" unconditionally, so a GPU is required.
integer
default:"3600"
Maximum execution time in seconds. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
integer
default:"1"
Designs generated per input spec.
integer
default:"1"
Designs denoised in parallel on the GPU. Confirm the longest input fits at 1 before raising it.
integer
default:"60"
Integration steps per design (upstream default 60). A recycle_strategy preset expands to exactly 60 steps and upstream requires the two to agree, so changing this requires recycle_strategy=None.
string
default:"thinking_medium"
Trunk recycling schedule as <low|medium|high>/<flat|midpeak|front_loaded>, trading compute for quality. midpeak totals 120/150/180 trunk passes; flat and front_loaded total 120/180/300. The thinking_* aliases are the front-loaded schedules. Setting any preset pins nsteps to 60. None disables the schedule and runs a fixed recycle depth of 0, which is the only way to use a custom nsteps.
RFD4SamplerTuning
Temperature for the backbone modality.
RFD4SamplerTuning
Temperature for the sidechain/sequence latent modality. Lowering tsr_k raises sequence diversity.
boolean
default:"False"
Switch both modalities to ODE integration, with no mid-trajectory noise injection.
string
default:"nvidia/RFD4-Proteina"
HuggingFace repo id or a local model-bundle directory. The denoiser and its matching autoencoder always load together.
string
default:"a06e2509c7033b010fc43614e9fd840303588502"
HuggingFace commit to pin, for reproducible loads. Ignored when model_checkpoint is a local directory.
string
Local PEFT/LoRA adapter directory, loaded onto the base and autoencoder pair it was fine-tuned against.
boolean
default:"False"
Compile the trunk across the upstream length buckets. Off by default: the first call otherwise pays a long compile across 15 buckets, which only pays off for large runs.
integer
default:"0"
Snapshot the trajectory every N steps. 0 disables. Rejected unless output_dir is set.
string
Directory for run outputs; None uses a tempdir. Each call writes into a fresh run-<id> subdirectory of it, so a reused output_dir cannot return a previous run’s designs, and the trajectory frames for a run land in that run’s own subdirectory.
Source
List[RFD4Designs]
One bundle per input spec, in input order. Total design count is at most len(design_specs) * num_replicates; a spec that produced nothing contributes an empty bundle.

Applications

Use rfd4-inverse-folding to design alternative sequences for an existing protein structure. Inputs may include experimentally determined structures, predicted structures, or backbones generated by tools such as rfd4-design and rfdiffusion3-design.The tool can also be used when sidechain packing is important, since it returns sidechain coordinates together with the designed sequence. It offers an alternative to proteinmpnn-sample, ligandmpnn-sample, and fampnn-sample, particularly for applications that benefit from joint modeling of sequence and all-atom geometry. As with other inverse-folding methods, the resulting sequences should be evaluated before making claims about stability, expression, or function.

Usage Tips

  • Sequence diversity. The sequence_sampling.tsr_k parameter controls the sharpness of sequence sampling. Larger values produce more concentrated sampling, while smaller values generally allow greater sequence diversity. The upstream default is 4.0; reducing this toward 2.0 can provide more varied candidates, although their predicted quality may differ. Generate multiple replicates when exploring alternative sequences for the same backbone.
  • Sequence and structural conditions. Inverse folding supports conditions defined in RFD4DesignSpec, including fixed amino acid identities through known_sequence, solvent-exposure constraints through burial, and residue exclusions through sequence_probabilities. Settings intended specifically for unconstrained or partially constrained structural generation, such as guidance_w and partial-diffusion controls, are exposed through rfd4-design rather than this tool.
  • Input structure completeness. Use a structure with well-resolved coordinates and appropriate chemical information. Missing atoms or incomplete sidechains may affect how the model interprets its fixed structural context. For example, local testing with a cropped PD-L1 target derived from PDB 5O45, containing 15 unresolved sidechain atoms across six residues, produced a Cα-only poly-alanine output. The same behavior was observed with the upstream command-line implementation. This particular structure is used as a binder-design target and should not be treated as a representative inverse-folding input. Inspect structural completeness and the resulting designs before interpreting their sequences.

Toolkit Notes

The general Proto guides for tool persistence, device management, parallel execution, and cloud inference apply to both rfd4-design and rfd4-inverse-folding.
  • Symmetry support. RFD4-Proteina does not currently support symmetry-conditioned generation. For the design of symmetric protein assemblies, use rfdiffusion3-design.
  • Hardware requirements. This toolkit requires a CUDA-enabled GPU. The upstream rfd4-generate implementation initializes its Lightning trainer with GPU acceleration, so selecting device="cpu" does not provide a CPU inference path. The environment setup also requires Linux x86_64, a CUDA-capable system, and an NVIDIA driver with a major version of at least 525.
  • Model weights and checkpoints. The default checkpoint is available from nvidia/RFD4-Proteina without an access request. Model files are downloaded automatically when needed. The denoising model and its corresponding autoencoder must be loaded as a compatible pair. model_revision can be used to select a specific Hugging Face revision for reproducibility. If adapter_path is provided, the adapter must be compatible with the selected base checkpoint and autoencoder.
  • Model persistence. Generation runs in-process rather than through the rfd4-generate command-line entry point, so a persistent worker loads the checkpoint once and reuses it. The first call in a worker pays the load; later calls do not. In local testing on an H200, three sequential designs took 37s, 13s, and 13s. Batch work therefore benefits from running inside ToolInstance.persist_tool("rfd4-design"). Changing model_checkpoint, model_revision, adapter_path, or use_torch_compile restarts the worker, since each of those is fixed at load time. Each worker is also pinned to its assigned GPU and is restarted rather than moved if the device changes.
  • GPU memory. Memory requirements depend on input size, sequence length, and batch_size. Test the longest intended design at batch_size=1 before increasing parallelism. If a run exceeds available GPU memory, reducing the batch size is generally the first adjustment to make.
  • Model compilation. use_torch_compile is disabled by default. When enabled, the implementation compiles the model for multiple sequence-length buckets, introducing substantial initial compilation overhead. Compilation may be worthwhile for repeated or large-scale inference, but offers less benefit for short runs.
  • Evaluating designs. RFD4 outputs do not include a calibrated confidence score indicating whether a design will fold or function as intended. Independent structure prediction, for example with boltz2-prediction or esmfold-prediction, can help assess consistency between the designed sequence and generated structure. Each RFD4Design includes a complex object suitable for downstream analysis. Use chain_sequence_map() or chain_sequences to access sequences across molecular entities. extract_protein_chains() returns only protein chains and therefore omits DNA and RNA chains.
  • Output organization. Results are grouped by input specification. designed_structures contains one RFD4Designs collection per specification, in the original input order. Each collection contains up to num_replicates designs. If a specification produces no designs, its collection remains empty rather than changing the position of subsequent results.
  • Reproducibility. Generation is stochastic, and seed can be used to control random sampling. Repeated inverse-folding runs with the same seed produced identical sequences and structures in local tests. Exact reproducibility is not guaranteed across different hardware or software environments. deterministic_sampling=True changes both modalities to ODE integration, avoiding additional noise injection during the trajectory, but does not guarantee bitwise reproducibility in every environment. For most design applications, evaluating several independent candidates is preferable to relying on a single output.
  • Features not exposed by this toolkit. The current implementation does not expose upstream reward-guided beam search, rfd4-evaluate, antibody or VHH-specific workflows, or the Diffusers interface. Reward-guided search requires additional configuration and, for some scoring functions, external structure-prediction runtimes. The toolkit also does not expose a separate folding mode. In the upstream implementation, sequence-conditioned structure generation can be expressed through sequence conditioning, which is available through known_sequence.
  • Metrics and output filtering. The implementation disables tagged upstream metrics through metrics_tags=[], preventing the configured AlphaFold2, AlphaFold3, and OpenFold3 refolding oracles from running. Untagged metrics, including the upstream unknown_residue_filter, may still be evaluated and recorded in output metadata. The implementation also sets delete_failing_pre_oracle=False so designs are not silently removed by that preliminary filter. These metadata should not be interpreted as independent structural validation.
  • Third-party licensing. The upstream RFD4-Proteina distribution includes optional integrations and container environments for external structure-prediction systems. These components may be subject to licenses and usage conditions that differ from those of RFD4-Proteina itself, including restrictions on particular model weights. The Proto toolkit described here does not invoke these external refolding oracles. Users who enable them independently should review the applicable licenses and distribution terms.
Example notebook: See the full working example for a copy-paste-ready walkthrough.

Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

Tool Persistence

Keep a tool’s model warm across calls instead of reloading it every invocation.

Device Management

How GPUs are allocated to tools and how to target specific devices.

Parallel Execution

Fan a batch of inputs out across multiple GPUs.