def material_error(amount_perovskite):
     phases = [minerals.Murakami_fe_perovskite(), minerals.Murakami_fe_periclase_LS()]
     molar_abundances = [amount_perovskite, 1.0-amount_perovskite]
 
     for ph in phases:
         ph.set_method(method)
 
     print "Calculations are done for:"
     for i in range(len(phases)):
         print molar_abundances[i], " of phase", phases[i].to_string()
 
     mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_mu = burnman.calculate_velocities(seis_p, temperature, phases, molar_abundances)    
 
     #[rho_err,vphi_err,vs_err]=burnman.compare_with_seismic_model(mat_vs,mat_vphi,mat_rho,seis_vs,seis_vphi,seis_rho)
     [rho_err,vphi_err,vs_err]=burnman.compare_two(depths,mat_vs,mat_vphi,mat_rho,seis_vs,seis_vphi,seis_rho)
 
     return vs_err, vphi_err
	#input your geotherm. Either choose one (See example_geotherms.py) or create one.We'll use Brown and Shankland.
	
	geotherm = burnman.geotherm.brown_shankland
	temperature = [geotherm(p) for p in seis_p]
	
	
	#Now we'll calculate the models. 
	
	for ph in phases:
		ph.set_method(method_1)
	
	print "Calculations are done for:"
	for i in range(len(phases)):
		print molar_abundances[i], " of phase", phases[i].to_string()
	
	mat_rho_1, mat_vp_1, mat_vs_1, mat_vphi_1, mat_K_1, mat_mu_1 = burnman.calculate_velocities(seis_p, temperature, phases, molar_abundances)	
	
	for ph in phases:
		ph.set_method(method_2)
	
	print "Calculations are done for:"
	for i in range(len(phases)):
		print molar_abundances[i], " of phase", phases[i].to_string()
	
	mat_rho_2, mat_vp_2, mat_vs_2, mat_vphi_2, mat_K_2, mat_mu_2 = burnman.calculate_velocities(seis_p, temperature, phases, molar_abundances)	

        for ph in phases:
                ph.set_method(method_3)

        print "Calculations are done for:"
        for i in range(len(phases)):
                            'ref_grueneisen': 1.368, #Gruneisen parameter for material. See Stixrude & Lithgow-Bertelloni, 2005 for values
                            'q0': 0.917, #q value used in caluclations. See Stixrude & Lithgow-Bertelloni, 2005 for values
                'eta_0s': 3.0} #eta value used in calculations. See Stixrude & Lithgow-Bertelloni, 2005 for values
    
    
    phases = [ own_material() ]
    molar_abundances = [ 1.0 ]
    
    
    #seismic model for comparison:
    seismic_model = burnman.seismic.prem() # pick from .prem() .slow() .fast() (see burnman/seismic.py)
    number_of_points = 20 #set on how many depth slices the computations should be done
    depths = np.linspace(700,2800, number_of_points)
    #depths = seismic_model.internal_depth_list()
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)
    
            
    geotherm = burnman.geotherm.brown_shankland
    temperature = [geotherm(p) for p in seis_p]
    
    for ph in phases:
        ph.set_method(method)
    
    print "Calculations are done for:"
    for i in range(len(phases)):
        print molar_abundances[i], " of phase", phases[i].to_string()
    
    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_mu = burnman.calculate_velocities(seis_p, temperature, phases, molar_abundances)    
    
    [rho_err,vphi_err,vs_err]=burnman.compare_with_seismic_model(mat_vs,mat_vphi,mat_rho,seis_vs,seis_vphi,seis_rho)
 
 # Here the compositions are implemented as fixed minerals. For other options see example_composition.py
 # Example 1 ferropericlase with spin transition from Murakami et al. 2012
 if True:
     phases = [minerals.Murakami_fe_perovskite(), minerals.Murakami_fe_periclase()]
     amount_perovskite = 0.
     molar_abundances = [amount_perovskite, 1.0-amount_perovskite]
 
 for ph in phases:
     ph.set_method(method)
 
 print "Calculations are done for:"
 for i in range(len(phases)):
     print molar_abundances[i], " of phase", phases[i].to_string()
 
 mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_mu = burnman.calculate_velocities(seis_p, temperature, phases, molar_abundances)    
     
 # plot example 1
 plt.subplot(2,2,1)
 plt.plot(seis_p/1.e9,mat_vs,color='b',linestyle='-',marker='o',markerfacecolor='b',markersize=4,label='Vs')
 plt.plot(seis_p/1.e9,mat_vphi,color='r',linestyle='-',marker='o',markerfacecolor='r',markersize=4, label='Vp')
 plt.plot(seis_p/1.e9,mat_rho,color='k',linestyle='-',marker='o',markerfacecolor='k',markersize=4, label='rho')
 plt.title("ferropericlase (Murakami et al. 2012)")
 plt.xlim(min(seis_p)/1.e9,max(seis_p)/1.e9)
 plt.ylim(5,6.5)
 plt.legend(loc='upper left')
 
 # example 2:
 
 molar_abundances = [1.0]
 phases = [minerals.Murakami_fe_periclase_LS()]
 #input your geotherm. Either choose one (See example_geotherms.py) or create one.We'll use Brown and Shankland.
 
 geotherm = burnman.geotherm.brown_shankland
 temperature_2 = [geotherm(p) for p in seis_p_2]
 
 
 #Now we'll calculate the models. 
 
 for ph in phases_1:
     ph.set_method(method_1)
 
 print "Calculations are done for:"
 for i in range(len(phases_1)):
     print molar_abundances_1[i], " of phase", phases_1[i].to_string()
 
 mat_rho_1, mat_vp_1, mat_vs_1, mat_vphi_1, mat_K_1, mat_mu_1 = burnman.calculate_velocities(seis_p_1, temperature_1, phases_1, molar_abundances_1)    
 
 for ph in phases_2:
     ph.set_method(method_2)
 
 print "Calculations are done for:"
 for i in range(len(phases_2)):
     print molar_abundances_2[i], " of phase", phases_2[i].to_string()
 
 mat_rho_2, mat_vp_2, mat_vs_2, mat_vphi_2, mat_K_2, mat_mu_2 = burnman.calculate_velocities(seis_p_2, temperature_2, phases_2, molar_abundances_2)    
 
 
 ##Now let's plot the comparison. You can conversely just output to a data file (see example_woutput.py)
 
 plt.subplot(2,2,1)
 plt.plot(seis_p_1/1.e9,mat_vs_1,color='r',linestyle='-',marker='^',markerfacecolor='r',markersize=4)
 seis_p_2 = np.arange(25e9, 125e9, 5e9)
 
 #input your geotherm. Either choose one (See example_geotherms.py) or create one.We'll use Brown and Shankland.
 
 geotherm = burnman.geotherm.brown_shankland
 temperature_2 = [geotherm(p) for p in seis_p_2]
 
 
 #Now we'll calculate the models. 
 
 for ph in phases_pyro:
     ph.set_method(method)
 
 
 
 mat_rho_pyro, mat_vp_pyro, mat_vs_pyro, mat_vphi_pyro, mat_K_pyro, mat_mu_pyro = burnman.calculate_velocities(seis_p_1, temperature_1, phases_pyro, molar_abundances_pyro)    
 
 print "Calculations are done for:"
 for i in range(len(phases_pyro)):
     print molar_abundances_pyro[i], " of phase", phases_pyro[i].to_string()
 
 for ph in phases_enst:
     ph.set_method(method)
 
 print "Calculations are done for:"
 for i in range(len(phases_enst)):
     print molar_abundances_enst[i], " of phase", phases_enst[i].to_string()
 
 mat_rho_enst, mat_vp_enst, mat_vs_enst, mat_vphi_enst, mat_K_enst, mat_mu_enst = burnman.calculate_velocities(seis_p_2, temperature_2, phases_enst, molar_abundances_enst)