Starting from the simple case of an external field acting on noninteracting particles, a formulation of the self-consistent field theory for treating proteins and unfolded protein chains with multiple interacting titratable groups is given. Electrostatic interactions between the titratable groups are approximated by a Debye-Huckel expression. Amino acid residues are treated as polarizable bodies with a single dielectric constant. Dielectric properties of protein molecules are described in terms of local dielectric constants determined by the space distribution of residue volume density around each ionized residue. Calculations are based on average charges of titratable groups, distance of separation between them, on their pKa's, residue volumes and on the local dielectric constant. A set of different residue volumes is used to analyze the influence of the permanent dipole of polar parts of the residue on calculated titration curves, electrostatic contribution to the free energy of protein stability, and pK shifts. Calculations with zero volumes--which means that charged portions of protein molecules are viewed as part of the high dielectric medium--give good agreement with experimental data. The theory was tested against most accurate approaches currently available for the calculation of the pKa's of ionizable groups based upon finite difference solutions of the Poisson-Boltzmann equation (FDPB). For 70 theoretically calculated pKa's in a total of six proteins the accuracy of the approach presented here is assessed by comparison of computed pKa's with that measured. The overall root-mean-square error is 0.79, compared to the value 0.89 obtained by FDPB approach given in the paper of Antosiewicz et al. (J. Mol. Biol. 238:415-436, 1994). The test of Debye-Huckel approximation for the electrostatic pair interactions shows that it is in excellent agreement with experimental data as well as the calculations of the FDPB and Tanford-Kirkwood methods on the pK shifts of His64 in the active site of subtilisin over the whole range of ionic strengths. (Gilson and Honig, Proteins 3:32-52, 1988; Russell et al., J.Mol.Biol. 193:803-813, 1987). The theory was also analytically and numerically tested on a simple models where the exact statistical mechanical treatment is still simple (Yang et al., Proteins 15:252-265, 1993; Bashford and karplus, J. Phys. Chem. 95:9556-9561, 1991).