Predicting structural energies of atomic lattices