Hydrogen bonding interactions and their effect on the structure and the energetics of the rotation about N-C(alpha) and C(alpha)-C' bonds are studied for N-methylacetamide (NMA) by use of ab initio quantum mechanical calculations. The structure and methyl rotational barriers for isolated NMA have been determined at the Hartree-Fock (HF) level with 6-31G, 6-31G*, and 6-311G** basis sets and at the second-order Moller-Plesset perturbation (MP2) level with a 6-31G* basis set including geometry optimization for the different methyl orientations. The optimized geometries, the hydrogen bonding interaction energies, and the methyl rotational barriers for 11 complexes in which NMA is hydrogen bonded to H2O and/or formamide (FM) [i.e., NMA + H2O (3 complexes), NMA + 2H2O (2 complexes), NMA + 3H2O (1 complex), NMA + FM (2 complexes), NMA + (FM and H2O) (1 complex), NMA + 2FM (1 complex), and NMA + (2FM and 1H2O) (1 complex)] have been calculated at the HF/6-31G level; HF/6-31G* calculations were performed for the 3 NMA + H2O complexes and 1 of the NMA + 2H2O complexes. For isolated NMA, the torsional potentials for both methyl groups are predicted to be very flat and the rotational barriers are only approximately 0.1 kcal/mol. This contrasts with some of the earlier calculations in which larger barriers were obtained due to lack of geometry optimization of the rotated conformers. The barriers in the hydrogen bonded systems are calculated to be significantly larger (0.2-0.9 kcal/mol). The increase of the C'=O bond length from the gas-phase to crystalline-state NMA corresponds to that found in the ab initio calculations with hydrogen bonding ligands, but the difference (0.1 angstrom) in the experimental C'(O)-N bond distance is significantly larger than the calculated value. This suggests that the crystal structure may be in error. In agreement with the crystal structure, the lowest energy conformation in all the hydrogen bonded systems is predicted to have an eclipsed (C')CH3 group and a staggered (N)CH3 group with respect to the C'(O)-N bond; this contrasts with isolated NMA, where the conformations with the different methyl orientations have similar energies with a difference of only approximately 0.1 kcal/mol. In accord with the general trend observed in hydrogen bonding in a crystal data base, the ab initio calculations show that the hydrogen bond distance involving "multiple acceptors" (i.e., the C'=O group that accepts two hydrogen bonds) is 0.02-0.06 angstrom longer than that involving a "single acceptor". The calculated hydrogen bond energy is approximately 0.5-1.5 kcal/mol smaller when two acceptors are present. By contrast, the formation of a hydrogen bond to the NH group reduces the hydrogen bond distance for the hydrogen bond to the C'=O group by approximately 0.02-0.045 angstrom and increases the corresponding hydrogen bond energy by approximately 0.3-0.9 kcal/mol. Correspondingly, the formation of each hydrogen bond to C'=O reduces the hydrogen bond distance for the hydrogen bond to the NH and increases the corresponding hydrogen bond energy by about the same amount. When one ligand is bound to the carbonyl group, the C=O...H(N) angle is nearly linear (approximately 160-degrees-165-degrees), while, for two ligands (i.e., with any additional H2O ligand), the angle is reduced to approximately 130-degrees, in accord with an analysis of structural data. The changes in the geometrical parameters and the increase of the methyl rotational barriers as a result of hydrogen bonding are interpreted in terms of Mulliken populations, and their importance for empirical force fields is briefly discussed.