Density functional theory calculations are used to compute proton nuclear magnetic resonance (NMR) chemical shifts, interatomic distances, atom-atom interaction energies, and atomic charges for partial structures and conformers of α-D-glucopyranose, β-D-glucopyranose, and α-D-galactopyranose built up by introducing OH groups into 2-methyltetrahydropyran stepwisely. For the counterclockwise conformers, the most marked effects on the NMR shift and the charge on the OH1 proton are produced by OH2, those of OH3 and OH4 being somewhat smaller. This argues for a diminishing cooperative effect. The effect of OH6 depends on the configuration of the hydroxymethyl group and the position, axial or equatorial, of OH4, which controls hydrogen bonding in the 1,3-diol motif. Variations in the interaction energies reveal that a "new" hydrogen bond is sometimes formed at the expense of a preexisting one, probably due to geometrical constraints. Whereas previous work showed that complexing a conformer with pyridine affects only the nearest neighbour, successive OH groups increase the interaction energy of the N⋯H1 hydrogen bond and reduce its length. Analogous results are obtained for the clockwise conformers. The interaction energies for C-H⋯OH hydrogen bonding between axial CH protons and OH groups in certain conformers are much smaller than for O-H⋯OH bonds but they are largely covalent, whereas those of the latter are predominantly coulombic. These interactions are modified by complexation with pyridine in the same way as O-H⋯OH interactions: the computed NMR shifts of the CH protons increase, the atom-atom distances are shorter, and interaction energies are enhanced.