Added derivatives for gaussians and periodic gaussians