catmap.cli package

Submodules

catmap.cli.kmc_translation module

class catmap.cli.kmc_translation.MemoizeMutable(fn)[source]

Memoize(fn) - an instance which acts like fn but memoizes its arguments Will work on functions with mutable arguments (slower than Memoize)

from http://code.activestate.com/recipes/52201-memoizing-cacheing-function-return-values/

__call__(*args)[source]
__init__(fn)[source]
__module__ = 'catmap.cli.kmc_translation'
catmap.cli.kmc_translation.add_mft_processes(pt)[source]
catmap.cli.kmc_translation.add_one_particle_processes(pt)[source]

In order to sample kinetics ultra low coverage regimes we modify the kMC algorithm such that we avoid the completely empty state since this empty state would add a prohobitive burden to the total number of steps required. Thus special rules in base.update_accum_rate avoid the empty state. This however leads to a distortion of the kinetics since the system is never found find the empty state. E.g. imagine particle A adsorbs. The no-empty-state-rule means that at least one other particle is already on the surface, e.g. A or B. This will lead to a faster rate of reactions A-A or A-B respectively.

Therefore this methods splits processes into two processes: one that replaces the old one-particle state and one that adds to one-particle state. The first describes the situation that the other particle desorbed some time before (most often the case) and the latter is the (rare) case that two-particle are actually on the surface.

catmap.cli.kmc_translation.catmap2kmos(cm_model, unit_cell=None, site_positions=None, diffusion_barriers=None, species_representations=None, surface_representation='None', model_name='CatMAP_translated_model', options=None, mft_processes=True)[source]
catmap.cli.kmc_translation.get_canonical_intermediates(step, site_names=None, empty_species='empty')[source]
catmap.cli.kmc_translation.get_color(string)[source]

Generate a color from any string using the hexdigest of the md5 hash

catmap.cli.kmc_translation.get_stoichiometries(pt)[source]
catmap.cli.kmc_translation.get_stoichiometry(pt, process)[source]
catmap.cli.kmc_translation.itertools_product_no_repetition(*vectors)[source]
catmap.cli.kmc_translation.stoichiometry_get_multiple(stoichA, stoichB)[source]
catmap.cli.kmc_translation.stoichiometry_is_multiple(stoichA, stoichB)[source]
catmap.cli.kmc_translation.sum_edge_length_metric(sites)[source]
catmap.cli.kmc_translation.sum_edge_length_squared_metric(sites)[source]
catmap.cli.kmc_translation.surface_intermediates_to_process_names(initial_intermediates, final_intermediates)[source]

Canonical function that translates a CatMAP reaction expression (rxn_expression) into a unique string that can serve as a variable or column name

catmap.cli.kmc_translation.translate_model_file(mkm_filename, options)[source]

catmap.cli.kmc_runner module

Module contents

catmap.cli.get_options(args=None, get_parser=False)[source]
catmap.cli.main(args=None)[source]

The CLI main entry point function.

The optional argument args, can be used to directly supply command line argument like

$ catmap <args>

otherwise args will be taken from STDIN.

catmap.cli.match_keys(arg, usage, parser)[source]

Try to match part of a command against the set of commands from usage. Throws an error if not successful.

catmap.cli.sh(banner)[source]

Wrapper around interactive ipython shell that factors out ipython version depencies.