  A multidomain spectral method with compactified exterior domains combined
with stable second and fourth order time integrators is presented for
Schr\"odinger equations. The numerical approach allows high precision numerical
studies of solutions on the whole real line. At examples for the linear and
cubic nonlinear Schr\"odinger equation, this code is compared to transparent
boundary conditions and perfectly matched layers approaches. The code can deal
with asymptotically non vanishing solutions as the Peregrine breather being
discussed as a model for rogue waves. It is shown that the Peregrine breather
can be numerically propagated with essentially machine precision, and that
localized perturbations of this solution can be studied.
