We have used density functional calculations on model peptides to study conformational effects on (15)N, (13)C alpha, (13)C beta, and (13)C' chemical shifts, associated with hydrogen bonding, backbone conformation, and side-chain orientation. The results show a significant dependence on the backbone torsion angles of the nearest three residues. Contributions to (15)N chemical shifts from hydrogen bonding (up to 8 ppm), backbone conformation (up to 13 ppm), side-chain orientation and neighborhood residue effects (up to 22 ppm) are significant, and a unified theory will be required to account for their behavior in proteins. In contrast to this, the dependence on sequence and hydrogen bonding is much less for (13)C alpha and (13)C beta chemical shifts (<0.5 ppm), and moderate for carbonyl carbon shifts (<2 ppm). The effects of side-chain orientation are mainly limited to the residue itself for both nitrogen and carbon, but the chi(1) effect is also significant for the nitrogen shift of the following residue and for the (13)C' shift of the preceding residue. The calculated results are used, in conjunction with an additive model of chemical shift contributions, to create an algorithm for prediction of (15)N and (13)C shifts in proteins from their structure; this includes a model to extrapolate results to regions of torsion angle space that have not been explicitly studied by density functional theory (DFT) calculations. Crystal structures of 20 proteins with measured shifts have been used to test the prediction scheme. Root mean square deviations between calculated and experimental shifts 2.71, 1.22, 1.31, and 1.28 ppm for N, C alpha, C beta, and C', respectively. This prediction algorithm should be helpful in NMR assignment, crystal and solution structure comparison, and structure refinement.