#list of files that contain L vs RSA data
    data = []

    #list of sequences with missing RSA values
    bad_list = []

    #Get all the RSA values using DSSP
    seq_data = af.get_noah_RSA_values(pdb_id, chain_id)	
    RSA = seq_data[1] #Get the RSA values
    RSA_dict = seq_data[2] #Get the dict mapping positions to RSA
    new_RSA = af.get_cut_RSA_values(pdb_id, RSA, RSA_dict)

    index = 0
    #Arrays full of the designed and natural sequences
    natural_data_arr = cut_natural_sequences
    designed_data_arr = af.get_cut_designed_sequences(designed_file)
 
    fpW_natural = open("results_array_natural_" + pdb_id + "_" + chain_id + ".csv","w")
    fpW_designed = open("results_array_" + pdb_id + "_" + chain_id + "_" + "soft" + ".csv","w")

    #write the RSA values:
    fpW_natural.write(af.dump_csv_line(new_RSA))
    fpW_designed.write(af.dump_csv_line(new_RSA))

    if(len(new_RSA) != len(natural_data_arr[0].strip())):
        print "Error !!!!!!!!!"
        #print data_arr[0].strip()
        bad_list.append(natural_pdb_file_title)

    if(len(new_RSA) != len(natural_data_arr[0].strip())):
        print "Error !!!!!!!!!"
        #list of files that contain L vs RSA data
        data = []

        #list of sequences with missing RSA values
        bad_list = []

        #Get all the RSA values using DSSP
        seq_data = af.get_noah_RSA_values(pdb_id, chain_id)
        RSAValues = []	
        RSA = seq_data[1]
        RSA_dict = seq_data[2]
        new_RSA = af.get_cut_RSA_values(pdb_id, RSA, RSA_dict) #Gets the RSA values that correspond to the correct residues
        
        index = 0
        natural_data_arr = cut_natural_sequences        
        designed_data_arr = af.get_cut_designed_sequences(designed_file) #Gets the correct designed residues 

        #filepointer for the partial result
        fpW_natural = open("results_array_natural_" + pdb_id + "_" + chain_id + ".csv","w")
        fpW_designed = open("results_array_" + pdb_id + "_" + chain_id + "_" + temp + ".csv","w")

        #write the RSA values:
        fpW_natural.write(af.dump_csv_line(new_RSA))
        fpW_designed.write(af.dump_csv_line(new_RSA))

        if(len(new_RSA) != len(natural_data_arr[0].strip())):
            print "Error !!!!!!!!!"
            #print data_arr[0].strip()
            bad_list.append(natural_pdb_file_title)

        if(len(new_RSA) != len(natural_data_arr[0].strip())):