Bug: int() parsing failure when component contains P suffix during RFD3 input parsing
Description
During RFD3 inference, the input parser fails when processing the generated design length component.
The parser function accumulate_components() expects each non-motif component to be an integer value and directly converts the component using:
However, the component list generated by get_design_pattern_with_constraints() contains a string value with a protein type suffix:
This value cannot be converted by Python's int() function:
resulting in:
ValueError: invalid literal for int() with base 10: '80P'
Reproduction
Input specification:
{
"test_L80": {
"input": "/content/L-homoserine_seed.pdb",
"length": "80-80",
"ligand": "LIG",
"dialect": 2
}
}
Component expansion result:
get_design_pattern_with_constraints(
"80-80",
length="80-80"
)
# returns:
['80P']
The generated component is then passed into:
where the parser assumes:
but receives:
Expected behavior
The component format passed to accumulate_components() should match the parser expectation.
Either:
- The component generator should return an integer-compatible value:
or:
- The parser should explicitly support typed component strings:
and extract the numeric length before integer conversion.
Affected code
File:
rfd3/src/rfd3/inference/input_parsing.py
Function:
Current logic:
The current implementation assumes that all non-alphabetic components are pure integers.
Environment
Repository:
Related modules:
foundry.utils.components
rfd3.inference.input_parsing
Model initialization and checkpoint loading complete successfully. The failure occurs only during input component parsing.
Bug:
int()parsing failure when component containsPsuffix during RFD3 input parsingDescription
During RFD3 inference, the input parser fails when processing the generated design length component.
The parser function
accumulate_components()expects each non-motif component to be an integer value and directly converts the component using:However, the component list generated by
get_design_pattern_with_constraints()contains a string value with a protein type suffix:This value cannot be converted by Python's
int()function:resulting in:
Reproduction
Input specification:
{ "test_L80": { "input": "/content/L-homoserine_seed.pdb", "length": "80-80", "ligand": "LIG", "dialect": 2 } }Component expansion result:
The generated component is then passed into:
accumulate_components()where the parser assumes:
but receives:
Expected behavior
The component format passed to
accumulate_components()should match the parser expectation.Either:
80or:
and extract the numeric length before integer conversion.
Affected code
File:
Function:
Current logic:
The current implementation assumes that all non-alphabetic components are pure integers.
Environment
Repository:
Related modules:
Model initialization and checkpoint loading complete successfully. The failure occurs only during input component parsing.