Hello all,
I am interested in learning how to calculate converged turn over frequencies for surface processes (adsorption, desorption, reaction). It seems like the most sensible place to start is with the "MyFirstSnapshots" example. Unfortunately, this example is a bit confusing. How correct are my notes below?
The build file make sense and is very normal. The only new feature is the process entry tof_count parameter of add_process. Apparently this accepts a dictionary. In this specific case, there is only one entry in this dictionary, the key is the same as the parent process name, and the dictionary value is 1. Does the key need to the be same as the process name. I assume the value is a weighting factor that is normally set to 1. What is the practical value of using a dictionary here?
Moving into the local_smart directory I see 5 groups:
1.) a README
2.) a kmc_settings.py and corresponding pyc
3.) a pickle folder
4.) a group of files with a root "runfile"
5.) a group of files with a root "MyFirstSnapshots"
First, why do we have both 4 and 5?
Second, we can summarize the README:
Snapshots must import snapshots.py (has 4 important functions) and snapshots_globals.py (gives access but only modify "write_output," "parameters_of_interest," and "simulation_name").
The four files are create_headers(), do_snapshots_time(), do_snapshots(), and create_log()
Why is there a do_snapshots_time and a do_snapshots? Practically speaking, when would you want to use one over the other?
create_log output can be disabled by the global write_output. Why would you do this?
What is the practical value of these log files? The runfile.py has a comment that one might want to run snapshots but turn off writing. Why? Is this to recording data that has been relaxed or propagated to the steady state?
From the runfile.py, it seems the most basic use of snapshots can be accomplished by setting the parameters_of_interest global, running create_headers, running do_shapshots, and running create_log(). The comments offer dump_config() between snapshots if desired: what does the dump config have that the snapshot doesn't? The comments suggest that it may be useful to access the follow arrays/lists between snapshots:
sg.occ_header_array
sg.TOF_data_list
sg.occ_data_list
sg.last_snapshot_outputs
sg.snapshot_output_headers
isn't this data printed to the csv file? Is the idea that you can monitor the progression of the snapshots to know when to terminate the loop?
An alternate runfile demonstrates that you can inspect specific lattice sites between shapshots and alter them with the put command. It prints sg.model.lattice.get_species(<loc>) which returns an index (0 for the first species entry in the xml, 1 for the second etc.) Using put you can mutate what is at this site.
Another alternate runfile demonstrate that you can export a global configuration as a meshgrid matrix and analyze it with a radius parameter and the function get_local_configurations but the example is broken and won't run.
Best,
Eric