Ab initio study of intermolecular potential of H2O trimer