﻿# ProteinMPNN fixed positions need a chain-local residue map

Keep ProteinMPNN designed chains, fixed-position dictionaries, parsed sequence indices, and exported design sequences consistent across structure preprocessing.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-proteinmpnn-fixed-residue-chain-local-index/
Language: en

## A fixed site can point at the wrong residue

A sequence-design job may ask ProteinMPNN to redesign a chain while preserving a small structural motif. The constraint is meaningful only if the biological residue identities remain connected to the positions used by the parsed model input. Structure-file numbering, insertion codes, and array offsets are different coordinate systems.

The [ProteinMPNN repository](https://github.com/dauparas/ProteinMPNN) supplies workflows for choosing designed chains and fixed positions. Treat the generated constraint files as model input artifacts, not incidental command-line decoration.

## Chain selection and fixed positions are separate

Selecting a designed chain defines where redesign may occur at a broad level. A fixed-position dictionary then restricts positions within the relevant parsed chain. Preserving an entire contextual chain is a different constraint from preserving selected sites on a redesigned chain.

Document both decisions. If a structure parser renames or filters chains, update the mapping before producing constraints. A dictionary with valid JSON syntax can still refer to a chain absent from the actual input.

## Read the helper indexing convention

The [fixed-position helper](https://raw.githubusercontent.com/dauparas/ProteinMPNN/main/helper_scripts/make_fixed_positions_dict.py) constructs position lists within parsed chain sequences and supports specifying the complementary set of non-fixed positions. Switching that mode changes the meaning of the supplied list.

Maintain an explicit table from original residue identifiers to parsed-chain positions. Do not assume that an author-provided structure residue number can be copied unchanged into the helper. Gaps or preprocessing decisions can invalidate that assumption while leaving the number in range.

## Follow constraints into the runner

The [inference runner](https://raw.githubusercontent.com/dauparas/ProteinMPNN/main/protein_mpnn_run.py) loads chain and position metadata alongside model configuration. Preserve the exact parsed structure, constraint dictionaries, checkpoint, and sampling settings together.

The [artifact validation guide](/journal/safetensors-artifact-validation/) provides a general model for recording related artifacts rather than identifying a computation only by weight filename. Here the sidecar constraints directly change the permitted design domain.

## Verify preservation on exported sequences

After generation, map each fixed site back to the original biological identifier and check its amino acid. Inspect redesigned sites separately so a fully unchanged sequence does not accidentally satisfy only the preservation check.

Use the [benchmark method](/journal/inference-benchmark-method/) after validating that constraint interpretation. A computationally valid design remains a research candidate; preserving designated residues and obtaining a model score do not establish experimental stability or function of the resulting protein.
