Boltz Constraint Builder¶
Creates constraint specifications for Boltz YAML. Supports bond, pocket, and contact constraints, with flexible multi-entry inputs using semicolon or newline separation and optional distance/force parameters.

Usage¶
Use this node to define geometric or interaction constraints for your Boltz run. Build one or more constraints, then combine them (optionally with sequences, templates, and properties) using Boltz List Combiner and Boltz YAML Combiner before running prediction or partial diffusion.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| constraint_type | True | ["bond", "pocket", "contact"] | Selects the type of constraint to build. | |
| bond_atom1 | False | STRING | For bond constraints: semicolon-separated list of atom tokens for the first atom in each pair. Each token is chain_id,residue_idx,atom_name. | A,1,N;B,2,CA |
| bond_atom2 | False | STRING | For bond constraints: semicolon-separated list of atom tokens for the second atom in each pair. Must have the same number of entries as bond_atom1. Each token is chain_id,residue_idx,atom_name. | A,1,C;B,2,CB |
| pocket_binder | False | STRING | For pocket constraints: the binder chain ID. | L |
| pocket_contacts | False | STRING | For pocket constraints: newline-separated list of contact tokens. Each line is chain_id,residue_idx. | A,10 A,25 B,5 |
| contact_token1 | False | STRING | For contact constraints: semicolon-separated list of first residue tokens. Each token is chain_id,residue_idx. | A,10;B,20 |
| contact_token2 | False | STRING | For contact constraints: semicolon-separated list of second residue tokens. Must have the same number of entries as contact_token1. Each token is chain_id,residue_idx. | L,5;L,15 |
| max_distance | False | FLOAT | Optional maximum distance in Å for pocket/contact constraints. 0 means no explicit limit is set. | 8.0 |
| force | False | BOOLEAN | If true, marks the constraint to be enforced using potentials. | true |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| constraints | * | A list of constraint objects ready to be merged into a Boltz YAML configuration. | [{"pocket": {"binder": "L", "contacts": [["A", 10], ["A", 25], ["B", 5]], "max_distance": 8.0, "force": true}}] |
Important Notes¶
- Input formats: bond_atom use semicolons between entries and require chain_id,residue_idx,atom_name; contact_token use semicolons and require chain_id,residue_idx; pocket_contacts uses newline-separated entries with chain_id,residue_idx per line.
- Paired counts must match: bond_atom1 and bond_atom2 must have the same number of entries; contact_token1 and contact_token2 must have the same number of entries.
- Distance handling: max_distance applies to pocket and contact constraints; if set to 0, the field is omitted (no limit).
- Force flag: Setting force to true adds a flag to enforce the constraint with potentials.
- Multiple constraints: You can specify multiple bond/contact pairs in one node using semicolon-separated lists.
Troubleshooting¶
- Mismatch in entry counts: If you see an error like 'Number of ... entries must match', ensure both paired fields (e.g., bond_atom1 and bond_atom2) have the same number of semicolon-separated items.
- Invalid format error: Ensure each entry strictly follows the required format (e.g., A,10 or A,1,N). Residue indices must be integers; atom names are required for bond constraints.
- Empty input error: For a chosen constraint type, required fields cannot be empty (e.g., pocket requires pocket_binder and pocket_contacts).
- Wrong separator: Pocket contacts require newline separation, not semicolons. Bond/contact lists require semicolons between entries.
- No constraints produced: If no valid constraints are parsed, verify that inputs are non-empty and correctly formatted for the selected constraint type.