Installation

The kinetics modeling package is currently in alpha-testing and is available only via SVN. In order to access the package you will need the following dependencies:

svn (for installing and updating)
python (version 2.5 or greater)
python modules:
*numpy
*scipy
*mpmath
*ase
*gmpy (optional - gives 2-3x speedup for multiple precision calculations)

You can then install the module via svn with the following command in the terminal:

svn co svn://suncatls1.slac.stanford.edu/kinetics/trunk <packagename>

where <packagename> is the name of the local directory where the module will be stored. After installing you can get the most current version of the package by going into the <packagename> directory and typing:

svn update

As the package is currently under development, some issues and bugs are to be expected. If you are interested in working on the module as a developer please contact Andrew Medford (ajmedfor@stanford.edu) to obtain read/write access.

Documentation

Descriptor based analysis is a powerful tool for understanding the trends across various catalysts. In general, the rate of a reaction over a given catalyst is a function of many parameters - reaction energies, activation barriers, thermodynamic conditions, etc. The high dimensionality of this problem makes it very difficult and expensive to solve completely and even a full solution would not give much insight into the rational design of new catalysts. The descriptor based approach seeks to determine a few "descriptors" upon which the other parameters are dependent. By doing this it is possible to reduce the dimensionality of the problem - preferably to 1 or 2 descriptors - thus greatly reducing computational efforts and simultaneously increasing the understanding of trends in catalysis. 

The "kinetics" Python module seeks to standardize and automate many of the mathematical routines necessary to move from "descriptor space" to reaction rates. The module is designed to be both flexible and powerful. A "reaction model" can be fully defined by a configuration file, thus no new programming is necessary to change the complexity or assumptions of a model. Furthermore, various steps in the process of moving from descriptors to reaction rates have been abstracted into separate Python classes, making it easy to change the methods used or add new functionality. The downside of this approach is that it makes the code more complex. The purpose of this guide is to explain the general structure of the code, as well as its specific functions and how to begin using it. 

Useful Definitions: (Note symbols may not appear in Safari/IE)

Code Structure: 

The Parser class serves to extend the "model definition" file by reading in various quantities from an "input file". Technically the use of a parser is optional, but in practice it is extremely helpful for reading in common data such as adsorption energies or vibrational frequencies rather than re-typing them for every reaction model. 

The process of creating a "descriptor map" is abstracted into three general processes, which are handled by the following classes within the kinetics module: 

Scaler: Projects descriptor space into parameter space: ?? ? ? 

Solver: Maps parameter space into reaction rates: ? ? r? 

Mapper: Moves through descriptor space. This becomes important for practical reasons since it is often necessary to use a solution at one point in descriptor space as an initial guess for a nearby point. 

The ThermoCorrections class is responsible for applying thermodynamic corrections to the electronic energies which are used as direct inputs. This includes the contributions of entropy/enthalpy and zero-point energy due to temperature, pressure, or other thermodynamic variables. There are also a variety of analysis classes which allow for automated analysis and visualization of the reaction model. These include the RateAnalysis which creates "volcano plot" (descriptor maps of the rate), CoverageAnalysis which creates descriptor maps of the coverages of various intermediates, ScalingAnalysis which can give a visual representation of how well the scaler projects descriptor space to parameter space, and several other useful tools.

Using the code: 

Some examples can be found in the "demos" folder, and these should explain the syntax necessary and serve as a good starting point. The currently implemented features are also briefly described below in order to allow a better understanding of the demos and creating original reaction model definitions. 

Using the kinetics module to conduct a descriptor analysis requires (at least) 2 files: the "model definition" which defines the reaction model, as well as another script to initialize the ReactionModel class and conduct analyses. The "model definition" is generally a static file (i.e. it is not a program) while the submission script will be an actual python program. Model definition files typically end in ".mkm" for micro-kinetic model (although this is not required) while submission scripts end in .py since they are just python scripts. In addition it is very useful to also have an "input file" which contains the raw data about the energetics of the reaction model. An example of such an input file is provided in "published_data.txt" in the demos folder. 

Each class described in the Code Structure section will require some specialized parameters. Some of these parameters are common to all variants of these classes, while others are specific to certain implementations. The possible inputs for the currently implemented variants of each class are listed below. Required attributes are underlined