Standard serialisation function.
References cache, energy_trunc_mode, errTolerance, maxIter, minIter, and version.