Fast tree search for enumeration of a lattice model of protein folding