Designing generalized statistical ensembles for numerical simulations of biopolymers