When using hydride.add_hydrogen() on a protein structure, the resulting structure contains incorrect bonds between neighboring atoms (see attached image). This issue occurs for both PDB and CIF inputs, suggesting it is not format-specific.
Observed behavior
- The output structure contains incorrect bonds between some atoms.
- These bonds appear between neighboring residues.
- The issue seems to occur specifically when residue indices are not consecutive (e.g. residue 14 followed by 16 instead of 15).
- Visualization shows clearly incorrect connectivity.
Expected behavior
- Hydrogen addition should not introduce incorrect bonds.
- Bond topology should remain chemically valid, even if residue numbering is non-consecutive.
Additional context
- The input structure appears to have a gap in residue numbering (e.g. 14 → 16).
- However, other tools handle this correctly like moleculekit's systemPrepare() function adds hydrogens without introducing incorrect bonds.
Is this a known issue or there any way how to fix it please?
Thank you!
This is minimal example of my code:
import biotite.structure.io as strucio
import hydride
protein = strucio.load_structure(structure_path, model=1, include_bonds=True)
protein_h, _ = hydride.add_hydrogen(protein)
hydride version: 1.2.3

When using hydride.add_hydrogen() on a protein structure, the resulting structure contains incorrect bonds between neighboring atoms (see attached image). This issue occurs for both PDB and CIF inputs, suggesting it is not format-specific.
Observed behavior
Expected behavior
Additional context
Is this a known issue or there any way how to fix it please?
Thank you!
This is minimal example of my code:
hydride version: 1.2.3