Dynamics of hydrogen bonds and proton defects in the condensed phase