We have explored the permeation and blockage of ions in sodium channels, relating the channel structure to function using electrostatic profiles and Brownian dynamics simulations. The model used resembles the KcsA potassium channel with an added external vestibule and a shorter selectivity filter. The electrostatic energy landscape seen by permeating ions is determined by solving Poisson's equation. The two charged amino acid rings of Glu-Glu-Asp-Asp (EEDD) and Asp-Glu-Lys-Ala (DEKA) around the selectivity filter region are seen to play a crucial role in making the channel sodium selective, and strongly binding calcium ions such that they block the channel. Our model closely reproduces a range of experimental data including the current-voltage curves, current-concentration curves and blockage of monovalent ions by divalent ions. (C) 2004 Elsevier B.V All rights reserved.