def get_mixed_entropy_values(PDB, buried_temp, surface_temp):
    new_entropies = []
    #Make the files
    buried_file  = "align_data_array_" + PDB + "_" + str(buried_temp) +  ".dat"
    surface_file  = "align_data_array_" + PDB + "_" + str(surface_temp) +  ".dat"
    #Get the RSA Values
    RSA = af.make_array(af.get_RSA_Values(buried_file))
    buried_entropies = af.get_native_entropy(buried_file)
    surface_entropies = af.get_native_entropy(surface_file)
    #Get the entropy values
    for i in xrange(len(RSA)):
        if (float(RSA[i]) <=0.25):
            new_entropies.append(buried_entropies[i])
        else:
            new_entropies.append(surface_entropies[i])
    return RSA, new_entropies
            pdb_names.append(pdb_id)
            chain_names.append(chain_id)

            natural_proteins = file  #Open the files with results
            designed_proteins_rosetta = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(
                "rosetta") + ".dat"
            designed_proteins_evolved = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(
                "evolved") + ".dat"

            split_natural_1 = "align_natural_sample1_data_array_" + pdb_id + "_" + chain_id + ".dat"
            split_natural_2 = "align_natural_sample2_data_array_" + pdb_id + "_" + chain_id + ".dat"

            #Calculates all of the data for comparison (ex. entropy)
            natural_distribution = analysis_functions.get_AA_distribution_KL(
                natural_proteins)
            natural_entropy = analysis_functions.get_native_entropy(
                natural_proteins)
            natural_entropy_array = analysis_functions.make_array(
                natural_entropy)
            natural_RSA = analysis_functions.get_RSA_Values(natural_proteins)
            natural_RSA_array = analysis_functions.make_array(natural_RSA)
            natural_mean_RSA_values.append(mean(natural_RSA_array))
            natural_mean_entropy_values.append(mean(natural_entropy_array))

            #Calculates cn & wcn
            #             cn13_data = analysis_functions.get_cn13_values(pdb_id, chain_id)
            #             iCN13 = cn13_data[0]
            #             iCN13_array = analysis_functions.make_array(cn13_data)
            #             mean_iCN13_values.append(mean(iCN13_array))

            iwcn_data = calc_wcn.get_iwcn_values(pdb_id, chain_id)
            iWCN_array = analysis_functions.make_array(iwcn_data)
for PDB in PDBS:
    RSA1, entropy_mix1 = get_mixed_entropy_values(PDB, 0.0, 0.1)
    RSA2, entropy_mix2 = get_mixed_entropy_values(PDB, 0.03, 0.1)
 
    [cor_entropy_RSA_mix1, pvalue1] = pearsonr(RSA1, entropy_mix1)
    cor_entropy_RSA_mix1 = float(cor_entropy_RSA_mix1)
    cor_values1.append(cor_entropy_RSA_mix1)
    
    [cor_entropy_RSA_mix2, pvalue2] = pearsonr(RSA2, entropy_mix2)
    cor_entropy_RSA_mix2 = float(cor_entropy_RSA_mix2)
    cor_values2.append(cor_entropy_RSA_mix2)
    
    natural_file  = "align_natural_data_array_" + PDB + ".dat"
    natural_RSA = af.make_array(af.get_RSA_Values(natural_file))
    natural_entropy = af.get_native_entropy(natural_file)
    [natural_cor_entropy_RSA, pvalue3] = pearsonr(natural_RSA, natural_entropy)
    natural_cor_entropy_RSA = float(natural_cor_entropy_RSA)
    natural_cor_values.append(natural_cor_entropy_RSA)

fig = plt.figure(1, dpi = 400, figsize = (16,6))

correlation_values = [cor_values1, cor_values2, natural_cor_values]
correlation_values_transpose = transpose(correlation_values)
(m,n) = correlation_values_transpose.shape
#rcParams['lines.linewidth'] = 2
ax = axes([0.066, 0.115, 0.43, 0.85])

#text(-0.37, 0.6, "A", fontweight = 'bold', ha = 'center', va = 'center', fontsize = 20)
'''
b1 = boxplot(correlation_values, sym = 'ko')
			
			natural_proteins = file #Open the files with results
			designed_proteins_00 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.0)  + ".dat"
			designed_proteins_01 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.1)  + ".dat"
			designed_proteins_03 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.3)  + ".dat"
			designed_proteins_06 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.6)  + ".dat"
			designed_proteins_09 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.9)  + ".dat"
			designed_proteins_12 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(1.2)  + ".dat"
			designed_proteins_003 = "align_data_array_" + pdb_id + "_" + chain_id + "_" + str(0.03)  + ".dat"
			
			split_natural_1 = "align_natural_sample1_data_array_" + pdb_id + "_" + chain_id + ".dat"
			split_natural_2 = "align_natural_sample2_data_array_" + pdb_id + "_" + chain_id + ".dat"
			
			#Calculates all of the data for comparison (ex. entropy)
			natural_distribution = analysis_functions.get_AA_distribution(natural_proteins)     
			natural_entropy = analysis_functions.get_native_entropy(natural_proteins)
			natural_entropy_array = analysis_functions.make_array(natural_entropy) 
			natural_RSA = analysis_functions.get_RSA_Values(natural_proteins)
			natural_RSA_array = analysis_functions.make_array(natural_RSA)
			natural_mean_RSA_values.append(mean(natural_RSA_array)) 
			natural_mean_entropy_values.append(mean(natural_entropy_array)) 
			
			designed_distribution_00 = analysis_functions.get_AA_distribution(designed_proteins_00)        
			designed_entropy_00 = analysis_functions.get_native_entropy(designed_proteins_00)
			designed_entropy_array_00 = analysis_functions.make_array(designed_entropy_00) 
			designed_RSA_00 = analysis_functions.get_RSA_Values(designed_proteins_00)
			designed_RSA_array_00 = analysis_functions.make_array(designed_RSA_00)
			designed_mean_RSA_values_00.append(mean(designed_RSA_array_00)) 
			designed_mean_entropy_values_00.append(mean(designed_entropy_array_00))