Treatment of electrostatic effects within the molecular-mechanics method. 2