The gating mechanism in cyclic nucleotide-gated ion channels