bond information for data file

Dear Lammps User.

I want to model the fully hydroxylated silica surface which obtained by attaching a hydrogen atom to surface oxygen atom.
I wrote the code to generate the data file for lammps. Si and O atoms are in fixed position,but the H atoms on the surface are able to move with fixed bond lengths and bond angles.
However, it is difficult to write the bond information of O-H, since the atom id for bonded O H atoms are not continuous.
Does any know how to determine the bond information? Which O id boned to specific H ID?

Thank you very much for any help

best wishes

Liyi