datprep.store_compounds(results, res_file) print("results were successfully stored to ", res_file) if do_plot_derivatives: yvals = [] norms_nuc = [] for i in range(5): resfile = database + namelist[i] + "der_results.pickle" res_list = datprep.read_compounds(resfile) xlist, ylist, results = \ pltder.prepresults(results = res_list,\ rep = namelist[i],\ repno = i,\ yval = "perc",\ with_whichd = True) yvals.extend(ylist) for i in ylist: norms_nuc.append(xlist) print(yvals) pltder.plot_percentage_zeroEV([1,2], yvals, title = "4 C Atoms",\ savetofile = "./Images/Final/BOB_conformations.png", oneplot = False,\ representations = [0,1,2,3,4],\ xaxis_title = "Compound",\ Include_Title = False,\ BOB = True)
plt.xlabel(xtitle) plt.ylabel(ytitle) fig.subplots_adjust(top=0.92, bottom = 0.1, left = 0.12, right = 0.97) for i in representations: repro = reprolist[i] filename = results_file[i] if i == 0: results = datprep2.read_compounds(filename) #get xdata and ydata with labels (ydatalist[i][1] stores labels) xdata, ydata, newresults = prepresults(results, rep = repro,\ dwhich = which_d, repno = i,\ norm = xnorm, yval = yvalues,\ with_whichd = False) #datprep.store_compounds(newresults, partialfilename) for yd in ydata: ax.scatter(xdata, yd[0], c = colorlist[i], label = repro) del(xdata) del(ydata) del(newresults) del(results) else: j = 0 #important so only one label is displayed unsrt_numbers = ["100-120", "120-140", "140-160", "160-180", "180-200",\ "220-240", "240-260", "260-280", "280-300",\
xdatalist = [] for i in representations: repro = reprolist[i] #print("representation:", repro) #print("len ydatalist:", len(ydatalist)) filename = results_file[i] if i < 2: #repro is pickled in one file results = datprep.read_compounds(filename) #get xdata and ydata with labels (ydatalist[i][1] stores labels) xdata, ydata, newresults = prepresults(results, rep = repro,\ dwhich = which_d, repno = i,\ norm = xnorm, yval = yvalues) xdatalist.append(xdata) ydatalist.extend(ydata) else: #for BOB, EVOM and OM results were stored in files containing 100 compounds each j = 0 #collect and append numbers to one array, to later merge to one dataset in yaxis fullydata = [] fullxdata = [] ydatalabel = "" for k in [100, 200, 300, 400, 500, 600, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900,\