Skip to content

Conversation

@y1zhou
Copy link

@y1zhou y1zhou commented Oct 17, 2025

This pull request refactors and improves the clarity and correctness of the Boltz2-related code, particularly in how bonded atom pairs are processed and YAML output is generated. It also adds a special case for handling single-sequence mode in the YAML output.

Refactoring and code clarity:

  • Refactored bonded_atom_pairs_to_yaml to use named variables (atom1, atom2) instead of indexing into pair, improving readability and reducing the risk of errors.

YAML output improvements:

  • Modified add_key_and_value to handle both strings and lists as values, only quoting the value if it is a string, which improves the correctness of the generated YAML.
  • In sequence_to_yaml, added special handling for single-sequence mode (when msa_file is None and the sequence type is "protein") by inserting an explicit msa: empty line in the YAML output.

…t str

Previous code would wrap the list in double quotes, resulting in Boltz2 not being able to unwrap the three elements.
… mode

Boltz2 would raise an error when no MSA files are provided and `--use_msa_server` is not passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant