
This toolkit is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.
| Function | Description | |
|---|---|---|
run_fampnn_pack() | Pack protein sidechains using FAMPNN with per-atom confidence (pSCE) (GPU) | Docs Source |
run_fampnn_sample() | Design protein sequences with full-atom sidechain co-generation using FAMPNN (GPU) | Docs Source |
run_fampnn_score() | Score protein mutations with full-atom context using FAMPNN (GPU) | Docs Source |
run_fampnn_score_all_mutations() | Score every possible single mutation at every position using FAMPNN (GPU) | Docs Source |
Background
FAMPNN (Widatalla et al., 2025) solves the full-atom inverse-folding problem: given a fixed protein backbone, it predicts both an amino-acid sequence that folds into it and the sidechain conformation of every residue. Most fixed-backbone designers reason about sidechain interactions only implicitly, through backbone geometry and sequence labels, even though the three-dimensional arrangement of sidechain atoms drives protein conformation, stability, and function. Internally, FAMPNN learns a per-residue joint distribution over the discrete amino-acid identity and the continuous sidechain conformation, trained with a combined categorical cross-entropy and diffusion objective. Sequences are generated by iterative unmasking, starting from a fully masked state and revealing residues over several steps, and the sidechain atoms are produced by a per-token Euclidean diffusion process in each residue’s local backbone frame. A confidence module predicts the per-atom sidechain error (pSCE) in angstroms, which correlates with true packing error both per atom and, averaged over a residue, per residue. Learning sequence and sidechains jointly is synergistic, improving both native-sequence recovery and sidechain packing relative to modeling the sequence alone. The reference implementation is maintained at richardshuai/fampnn and was developed at Stanford University.Tools
FAMPNN Sampling (fampnn-sample)
Designs a sequence for a backbone and co-generates its full-atom sidechains. Each input structure is returned as a designed structure with packed sidechain coordinates and a per-residue pSCE.API Reference
Input: FAMPNNSampleInput
Input: FAMPNNSampleInput
chains_to_redesign / fixed_positions / fixed_sidechain_positions selections.Config: FAMPNNSampleConfig
Config: FAMPNNSampleConfig
True is coerced to 1 and False to 0.None waits indefinitely.Output: FAMPNNSampleOutput
Output: FAMPNNSampleOutput
FAMPNNDesignSet per input structure, in input order.Applications
Use this to redesign or stabilize a protein when sidechain packing matters, for example interface or active-site redesign, since the model commits to a concrete sidechain arrangement rather than leaving it implicit. The pSCE flags residues whose packing the model is unsure about.Usage Tips
psce_threshold(default0.3) controls which generated sidechains the model conditions on. FAMPNN designs by iterative unmasking, and at each step only sidechains whose predicted error (pSCE, in angstroms) falls below this threshold are kept as context for decoding the remaining residues. Sidechains the model is less certain about (pSCE at or above the threshold) are not used as context, so low-confidence placements do not bias later predictions. Lower it to condition only on the most confident sidechains. Raise it to let more, lower-confidence sidechains inform the design.fixed_positionsandfixed_sidechain_positionsare different knobs.fixed_positionsholds a residue’s amino-acid identity, whilefixed_sidechain_positionsinstead conditions on its existing sidechain coordinates. Both are per chain and indexed from 1 to match biological residue selection conventions.seq_only(defaultFalse) skips sidechain co-generation. Setting itTrueis faster but gives up the full-atom modeling that distinguishes FAMPNN, so leave it off unless you only need a sequence.- Output is structured per design.
output.design_sets[i].complexes[j]is aFAMPNNDesignwith.chains, the full-atom.structure, and.metrics["avg_psce"].FAMPNNDesignsare aComplexsubclass and can be passed directly to structure predictors.
FAMPNN Sidechain Packing (fampnn-pack)
Places sidechain atoms onto a structure whose sequence is fixed, returning the packed structure with per-atom pSCE confidence.API Reference
Input: FAMPNNPackInput
Input: FAMPNNPackInput
Config: FAMPNNPackConfig
Config: FAMPNNPackConfig
True is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: FAMPNNPackingResult
Output: FAMPNNPackingResult
Applications
Use this to build or rebuild sidechains for a known sequence and backbone, for example after backbone-only design or to repair incomplete models before docking or molecular dynamics.Usage Tips
- pSCE tells you which sidechains to trust. It is the predicted per-atom sidechain error in angstroms, so high-pSCE residues are the ones to inspect or rebuild.
- Lower
batch_sizeif you run out of GPU memory. It defaults to16samples per forward pass; reduce it for large structures.
FAMPNN Mutation Scoring (fampnn-score)
Scores specified mutations on a structure with full-atom context, returning a likelihood-based score per mutation.API Reference
Input: FAMPNNScoreInput
Input: FAMPNNScoreInput
Config: FAMPNNScoreConfig
Config: FAMPNNScoreConfig
True is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: FAMPNNScoreOutput
Output: FAMPNNScoreOutput
Applications
Use this to estimate the effect of specific point or multi-site mutations, for example triaging a designed variant list or interpreting a mutational scan, with sidechain context rather than backbone alone.Usage Tips
- Mutation strings are 1-indexed and colon-joined. Use
A1Vfor a single mutation andA1V:G5Lfor a multi-site variant. The position is counted from 1. seq_only(defaultFalse) removes sidechain context. Leaving it off scores with full-atom context, which is the point of FAMPNN; set itTrueonly for a faster, weaker backbone-style score.
FAMPNN Score All Mutations (fampnn-score-all-mutations)
Scores every possible single substitution at every position of a structure, returning a position-by-residue map of log-likelihood-ratio scores.API Reference
Input: FAMPNNScoreAllMutationsInput
Input: FAMPNNScoreAllMutationsInput
Config: FAMPNNScoreAllMutationsConfig
Config: FAMPNNScoreAllMutationsConfig
True is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: FAMPNNScoreAllMutationsOutput
Output: FAMPNNScoreAllMutationsOutput
Applications
Use this for a full in-silico deep mutational scan, to find stabilizing or tolerated substitutions across a protein without enumerating mutations by hand.Usage Tips
- Lower
batch_sizeif you run out of GPU memory. It defaults to scoring16positions per forward pass, which dominates memory for large proteins. - Scores are log-likelihood ratios relative to the native residue. Positive values mean the substitution is favored over the wild-type residue under the model, so rank candidates by score rather than reading absolute values.
Toolkit Notes
These apply to every FAMPNN tool in this toolkit (fampnn-sample, fampnn-pack, fampnn-score, fampnn-score-all-mutations).
- Requires a GPU. The diffusion-based sidechain model is not practical on CPU.
- Each tool already defaults
model_variantto the right checkpoint.0.3for design (fampnn-sample),0.0for packing (fampnn-pack), and0.3_cathfor scoring (fampnn-score,fampnn-score-all-mutations). Each checkpoint is trained and calibrated for its own task, so reusing one across tasks degrades results.