Fix gmx density for non-mass calculations