Vicinal scalar J-coupling constants in polypeptides are analyzed using density functional theory (DFT) in combination with molecular dynamics (MD) computer simulations. The couplings studied are the six (3)J-coupling constants that involve the phi backbone torsion angle, (3)J(H-N-H-alpha), (3)J(H-N-C-beta), (3)J(H-N-C'), (3)J(C'-H-alpha), (3)J(C'-C-beta), and (3)J(C'-C'), and two (3)J-coupling constants, (3)J(H-alpha-N) and (3)J(N-N), that involve the psi backbone torsion angle. The dependence of these couplings on their main torsion angle as well as other degrees of freedom are investigated by computations performed on two different versions of the alanine dipeptide, Ala-Ala-NH2 and Ace-Ala-NMe, with sets of coordinates obtained by different structure optimization schemes and from snapshots extracted from a MD trajectory of ubiquitin. In this way, assumptions that underlie the widely used Karplus relationships can be independently tested. Static Karplus curves, which are fitted to the computed couplings as a function of the phi -torsion angle, are generally in good agreement with empirical Karplus curves reported for several proteins if substantial motional averaging effects are taken into account. For ubiquitin, the average phi -angle fluctuation amplitudes are +/-24 degrees, which is somewhat larger than what has been found from NMR relaxation measurements and MD simulations, presumably because these latter techniques predominantly reflect motions on the ns and sub-ns time-scale range. Systematic differences in the backbone phi angles between the solution-state and the crystalline structure are found to play a minor role. The two J couplings involving the psi angle are sensitive not only to their main torsion angle, but also to other degrees of freedom, which may complicate their interpretation. The emergence of DFT as a quantitative tool for the interpretation of scalar J-coupling constants enhances the power of J-coupling analysis as a unique probe of structural dynamics of biomolecules.