Efficient and Accurate First-principles Predictions of Structures and Energies for Materials Science, Chemistry, and Biology