Trapping molecules on chips