Multiple trajectories

class Replicates.Replicates[source]

Performs statistical data analysis for muliple kMC trajectories with the same input, but different random seeds and possibly different initial states

AverageRuns()[source]

Average multiple trajectories

BuildJobFiles(init_states=None)[source]

Builds folders with Zacros input files. Each trajectory is assigned a different random seed. :param init_states: List of intial states for each trajectory.

Compute_batch_data(n_batches_total=1000)[source]

Compute varaibles needed for the analysis, based on the input

Compute_rate(include_ACF_CI=True)[source]

Use batch means to compute the reaction rate (and confidence interval) Also compute the autocorrelation function (ACF) (and confidence interval)

Params include_ACF_CI:
 Whether to use statistical bootstrapping to compute confidence intervals. This takes some CPU time.
Returns:The rate
PerformSA(delta_t=None, ergodic=True, dp_per_bin=10)[source]

Perform likelihood ratio sensitivity analysis with a combination of time and trajectory averaging

Parameters:
  • delta_t – Size of the time window used for likelihood ratio sensitivity analysis. By default, it is the size of a batch.
  • ergodic
    True - average the rate over the entire time interval (centered ergodic likelihood ratio)
    False - use the rate at the end of the time interval (centered likelihood ratio)

    Data between sample points is estimated with linear interpolation

PlotSensitivities(NSC_cut=0.05)[source]

Plot the results of sensitivity analysis

NSC_cut : Reactions with normalized sensitivity coefficients (NSC) below this limit will not be plotted

ReadMultipleRuns()[source]

Read all Zacros jobs in a given folder

RunAllJobs_serial()[source]

Runs all trajectories in serial

RunAllTrajectories_JobArray(max_cores=100, server='Squidward', job_name='zacros_JA')[source]

Runs a job array on Squidward or Farber Writes the .qs file with certain parameters changed Then, it submits it to the gridengine and waits for them to finish :param max_cores: Maximum number of cores to use :param server: Name of the server. Squidward and Farber are supported. :param job_name: Name of the job to put in the submit file.

Set_kmc_template(kmc_temp)[source]

Set the KMC trajectory template as well as other useful variables

WriteSA_output()[source]

Write the results of sensitivity analysis into a SA_output.txt

Replicates.append_replicates(batch1, batch2)[source]

Append two sets of trajectories

Returns:Replicates object with all trajectories appended