Molecular simulations of lactose-bound and unbound forms of the FaeG adhesin reveal critical amino acids involved in sugar binding.