Added function to extract lowest energy models