Optical-Bloch equation integrator (RK4)