The biophysical basis of protein domain compatibility in ion channels