We introduce a variational approximation to the microscopic dynamics of rare conformational transitions of macromolecules. Within this framework it is possible to simulate on a small computer cluster reactions as complex as protein folding, using state of the art all-atom force fields in explicit solvent. We test this method against molecular dynamics (MD) simulations of the folding of an alpha- and a beta-protein performed with the same all-atom force field on the Anton supercomputer. We find that our approach yields results consistent with those of MD simulations, at a computational cost orders of magnitude smaller.