def parfunc(x,ntraj): kaoi = x[0] nCi = x[1] models.append(LSCmodel.LSCModel(nL,nCi)) dt = models[-1].dt basedir = "./boxsize_5_5_5/run_bulk_nL{}_nC{}/trajectory_{}".format(nL,nCi,traj_number) dissocdatafile = basedir+"/accepted_dissociation_moves.txt" unbounddata_template = basedir+"/unbound_simulations_fine_output/unbound_reaction_event_density_nL_{}_*.npy".format(nL) # Load reaction probability data for each timepoint for each trajectory unbound_data_zipfile = "./boxsize_5_5_5/run_bulk_nL{}_nC{}".format(nL,nCi)+"/unbound_output_combined.zip" coarse = 10 tstart = pytime.time() #out = qan.process_quasireversible_simulations(kaoi,kdo,dt,dissocdatafile,unbound_data_files,coarse) out = qan.process_quasireversible_simulations(kaoi,kdo,dt,dissocdatafile,unbound_data_zipfile,coarse, zipped=True,target_surv_prob=target_surv_prob,nsteps=nsteps,ntraj=ntraj) print("Processed run nC = {}, kao = {}, ntraj = {} in {:.2f} min".format(nCi,kaoi,ntraj,(pytime.time()-tstart)/60.)) # Save output to .npz file for plotting out['nC'] = nCi out['kao'] = kaoi out['kdo'] = kdo if isinstance(ntraj,tuple): outfilename = "./analyzed_data/analysis_out_nC_{}_kao_{}_kdo_{}_targetprob_{}_nsteps_{}_ntraj_{}_{}.npz".format( nCi,kaoi,kdo,target_surv_prob,nsteps,ntraj[1]-ntraj[0],ntraj[0]) else: outfilename = "./analyzed_data/analysis_out_nC_{}_kao_{}_kdo_{}_targetprob_{}_nsteps_{}_ntraj_{}.npz".format( nCi,kaoi,kdo,target_surv_prob,nsteps,ntraj) np.savez(outfilename,out) return 1
def parfunc(x): kaoi = x[0] nCi = x[1] models.append(LSCmodel.LSCModel(nL, nCi)) dt = models[-1].dt basedir = "./rundir/run_bulk_nL{}_nC{}/trajectory_{}".format( nL, nCi, traj_number) dissocdatafile = basedir + "/accepted_dissociation_moves.txt" unbounddata_template = basedir + "/unbound_simulations_fine_output/unbound_reaction_event_density_nL_{}_*.npy".format( nL) # Load reaction probability data for each timepoint for each trajectory unbound_data_files = [] for datai in glob.glob(unbounddata_template): unbound_data_files.append(datai) unbound_data_zipfile = basedir + "/unbound_output.zip" coarse = 10 target_surv_prob = 1e-4 # where to extrapolate to with exponential function tstart = pytime.time() #out = qan.process_quasireversible_simulations(kaoi,kdo,dt,dissocdatafile,unbound_data_files,coarse) out = qan.process_quasireversible_simulations( kaoi, kdo, dt, dissocdatafile, unbound_data_zipfile, coarsening=coarse, zipped=True, target_surv_prob=target_surv_prob) print("Processed run nC = {}, kao = {} in {:.2f} min".format( nCi, kaoi, (pytime.time() - tstart) / 60.)) return out
def parfunc(kaoi): return qan.process_quasireversible_simulations(kaoi,kdo,dt,dissoc_data_file,unbound_data_files)