Single trajectory¶
-
KMC_Run.
append_trajectories
(run1, run2)[source]¶ Take two trajectories and append them together.
Parameters: - run1 – First trajectory - a kmc_traj object
- run2 – Second trajectory - a kmc_traj object which continues the simulation where the first one terminated
Returns: A kmc_traj object that has the trajectories appended
-
class
KMC_Run.
kmc_traj
(path=None)[source]¶ Handles a single Zacros trajectory.
-
AdjustPreExponentials
(delta_sdf)[source]¶ Adjust the pre-exponential ratios of all elementary reactions
Parameters: delta_sdf – list or vector of ratios to apply. Must have length equal to the number of reactions.
-
LatticeMovie
(include_neighbor_lines=False, spec_color_list=['b', 'g', 'r', 'c', 'm', 'y', 'k'])[source]¶ Create a subfolder called lattice_frames Create a .png file with a picture of a lattice for every snapshot in history_output.txt
include_neighbor_lines : If true, will draw lines between neighboring lattice sites (takes more time) spec_color_list : List of colors to use for different species, will cycle through if there are more species than colors
-
PlotElemStepFreqs
(window=[0.0, 1.0], time_norm=False, site_norm=1)[source]¶ Plot a bar graph of elementary step frequencies versus time - output in elem_step_freqs.png in the directory with the Zacros run
Parameters: - window – Beginning and ending fraction of the trajectory over which to count steps.
- time_norm – True - normalizes event frequencies by time. False - Plots total event firings.
- site_norm – Normalization factor for event frequencies.
-
PlotGasSpecVsTime
()[source]¶ Plot gas phase species profiles versus time - output in gas_spec_vs_time.png in the directory with the Zacros run
-
PlotSurfSpecVsTime
(site_norm=1)[source]¶ Plot surface species profiles versus time - output in surf_spec_vs_time.png in the directory with the Zacros run
Parameters: site_norm – Normalizing factor for the coverages (e.g. nubmer of top sites). Default value if 1.
-
ReadAllOutput
(build_lattice=False)[source]¶ Read all Zacros output files
- :param build_lattice : True - builds a Lattice object
- False - reads lattice_output.txt as text only
-
Run_sim
()[source]¶ Call the Zacros executable and run the simulation. self.exe_file must have been initialized with the full file path of the Zacros executable.
-
time_avg_covs
(t1=0, t2=None)[source]¶ Time average surface species counts
Parameters: - t1 – Start time for time averaging interval
- t2 – End time for time averaging interval, if left as None it will be set as the final time
-
time_search
(t)[source]¶ Given a time, look up the index of the smallest time greater than or equal to that time
Parameters: t – time to search for
-
time_search_interp
(t)[source]¶ Get the information necessary to linearly interpolate data between time points
Parameters: t – Time at which you want to compute interpolated data Returns: A 2-item list of 2-items each in the order: Index of time point less than or equal to t, index of time point greater than or equal to t weighting factor for lower point weighting factor for higher point
-