docs: def run_evolution(path,name,E0,laser_frequencies,  N_iter,dt,N_states,
  				spectrum_of_laser=None,N_delta=None,frequency_step=None,frequency_end=None,
  				rho0=None,print_steps=False,
  				integrate=False,
  				save_systems=False,save_eigenvalues=False,rk4=False,use_netcdf=True):
  	"""This function runs the Runge-Kutta method compiled in path+name..."""
  	def py2f_bool(bool_var):
  		if bool_var:
  			return ".true.\n"
  		else:
  			return ".false.\n"
  
  	if rk4:
  		return run_rk4(path,name,E0,laser_frequencies,  N_iter,dt,N_states,
  				spectrum_of_laser=spectrum_of_laser,N_delta=N_delta,
  				frequency_step=frequency_step, frequency_end=frequency_end,
  				rho0=rho0,print_steps=print_steps,
  				integrate=integrate,save_systems=save_systems)
  
  	t0=time()
  	params =str(N_iter)+'\n'
  	params+=str(dt)+'\n'
  	#We give the flag on wether to print each time step.
  	params+=py2f_bool(print_steps)
  
  	#We give the initial value of rho
  	N_vars=N_states*(N_states+1)/2-1
  	if rho0==None:
  		params+=''.join(['(0.0,0.0) ' for i in range(N_states**2-1)])
  	elif len(rho0)==N_states-1:
  		if sage_included:
  			params+=''.join(['('+str(real(i))+','+str(imag(i))+') ' for i in rho0])
  		else:
  			params+=''.join(['('+str(i.real)+','+str(i.imag)+') ' for i in rho0])
  		params+=''.join(['(0.0,0.0) ' for i in range( N_states**2 -N_states)])
  	elif len(rho0)==N_vars:
  		params+=''.join(['('+str(real(i))+','+str(imag(i))+') ' for i in rho0])
  	else:
  		raise ValueError,'rho0 had an invalid number of elements.'
  
  	params+='\n'
  	#We give the amplitude of the electrical fields.
  	params+=''.join([str(i)+' ' for i in E0])+'\n'
  
  	#We give the detuning of each laser (taken from the lowest frequency transition).
  	params+=''.join([str(i)+' ' for i in laser_frequencies])+'\n'
  
  	#We give the flag on wether to calculate spectrums or time evolution.
  	if spectrum_of_laser==None:
  		params+='.false.\n'
  		params+=py2f_bool(save_systems)
  		params+=py2f_bool(save_eigenvalues)
  		params+=py2f_bool(use_netcdf)
  		params+=py2f_bool(integrate)
  
  	else:
  		if frequency_end !=None:
  			if frequency_step !=None:
  				raise ValueError,'both frequency_end and frequency_step were specified.'
  			if N_delta==1:
  				frequency_step=0.0
  			else:
  				frequency_step=(frequency_end-laser_frequencies[spectrum_of_laser-1])/(N_delta-1)
  
  		#frequency_step=frequency_end
  		params+='.true.\n'
  		params+=py2f_bool(save_systems)
  		params+=py2f_bool(save_eigenvalues)
  		params+=py2f_bool(use_netcdf)
  		params+=py2f_bool(integrate)
  
  		params+=str(spectrum_of_laser)+'\n'
  		params+=str(N_delta)+'\n'
  		params+=str(frequency_step)
  	#print params
  
  	f=file(path+name+'_params.dat','w')
  	f.write(params)
  	f.close()
  
  	os.system(path+name)
  	return time()-t0