The discovery of new inorganic materials in unexplored chemical spaces necessitates calculating total energy quickly and with sufficient accuracy. Machine learning models that provide such a capability for both ground-state (GS) and higher-energy structures would be instrumental in accelerating the screening for new materials over vast chemical spaces. Here, we develop a unique graph neural network model to accurately predict the total energy of both GS and higher-energy hypothetical structures. We use ~16,500 density functional theory calculated total energy from the NREL Materials Database and ~11,000 in-house generated hypothetical structures to train our model, thus making sure that the model is not biased towards either GS or higher-energy structures. We also demonstrate that our model satisfactorily ranks the structures in the correct order of their energies for a given composition. Furthermore, we present a thorough error analysis to explain several failure modes of the model, which highlights both prediction outliers and occasional inconsistencies in the training data. By peeling back layers of the neural network model, we are able to derive chemical trends by analyzing how the model represents learned structures and properties.