Coarse grained models of gating and conduction through ion channels