Molecular Mean Field Theory of Ions in Water and Channels