Two different ways of representing a hydrogen bond are shown below. A stable hydrogen bond requires that both A and D are electronegative atoms, usually oxygen and nitrogen atoms. Increasing the electronegativity of D strips electron density from the proton, increasing its partial positive charge. The acidity of the proton bound to D and the basicity of the lone pair of A both correlate roughly with the strength of the hydrogen bond. Hydrogen bonds are essentially electrostatic in nature, although the energy can be decomposed into additional contributions from polarization, exchange repulsion, charge transfer, and nixing.
Hydrogen bonds form a continuum.
The geometry of a hydrogen bond can be geometrically described by three quantities, the D to H distance, the H to A distance, and the D to H to A angle. Hydrogen bonds are not necessary, or even generally, linear. So a geometric description of hydrogen bonding that is dependent on proton position is not practical in protein and nucleic acid structures. In these cases one is usually limited to analysis of the D to A distance. It is common to ascribe a hydrogen bond if a distance between A and D is less than the sum of their van der Waal radii.