Skip to content

Support bio-forge 0.4.0 Salt Bridge Detection for Context-Aware Histidine Protonation #17

@TKanX

Description

@TKanX

Description:

To maintain API compatibility with upstream bio-forge 0.4.0, dreid-forge must support the newly introduced his_salt_bridge_protonation parameter in HydroConfig. This parameter enables geometric detection of histidine-carboxylate salt bridges (HIS-ASP⁻/GLU⁻/C-term COO⁻), automatically converting HIS to HIP (+1 charge) when nitrogen atoms (ND1/NE2) are within 4.0Å of carboxylate oxygens.

Tasks:

  • Phase 1: API Extension (src/io/mod.rs)

    • Add his_salt_bridge_protonation: bool field to ProtonationConfig (default: true).
    • Update ProtonationConfig::default() implementation.
    • Add docstring explaining salt bridge detection mechanism.
  • Phase 2: CLI Integration (src/bin/dforge/cli.rs, src/bin/dforge/config/bio.rs)

    • Add --no-his-salt-bridge flag to ProtonationOptions.
    • Update build_protonate_config() to map CLI flag to config field.
    • Add help text explaining detection distance (4.0Å) and affected residues.
  • Phase 3: Conversion Layer (src/io/util.rs)

    • Update to_bf_hydro_config() to pass through his_salt_bridge_protonation.
    • Ensure proper mapping preserves user intent (inverted flag logic for --no-*).
  • Phase 4: Documentation & Testing

    • Update MANUAL.md with salt bridge detection explanation and use cases.
    • Add unit test: protonate_config_defaults_enable_salt_bridge().
    • Add unit test: cli_flag_disables_salt_bridge_detection().
    • Add unit test: conversion_preserves_salt_bridge_setting().
    • Update README.md example showing both enabled/disabled modes.
  • Phase 5: Dependency Upgrade

    • Update Cargo.toml: bio-forge = "0.4.0".
    • Run cargo test to verify all 225 tests pass.
    • Test CLI: dforge bio --ph 7.4 [--no-his-salt-bridge] input.pdb.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions