add total energy attributes, fix test