Project Library: currently have helper functions calculating total energy