We examine the velocity structure in the gas associated with H i in the damped Ly alpha absorption system at redshift z = 1.7764 towards the QSO 1331 + 170 using Arecibo H i 21cm data, optical spectra from the Keck High Resolution Echelle Spectrograph (HIRES) and European Southern Observatory (ESO) Very Large Telescope (VLT) Ultraviolet and Visual Echelle Spectrograph (UVES), and a previously published Hubble Space Telescope (HST) Space Telescope Imaging Spectrograph (STIS) ultraviolet spectrum. From the optical data we find at least two, and possibly three, components showing C i lines. One of these has very narrow lines with Doppler parameter b = 0.55 km s(-1), corresponding to a kinetic temperature of 220 K if the broadening is thermal and with a 2-sigma upper limit of 480 K. We re-examine the H-2 analysis undertaken by Cui et al. using the neutral carbon velocity structure, and find a model which is, unlike theirs, consistent with a mixture of collisional and background radiation excitation of the observed H-2 rotational levels. Using Voigt profile fits to absorption lines from a range of singly ionized heavy elements we find eight components covering a velocity range of similar to 110 km s(-1), with a further outlier over 120 km s-1 away from the nearest in the main group. The H i structure is expected to follow some combination of the singly ionized and neutral gas, but the 21cm absorption profile is considerably different. We suggest, as have others, that this may be because the different extent and brightness distributions of the radio and optical background sources mean that the sightlines are not the same, and so the spin temperature derived by comparing the Ly alpha and 21cm line strengths has little physical meaning. The neutral and singly ionized heavy element line profiles also show significant differences, and so the dominant components in each appear to be physically distinct. Attempts to use the range of atomic masses to separate thermal and turbulent components of their Doppler widths were not generally successful, since there are several blended components and the useful mass range (about a factor of 2) is not very large. The velocity structure in all ionization stages up to +3, apart from the neutral heavy elements, is sufficiently complex that it is difficult to separate out the corresponding velocity components for different ionization levels and determine their column densities.