To understand how cations affect the enzyme structure and activity of Candida antarctica Lipase B, we performed MD simulations of CALB in four types of ionic liquids with varying sizes of cations and correlated the results with the experimental data.