Skip to content

RF Diffusion Contigmap Config

Builds a structured contigmap configuration for RF Diffusion. It accepts masking and length specifications and returns a validated JSON dict ready to plug into the RF Diffusion node. All fields are strings that are parsed into structured ranges; invalid formats will be rejected.

Usage

Use this node to define which sequence/structure regions should be masked or preserved, and to specify overall design length constraints. Connect its output to the 'contigmap_config' input of the RF Diffusion node. For unconditional generation, only 'length' should be set; for conditional or inpainting workflows, use the other fields to target specific regions.

Inputs

FieldRequiredTypeDescriptionExample
inpaint_seqTrueSTRINGRegions whose sequence should be masked for inpainting. Uses the same segment syntax as contigs (supports chain IDs, fixed ranges, gaps).A10-25/5-10/A40-55
inpaint_strTrueSTRINGResidue index ranges (optionally with chain IDs) whose 3D structure should be masked for inpainting.B165-178
inpaint_str_helixTrueSTRINGInclusive index ranges to mask helix secondary structure. Multiple ranges allowed, comma-separated.10-20,30-40
inpaint_str_strandTrueSTRINGInclusive index ranges to mask beta strand secondary structure. Multiple ranges allowed, comma-separated.50-60,70-80
inpaint_str_loopTrueSTRINGInclusive index ranges to mask loop secondary structure. Multiple ranges allowed, comma-separated.25-29,65-69
provide_seqTrueSTRINGInclusive sequence ranges to unmask (i.e., provide/fix) during design. Multiple ranges allowed, comma-separated.172-177,200-205
lengthTrueSTRINGTarget sequence length as a single integer or a range. Used for unconditional or general length constraints.100-150

Outputs

FieldTypeDescriptionExample
contigmap_configJSONA validated configuration dict for contigmap-related parameters to pass into RF Diffusion.{'inpaint_seq': [['A10-25'], ['5-10'], ['A40-55']], 'inpaint_str': [['B165-178']], 'inpaint_str_helix': [['10-20'], ['30-40']], 'inpaint_str_strand': [['50-60'], ['70-80']], 'inpaint_str_loop': [['25-29'], ['65-69']], 'provide_seq': [['172-177'], ['200-205']], 'length': ['100-150']}

Important Notes

  • Input formats matter: All fields are parsed; use inclusive ranges like 10-20 and optional chain IDs like A10-25. Separate multiple ranges with commas; separate segments with '/' where applicable.
  • Unconditional generation constraint: When using this with unconditional RF Diffusion, only 'length' should be set. Any non-empty values in other fields will cause the RF Diffusion node to error.
  • Secondary structure masks: The helix/strand/loop masking fields are supported by newer RF Diffusion updates; ensure your backend supports them.
  • Empty fields: Leaving a field empty means 'no constraint' for that parameter; it will be passed as null/absent in the resulting configuration.

Troubleshooting

  • Invalid format error: If you see a validation error, check for typos in ranges (use N-M), ensure chain IDs precede ranges (e.g., A10-25), and use commas for multiple ranges.
  • Unconditional mode rejections: If RF Diffusion reports that certain keys must be empty in unconditional mode, clear 'inpaint_seq', 'inpaint_str*', and 'provide_seq', leaving only 'length'.
  • No effect from masks: Verify your indices and chain IDs match the input structure used by RF Diffusion; mismatched numbering or chain labels will result in masks not applying.