General method to sample systems in the microcanonical ensemble using Monte Carlo simulations G. Palma and A. Riveros Eur. Phys. J. B, 94 1 (2021) 23 Published online: 21 January 2021 DOI: 10.1140/epjb/s10051-020-00022-6