def buildPdf(condi_dist_fn, sub_path): h5_path = 'all_decoy.h5' ener_matx = loadEnerMatx(h5_path, sub_path) condi_dist = nb.getConditionalDist(ener_matx, dist_names) nb.saveCondiDistribution(condi_dist, condi_dist_fn) print condi_dist
return f[mcc_diff_path][()] if __name__ == "__main__": ################################################################################ # print plain text file # nb_ff = NB_ff('04ff_all_decoy.h5') # nb_ff.printEner() # nb_ff = NB_ff('08ff_all_decoy.h5') # nb_ff.printEner() # nb_ff = NB_ff('06ff_all_decoy.h5') # nb_ff.printEner() ################################################################################ # build pdf import sys # matrix_fn = sys.argv[1] matrix_fn = '08ff_high_decoy.mat' # matrix_fn = '04ff_low_decoy.mat' condi_dist_fn = matrix_fn.split('.')[0] + '.dist' matrix = np.loadtxt(matrix_fn, delimiter=' ') condi_dist = nb.getConditionalDist(matrix, dist_names) nb.saveCondiDistribution(condi_dist, condi_dist_fn) condi_dist = nb.loadCondiDistribution(condi_dist_fn) print condi_dist