Background: p21 ras is one of the GTP-binding proteins that act as intercellular molecular switches. The GTP-bound form of p21 ras sends a growth-promoting signal that is terminated once the protein is cycled back into its GDP-bound form. The interaction of guanine-nucleotide-exchange factors (GEFs) with p21 ras leads to activation of the protein by promoting GDP→GTP exchange. Oncogenic mutations of p21 ras trap the protein in its biological active GTP-bound form. Other mutations interfere with the activity of GEF. Thus, it is important to explore the structural basis for the action of different mutations. Results The crystal structures of p21 ras are correlated with the binding affinities of GTP and GDP by calculating the relevant electrostatic energies. It is demonstrated that such calculations can provide a road map to the location of ‘hot’ residues whose mutations are likely to change functional properties of the protein. Furthermore, calculations of the effect of specific mutations on GTP and GDP binding are consistent with those observed. This helps to analyze and locate functionally important parts of the protein. Conclusion Our calculations indicate that the protein main chain provides a major contribution to the binding energies of nucleotides and probably plays a key role in relaying the effect of GEF action. Analysis of p21 ras mutations in residues that are important for the proper function of GEFs suggests that the region comprising residues 62—67 in p21 ras is the major GEF-binding site. This analysis and our computer simulations indicate that the effect of GEF is probably propagated to the P-loop (residues 10–17) through interaction between Gly60 and Gly12. This then reduces the interaction between the main-chain dipoles of the P-loop and the nucleotide. Finally, the results also suggest a possible relationship between the GTP→GDP structural transition and the catalytic effect of the GTPase-activating protein.