Generalized approximation to the reaction path: the formic acid dimer case.