Using metadynamics to explore complex free-energy landscapes