Ab initio study of the nonadditive effects in the trimer of ammonia