  (abridged) We report the results of SPH calculations of parabolic collisions
between a subgiant or slightly evolved red-giant star and a neutron star (NS).
Such collisions are likely to form ultracompact X-ray binaries (UCXBs) observed
today in old globular clusters. In particular, we compute collisions of a 1.4
Msun NS with realistically modelled parent stars of initial masses 0.8 and 0.9
Msun, each at three different evolutionary stages (corresponding to three
different radii R). The distance of closest approach for the initial orbit
varies from 0.04 R (nearly head-on) to 1.3 R (grazing). These collisions lead
to the formation of a tight binary, composed of the NS and the subgiant or
red-giant core, embedded in an extremely diffuse common envelope (CE) typically
of mass ~0.1 to 0.3 Msun. Our calculations follow the binary for many hundreds
of orbits, ensuring that the orbital parameters we determine at the end of the
calculations are close to final. Some of the fluid initially in the envelope of
the (sub)giant, from 0.003 to 0.023 Msun in the cases we considered, is left
bound to the NS. The eccentricities of the resulting binaries range from about
0.2 for our most grazing collision to about 0.9 for the nearly head-on cases.
In almost all the cases we consider, gravitational radiation alone will cause
sufficiently fast orbital decay to form a UCXB within a Hubble time, and often
on a much shorter timescale. Our hydrodynamics code implements the recent SPH
equations of motion derived with a variational approach by Springel & Hernquist
and by Monaghan. Numerical noise is reduced by enforcing an analytic constraint
equation that relates the smoothing lengths and densities of SPH particles. We
present tests of these new methods to help demonstrate their improved accuracy.
