The geminal basis in explicitly correlated wave functions