def pMccEner(num_prt, num_lig, num_temp): p_coefficients = [] for prt_conf in range(num_prt): for lig_conf in range(num_lig): for tmp_conf in range(num_temp): rep_num = num_temp * num_lig * prt_conf + num_lig * tmp_conf + lig_conf temp = temps[tmp_conf] # print "analyze replica # %d with temperature %f" % (rep_num, temp) p_coefficient = pearsonrMccEner(rep_num, h5_path_regx)[0] # print p_coefficient p_coefficients.append(p_coefficient) return p_coefficients