Boltz Constraint Builder¶
Creates constraint objects for Boltz YAML configurations. Supports three constraint types—bond, pocket, and contact—and allows batching multiple constraints in one node by providing semicolon-separated entries. Outputs a list of constraint mappings ready to be combined into a full Boltz YAML.

Usage¶
Use this node to define structural constraints for your Boltz runs. Choose a constraint type and provide the corresponding atom or residue specifications. For multiple constraints of the same type, provide matching semicolon-separated lists. Connect the resulting output to a list combiner or directly into a Boltz YAML combiner node alongside sequences and templates.
Inputs¶
| Field | Required | Type | Description | Example | 
|---|---|---|---|---|
| constraint_type | True | CHOICE | Type of constraint to generate. Select one of: bond, pocket, or contact. | |
| bond_atom1 | False | STRING | For bond constraints: semicolon-separated list of the first atoms. Format per entry: chain_id,residue_idx,atom_name. | A,15,N;A,25,CA | 
| bond_atom2 | False | STRING | For bond constraints: semicolon-separated list of the second atoms. Must have the same number of entries as bond_atom1. Format per entry: chain_id,residue_idx,atom_name. | B,40,C;B,50,CB | 
| pocket_binder | False | STRING | For pocket constraints: chain ID of the binder (typically the ligand chain). | L | 
| pocket_contacts | False | STRING | For pocket constraints: semicolon-separated list of residue contacts on the receptor. Format per entry: chain_id,residue_idx. | A,120;A,121;B,45 | 
| contact_token1 | False | STRING | For contact constraints: semicolon-separated list of first residues. Format per entry: chain_id,residue_idx. | A,10;A,20;B,30 | 
| contact_token2 | False | STRING | For contact constraints: semicolon-separated list of second residues. Must have the same number of entries as contact_token1. Format per entry: chain_id,residue_idx. | B,20;C,30;D,40 | 
| max_distance | False | FLOAT | Optional maximum distance in Angstroms for pocket/contact constraints. A value of 0 means no distance limit is applied. | 8.0 | 
| force | False | BOOLEAN | If true, adds a potential to enforce the constraint during sampling. | True | 
Outputs¶
| Field | Type | Description | Example | 
|---|---|---|---|
| constraints | * | A list of constraint objects matching the selected type. Each object is structured for direct inclusion under the constraints section of a Boltz YAML. | [{'pocket': {'binder': 'L', 'contacts': [['A', 120], ['A', 121], ['B', 45]], 'max_distance': 8.0, 'force': True}}] | 
Important Notes¶
- Semicolon-separated entries: For multiple constraints in one field, separate entries with semicolons. Each entry must follow the exact format indicated.
- Matching list lengths: For bond and contact constraints, the two lists (atom1/atom2 or token1/token2) must have the same number of entries.
- Distance handling: max_distance only applies if greater than 0; 0 disables distance limiting.
- Force flag: Setting force to true adds a potential to enforce the constraint during inference; leave false for soft behavior.
- Chain and residue IDs: Ensure chain IDs and residue indices correspond to those used in your sequences/templates.
- Formatting consistency: Although the UI may show multiline fields, the parser expects semicolon-separated entries; do not rely on newlines alone.
Troubleshooting¶
- Invalid format errors: Verify each entry matches the required pattern. For bonds use chain,residue,atom (e.g., A,15,CA). For contacts/pocket use chain,residue (e.g., A,120). Separate multiple entries with semicolons.
- Mismatched entry counts: If you get an error about list lengths, ensure bond_atom1 has the same number of entries as bond_atom2, and contact_token1 matches contact_token2.
- No constraints found: This occurs if required fields for the chosen type are empty. Provide the necessary inputs for the selected constraint_type.
- Unknown chain or residue: If results look incorrect, confirm that chain IDs and residue indices exist in the provided sequences/templates.
- Unexpected distance behavior: If constraints seem ineffective, check that max_distance is greater than 0; otherwise, no limit is applied.