Mechanisms of opening and closing of the bacterial replicative helicase