You may deploy OpenFold3-preview from Amazon SageMaker JumpStart. The OpenFold Consortium and the AlQuraishi Lab at Columbia College developed OpenFold3 as an open supply biomolecular construction prediction mannequin. With a number of strains of code, you’ll be able to sometimes deploy OpenFold3 into your personal AWS account. You may then predict the 3D constructions of proteins, DNA, RNA, small-molecule ligands, and the complexes they type. The endpoint runs with community isolation, which you should utilize to assist hold your sequences inside your AWS account.
Computational drug discovery groups now use construction prediction as a core a part of their work. Groups use it in goal identification, antibody and protein engineering, and structure-based digital screening. Groups have discovered operating these fashions difficult. You want GPU infrastructure, a working CUDA and PyTorch stack, massive mannequin checkpoints, and a serving layer that handles requests that take minutes slightly than milliseconds. SageMaker JumpStart can deal with a lot of that be just right for you. OpenFold3 runs in an AWS-maintained container on a managed Amazon SageMaker AI endpoint. The endpoint is designed to deal with request queuing and GPU warmup, and you’ll add autoscaling.
On this put up, we present you methods to:
- Deploy OpenFold3-preview on a SageMaker asynchronous inference endpoint.
- Submit construction prediction jobs and interpret the outcomes, together with predicted constructions and confidence scores.
- Run a number of predictions in parallel on multi-GPU cases.
- Provide your personal a number of sequence alignments (MSAs) to enhance prediction accuracy whereas serving to hold your sequences personal.
- Assist scale back prices by scaling your endpoint to zero when it’s idle.
Overview of OpenFold3
OpenFold3 is an all-atom construction prediction mannequin. It predicts the joint 3D construction of a set of molecules from their sequences. It isn’t restricted to single protein chains: It may fold multi-chain protein complexes, protein–nucleic acid assemblies, and protein–ligand complexes in a single prediction.
| Attribute | Particulars |
| Developer | OpenFold Consortium / AlQuraishi Lab, Columbia College |
| Mannequin kind | All-atom biomolecular construction prediction |
| Inputs | Protein, DNA, and RNA sequences. Small-molecule ligands as SMILES |
| Outputs | Predicted constructions in mmCIF format, with confidence metrics (pLDDT, PAE, PDE) |
| Model | OpenFold3 0.4.1, of3-p2-155k checkpoint |
| License | Apache 2.0 |
| JumpStart mannequin ID | huggingface-proteinfolding-openfold3 |
| Supported cases | ml.g6.2xlarge, ml.g6.4xlarge (default), ml.g6.12xlarge |
The OpenFold3 builders launch its code and mannequin weights beneath the Apache 2.0 license, they usually publish the coaching knowledge and strategies. Analysis organizations and pharmaceutical firms can examine the mannequin, fine-tune it, and construct on it beneath the phrases of that license. The builders describe OpenFold3-preview as a analysis preview.
Use circumstances
- Goal and sophisticated construction prediction – Predict constructions for targets that don’t have any experimental construction, together with multi-chain assemblies and protein–nucleic acid complexes.
- Protein–ligand co-folding – Fold a protein along with a small molecule equipped as SMILES to generate binding-pose hypotheses for structure-based design.
- Antibody and protein engineering – Consider designed variants by predicting their constructions and evaluating confidence throughout candidates.
- Excessive-throughput screening pipelines – Queue massive batches of prediction jobs in opposition to an autoscaling endpoint and course of the outcomes straight from Amazon Easy Storage Service (Amazon S3).
Why OpenFold3 makes use of asynchronous inference
Most JumpStart fashions, akin to massive language fashions and embedding fashions, deploy to real-time endpoints. An actual-time endpoint returns its response inside a single request, and that request is capped at 60 seconds. Construction prediction works in a different way. Folding time grows with the quantity and size of the chains in a question, and real-world proteins and complexes usually take a number of minutes.
For that reason, OpenFold3 on JumpStart runs on SageMaker Asynchronous Inference:
- You add the request to Amazon S3 and name
InvokeEndpointAsync, which returns instantly. - The endpoint queues the request and processes it, with an invocation timeout of as much as 1 hour.
- The endpoint writes the consequence, or the error particulars, to an S3 location you select. You may ballot for it or get a notification by way of Amazon Easy Notification Service (Amazon SNS).
Two properties of asynchronous endpoints swimsuit scientific workloads particularly properly. First, they queue bursts of requests internally, so you’ll be able to submit a big batch of sequences with out constructing your personal job queue. Second, they will scale to zero cases when the queue is empty, which helps you keep away from paying for idle cases between experiments.
Conditions
To observe this walkthrough, you want:
- An AWS account, and a SageMaker AI execution position for the endpoint. Following least privilege, this AWS Identification and Entry Administration (IAM) position wants learn and write entry solely to the S3 prefix that you simply use for requests and outcomes. For extra info, see Learn how to use SageMaker AI execution roles.
- IAM permissions for the identification that runs the code: to create, describe, invoke, and delete the mannequin, endpoint configuration, and endpoint, plus
iam:PassRolefor the execution position. For the elective scale-to-zero part, it additionally wants AWS Software Auto Scaling and Amazon CloudWatch alarm permissions. In manufacturing, scope these permissions to your assets slightly than utilizing broad managed insurance policies akin toAmazonSageMakerFullAccess. For extra info, see Full the conditions for asynchronous inference. - Entry to Amazon SageMaker Studio, a SageMaker pocket book occasion, or a neighborhood IDE.
- The SageMaker Python SDK v3 and py3Dmol, which you’ll set up with
pip set up "sagemaker>=3,<4" py3Dmol. - Service quota for a minimum of one
ml.g6.4xlargeendpoint occasion in your AWS Area. You additionally want quota forml.g6.12xlargein case you observe the multi-GPU part. You may examine your quotas and request will increase within the Service Quotas console beneath Amazon SageMaker.
Necessary: SageMaker endpoints are billed per instance-hour whereas they’re operating, together with whereas they’re idle. To keep away from sudden fees, observe the Clear up part, or configure scale-to-zero as described later on this put up. For pricing particulars, see Amazon SageMaker AI pricing.
Uncover OpenFold3 in SageMaker JumpStart
- Open SageMaker Studio and select JumpStart within the navigation pane.
- Seek for OpenFold3.
- Open the mannequin card to assessment the mannequin description, license, and supported occasion sorts.
- Open the instance pocket book from the mannequin card. It accommodates the whole asynchronous deployment walkthrough proven on this put up.
Deploy OpenFold3 with the SageMaker Python SDK
First, construct the mannequin from its JumpStart configuration and outline an AsyncInferenceConfig. The output and failure paths are the S3 areas the place the endpoint writes outcomes and error particulars.
Setting accept_eula=True confirms that you simply’ve reviewed and accepted the mannequin’s license phrases, which is required to deploy this mannequin. When you run this code exterior SageMaker Studio, additionally move your SageMaker execution position to ModelBuilder.from_jumpstart_config with role_arn=".
The endpoint shops your requests and leads to Amazon S3, they usually include your sequences and predicted constructions. For proprietary sequences, think about using a devoted S3 bucket or prefix with server-side encryption utilizing an AWS Key Administration Service (AWS KMS) key that you simply handle. To encrypt outcomes together with your key, move its ARN to AsyncInferenceConfig as kms_key_id. Limit entry with a bucket coverage that permits solely the roles that run this workflow, and add an S3 Lifecycle rule to run out request and consequence objects that you simply don’t must hold. For extra info, see Safety greatest practices for Amazon S3.
Deployment sometimes completes inside minutes. This features a warmup step by which the container runs a brief prediction on every GPU, in order that the GPUs are warmed up when the endpoint reaches InService.
Tip: G6 capability might be restricted in some Areas. If a deployment fails with
InsufficientInstanceCapacity, retry later, select a distinct supported occasion dimension, or deploy in one other AWS Area the place the mannequin is on the market.
Run a construction prediction
A request is a JSON doc with a number of named queries, and every question lists its chains. All chains in a question are folded collectively as one complicated. Separate queries are folded independently.
Every chain has these fields:
molecule_type–protein,dna,rna, orligand.chain_ids– a listing of chain identifiers, akin to["A"]. To specify an identical copies, akin to a homodimer, use["A", "B"].sequence– the residue sequence, for protein, DNA, and RNA chains.smiles– a SMILES string, used for ligand chains as a substitute ofsequence.
The next instance folds human ubiquitin, a well-characterized 76-residue protein:
Then ballot S3 for both the consequence or a failure report:
A request with invalid enter, akin to a malformed chain or an unsupported MSA identify, nonetheless produces a consequence object, however with "standing": "error" and an error message as a substitute of constructions. The final examine surfaces that message.
Prediction time grows with the scale of the enter. In our checks on ml.g6.4xlarge, smaller proteins accomplished extra shortly than bigger proteins.
Interpret the outcomes
The response accommodates a standing, a listing of predicted constructions in mmCIF format, and their matching confidences. By default, OpenFold3 generates 5 diffusion samples per question, so every question returns 5 candidate constructions. Every pattern comes with two confidence information: an in depth one (*_confidences.json) and a abstract (*_confidences_aggregated.json). The abstract features a sample_ranking_score that you should utilize to choose the perfect pattern.
You may open the .cif information in any construction viewer, akin to PyMOL, ChimeraX, or Mol*. To view a construction inline in a pocket book, use py3Dmol:
Determine 1: OpenFold3’s predicted construction of ubiquitin, rendered with the previous code and coloured by per-atom confidence (pLDDT). All figures on this put up have been rendered with 3Dmol.js (Rego and Koes, Bioinformatics, 2015).
The prediction reveals ubiquitin’s compact fold: a blended beta-sheet packed in opposition to a single alpha-helix. A lot of the construction is blue (excessive confidence). Solely the versatile C-terminal tail, on the high of the picture, shifts towards yellow and purple, which matches the tail’s identified flexibility in experimental constructions.
The arrogance metrics let you know how a lot to belief every prediction:
- pLDDT (predicted native distance distinction check) – Per-atom confidence within the native construction, on a scale of 0–100. Increased is best, and values above about 70 typically point out a dependable native construction. The abstract file experiences the common as
avg_plddt. - pTM and ipTM (predicted TM-score and interface pTM) – General confidence within the fold, and in how chains and ligands are positioned relative to one another, on a scale of 0–1. For complexes, ipTM is the important thing quantity. The abstract file additionally experiences
chain_pair_iptmfor every pair of chains. - PAE (predicted aligned error) and PDE (predicted distance error) – Per-residue-pair error estimates, within the detailed confidence file. Use them to guage the relative placement of domains and chains.
Fold a posh
To foretell a posh, record a number of chains in the identical question. The next instance co-folds human carbonic anhydrase II with its catalytic zinc ion and the drug acetazolamide. This can be a well-studied complicated with experimental constructions within the Protein Information Financial institution (for instance, PDB 3HS4):
Protein sequences in these examples are from UniProt (P0CG48, P00918). You submit and browse this request the identical method because the ubiquitin instance. For complexes like this one, prediction high quality relies upon closely on offering an MSA, as the following sections present.
Run predictions in parallel on multi-GPU cases
A single OpenFold3 prediction runs on one GPU, so a multi-GPU occasion doesn’t make a person prediction sooner. As a substitute, you’ll be able to run a number of predictions directly. On a multi-GPU occasion akin to ml.g6.12xlarge, which has 4 GPUs, the container assigns every concurrent request its personal GPU. To make use of all of the GPUs, set max_concurrent_invocations_per_instance to the variety of GPUs on the occasion (4, for ml.g6.12xlarge):
This creates a second endpoint, so keep in mind to delete it as properly once you’re completed (see Clear up).
In our checks, 4 concurrent predictions every ran on a separate GPU, with throughput features that grew with protein dimension. For bigger proteins, the associated fee per prediction that we measured on ml.g6.12xlarge, primarily based on On-Demand occasion pricing, was near that of ml.g6.4xlarge. Your outcomes rely in your inputs and Area. For pricing, see Amazon SageMaker AI pricing.
Word:
ml.g6.12xlargecapability might be restricted. If it isn’t accessible in your Area, you’ll be able to enhance throughput by scaling out throughout a number ofml.g6.4xlargecases with the autoscaling configuration described later on this put up.
Use the next desk to decide on an occasion:
| Workload | Really helpful occasion | Why |
| Interactive exploration by a single person | ml.g6.2xlarge or ml.g6.4xlarge |
One GPU handles one prediction at a time on the lowest hourly price of the supported cases |
| Staff use or bursts of concurrent requests | ml.g6.12xlarge with max_concurrent_invocations_per_instance=4 |
4 predictions run in parallel as a substitute of queuing |
| Excessive-throughput screening | ml.g6.12xlarge with autoscaling |
Highest throughput per occasion of the supported cases. Scales out with queue depth and again to zero |
Enhance prediction accuracy with your personal MSAs
OpenFold3 can take a a number of sequence alignment (MSA) as an extra enter for every protein chain. An MSA is a set of evolutionarily associated sequences aligned to your question. Co-variation throughout these sequences alerts which residues are more likely to keep up a correspondence, so MSAs can considerably enhance accuracy for a lot of proteins and complexes.
To assist hold your sequences inside your AWS account, the JumpStart endpoint runs with community isolation and doesn’t name exterior MSA servers. As a substitute, it accepts precomputed MSAs within the request. You generate alignments with the pipeline and sequence databases you already use, on infrastructure you management, and move them to the endpoint. This design will help drug discovery packages that must hold proprietary sequences personal.
When you don’t provide an MSA, the endpoint predicts from the sequence alone. That may work properly for small, well-characterized proteins akin to ubiquitin. For many real-world targets and complexes, embrace an MSA. The remainder of this part reveals how, and the way a lot it improves outcomes.
Convey your personal MSA
Every protein chain accepts a precomputed_msa discipline: a listing of alignments, every with a identify and the alignment content material in A3M or Stockholm format. For a single merged alignment, such because the output of a ColabFold MMseqs2 search, use the identify colabfold_main:
This instance has one protein chain. If a question has a number of totally different protein chains, compute an MSA for each and connect it to that chain’s precomputed_msa discipline. An identical copies listed collectively beneath one chain_ids entry, akin to a homodimer, share a single MSA.
The endpoint additionally accepts different alignment names, akin to uniref90_hits, mgnify_hits, and bfd_uniclust_hits, in case you generate MSAs with a distinct pipeline. As a result of the request is staged in S3, you’ll be able to ship massive alignments. In our checks, alignments of a number of megabytes labored.
You may generate MSAs with instruments akin to ColabFold (MMseqs2) or HHblits or JackHMMER. To assist hold proprietary sequences inside your surroundings, run the search by yourself AWS infrastructure in opposition to domestically hosted sequence databases, slightly than sending sequences to a public server. For instance, ColabFold’s colabfold_batch command makes use of the general public ColabFold MSA server by default, so for proprietary sequences, use colabfold_search with domestically hosted databases as a substitute.
How a lot distinction does an MSA make?
We folded the carbonic anhydrase II, zinc, and acetazolamide complicated from the earlier part twice on the identical endpoint: as soon as in single-sequence mode, and as soon as with an MSA from a ColabFold MMseqs2 search.
| Metric (first of 5 samples) | With out MSA | With MSA |
| Common pLDDT | 30 | 98 |
| pTM | 0.22 | 0.98 |
| ipTM | 0.49 | 0.98 |
| Zinc–His94/His96/His119 distance | 2.3–9.4 Å | 2.0 Å every |
| Acetazolamide nitrogen–zinc distance | 5.6 Å | 2.0 Å |
| Prediction time | ~1.5 minutes | ~1.5 minutes |
With the MSA, OpenFold3 recovers the identified binding mode. The zinc ion is coordinated by the three active-site histidines, and the acetazolamide sulfonamide nitrogen binds on to the zinc, matching the experimental construction. With out the MSA, the protein fold has low confidence and the binding web site isn’t shaped. Including the MSA didn’t noticeably change prediction time.
Determine 2: The identical carbonic anhydrase II, zinc, and acetazolamide question folded with out an MSA (left) and with an MSA (proper). Every prediction is coloured by pLDDT and superimposed on the experimental crystal construction (grey, PDB 3HS4; Sippel et al., 2009).
Superimposed on the crystal construction, the MSA-based prediction matches it carefully: the protein spine deviates by 0.2 Å (Cα RMSD), the zinc ion by lower than 0.1 Å, and the acetazolamide heavy atoms by 0.4 Å RMSD. The one-sequence prediction is misfolded, with a Cα RMSD of twenty-two Å.
Determine 3: Shut-up of the binding web site within the MSA-based prediction. The anticipated zinc ion (purple) is coordinated by His94, His96, and His119 and by the sulfonamide nitrogen of acetazolamide (inexperienced). The crystal pose (grey) is sort of fully hidden behind the prediction.
Carbonic anhydrase II with acetazolamide is among the most extensively studied complexes within the Protein Information Financial institution, and carefully associated constructions are probably a part of OpenFold3’s coaching knowledge. Deal with this instance as an indication of the workflow and of how a lot an MSA issues, not as a benchmark of accuracy on novel targets.
Whenever you evaluate OpenFold3 outcomes in opposition to different instruments or revealed benchmarks, evaluate like with like: single-sequence outcomes with single-sequence outcomes, and MSA-based outcomes with MSA-based outcomes.
Assist scale back price: Scale to zero when idle
Asynchronous endpoints can scale right down to zero cases when no requests are queued, and cut back up when new requests arrive. This sample fits construction prediction work, which frequently runs in bursts.
Goal monitoring scales the endpoint right down to zero after the queue has been empty for some time. In our checks, that took about 15–20 minutes. Nevertheless, goal monitoring doesn’t scale the endpoint again up from zero. To begin an occasion when a request arrives and no cases are operating, add a step-scaling coverage that’s triggered by the HasBacklogWithoutCapacity metric:
When a request arrives at an endpoint with zero cases, it waits within the queue whereas an occasion begins. The primary request after scaling from zero will take longer to finish because it contains time for the alarm to set off, the occasion to begin, plus the prediction itself. Later requests in the identical burst run at regular velocity. This trade-off can work properly for batch workloads. For interactive use, set MinCapacity=1 to maintain one occasion heat. For extra particulars, see Autoscale an asynchronous endpoint.
Clear up
To cease incurring fees, delete the assets you created once you’re completed. When you configured autoscaling, take away it first: delete the Amazon CloudWatch alarm, then deregister the scalable goal. Then delete every endpoint, its endpoint configuration, and its mannequin, together with the multi-GPU endpoint in case you deployed it:
When you now not want the request and consequence objects, you may also delete them from s3://.
Conclusion
With OpenFold3 on SageMaker JumpStart, analysis and drug discovery groups can deploy an open, inspectable construction prediction mannequin into their very own AWS account with a number of strains of code. Asynchronous inference handles long-running folds and bursty batch workloads, and multi-GPU cases run predictions in parallel. Community isolation helps you retain proprietary sequences personal, and since you’ll be able to deliver your personal MSAs, you’ll be able to profit from MSAs with out sending sequences to an exterior server. With scale-to-zero, you cease paying for endpoint cases after the queue has been empty lengthy sufficient for the endpoint to scale in. Different fees, akin to for Amazon S3 storage, nonetheless apply.
The code on this put up is pattern code for experimentation. Earlier than you employ it with proprietary or regulated knowledge, work together with your safety and authorized groups to fulfill your group’s safety, regulatory, and compliance necessities.
To get began, seek for OpenFold3 in SageMaker JumpStart, or open the instance pocket book from the mannequin card. To study extra concerning the options used on this put up, see Asynchronous inference and Autoscale an asynchronous endpoint. To debate your structural biology workloads, contact your AWS account staff.
In regards to the authors

