adding chemistry to the hdf file, small changes in saving moments