Updated calculateEnergy() and metropolisStep() for Gaussian Theory