Deconstructing the energy landscape: Constraint-based algorithms for folding heteropolymers