Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kmos3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FHI Theory
kmos3
Commits
1a28d405
Commit
1a28d405
authored
9 months ago
by
Martin Deimel
Browse files
Options
Downloads
Patches
Plain Diff
MAINT Update 'proc_syntax.rst'
parent
ee87891d
No related branches found
No related tags found
1 merge request
!288
Rework and update documentation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/source/topic_guides/proc_syntax.rst
+64
-94
64 additions, 94 deletions
doc/source/topic_guides/proc_syntax.rst
with
64 additions
and
94 deletions
doc/source/topic_guides/proc_syntax.rst
+
64
−
94
View file @
1a28d405
.. _proc_mini_language:
.. _proc_mini_language:
The Process Syntax
The Process Syntax
==================
=======
==================
In KMC language a process is uniquely defined by a configuration `before` the process is executed,
a configuration `after` the process is executed, and a rate constant. Here, this model is used to
define a process by giving it a:
In kMC language a process is uniquely defined by a
- ``condition_list``
configuration `before` the process is executed,
- ``action_list``
a configuration `after` the process is executed,
- ``rate_constant``
and a rate constant. Here this model is used to
define a process by giving it a :
- condition_list
As you might guess, each `condition` corresponds to one `before`, and each `action` corresponds to
- action_list
one `after`. In fact, conditions and actions are actually of the same class or data type: each
- rate_constant
condition and action consists of a coordinate and a species which `has to be` or `will be` at the
coordinate. This model of process definition also means that each process in one unit cell has to
be defined explicitly. Typically, on a single crystal surface one will have not only one diffusion
per species, but as many as there are equivalent directions:
- ``species_diffusion_right``
- ``species_diffusion_up``
- ``species_diffusion_left``
- ``species_diffusion_down``
As you might guess, each `condition` corresponds to one
While it may seem like a lot of work to define that many processes, it allows for a very clean and
`before`, and each `action` corresponds to one `after`.
straightforward definition of a process itself. Later you can use geometric measures to abstract
In fact conditions and actions are actually of the same
these cases as you will see further down.
class or data type: each condition and action consists of
a coordinate and a species which has to `be` or `will be` at
the coordinate. This model of process definition also
means that each process in one unit cell has to be
defined explicitly. Typically, on a single crystal
surface one will have not only one diffusion per species, but
as many as there are equivalent directions :
- species_diffusion_right
- species_diffusion_up
- species_diffusion_left
- species_diffusion_down
While it may seem like a lot of work to define that
many processes, it allows for a very clean and straightforward
definition of a process itself. Later you can use
geometric measures to abstract these cases as you will see
further down.
Adsorption
Adsorption
^^^^^^^^^^
^^^^^^^^^^
Let's start with a very simple and basic process: molecular
Let's start with a very simple and basic process: molecular adsorption of a gas phase species,
adsorption of a gas phase species, let call it ``A`` on a
let's call it ``A``, on a surface site. For this we need a species ::
surface site. For this we need a species ::
from kmos3.types import *
from kmos3.types import *
kmc_model = kmos3.create_kmc_model()
kmc_model = kmos3.create_kmc_model()
...
@@ -54,91 +42,73 @@ surface site. For this we need a species ::
...
@@ -54,91 +42,73 @@ surface site. For this we need a species ::
empty = Species(name='empty')
empty = Species(name='empty')
kmc_model.add_species(empty)
kmc_model.add_species(empty)
and the coordinates of a surface site ::
and the coordinate of a surface site ::
layer = Layer(name='default')
layer = Layer(name='default')
kmc_model.add_layer(layer)
kmc_model.add_layer(layer)
layer.sites.append(Site(name='a'))
layer.sites.append(Site(name='a'))
coord = kmc_model.lattice.generate_coord('a.(0,0,0).default')
coord = kmc_model.lattice.generate_coord('a.(0,0,0).default')
which is for now all we need to define an adsorption
which is for now all we need to define an adsorption process ::
process::
adsorption = Process(
name='adsorption_A_a',
adsorption = Process(
condition_list=[Condition(coord=coord
,
name='adsorption_A_a'
,
species='empty')],
condition_list=[Condition(coord=coord,
species='empty')],
action_list=[Action(coord=coord,
action_list=[Action(coord=coord,
species='A')]
species='A')]
)
)
kmc_model.add_process(adsorption)
kmc_model.add_process(adsorption)
Now this wasn't hard, was it?
Now this wasn't hard, was it?
Diffusion
Diffusion
^^^^^^^^^
^^^^^^^^^
Let's move to another example, namely the `diffusion` of
Let's move to another example, namely the `diffusion` of a particle to the next unit cell in the
a particle to the next unit cell in the y-direction.
y-direction. Initially, you need the coordinate of the final site ::
Initially, you need the coordinate of the final site ::
final = kmc_model.lattice.generate_coord('a.(0,1,0).default')
final = kmc_model.lattice.generate_coord('a.(0,1,0).default')
and you are good to go ::
and you are good to go ::
diffusion_up = Process('diffusion_A_up',
diffusion_up = Process(
condition_list=[Condition(coord=coord,
name='diffusion_A_up',
species='A'),
condition_list=[Condition(coord=coord, species='A'),
Condition(coord=final,
Condition(coord=final, species='empty')],
species='empty')],
condition_list=[Condition(coord=coord, species='empty'),
condition_list=[Condition(coord=coord,
Condition(coord=final, species='A')],
species='empty'),
)
Condition(coord=final,
species='A')],
kmc_model.add_process(diffusion_up)
kmc_model.add_process(diffusion_up)
You can complicate this `ad infinitum` but you already know all the elements
You can complicate this ad infinitum but you already know all the elements necessary to define
necessary to define processes.
processes.
Avoid Double Counting
Avoid Double Counting
^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^
Finally a word of warning: `double counting` is a phenomenon
Finally a word of warning: `double counting` is a phenomenon that can arise for certain processes
that can arise for certain processes where there are more
where there are more than one equivalent directions and coordinates. Consider, for example, the
than one equivalent directions and coordinates.
dissociative oxygen adsorption. Novices typically collect all possible directions (e.g., right,
Consider, for example, the dissociative oxygen adsorption.
up, left, down) and then define this process for each direction. However, this approach may be
Novices typically collect all possible directions (e.g. right, up,
incorrect depending on how the rate constant value was defined. If the rate constant represents a
left, down) and then define this process for each direction.
net rate for adsorption/desorption from a pair of sites (from an average or from a single
However, this approach may be incorrect depending on
transition state that bridges two sites), then the right, up, left, down procedures will result in
how the rate constant value was defined.
`double counting`. This is because, for example, ``adsorption_up`` is the same process as
If the rate constant represents a net rate for
``adsorption_down``, just executed from one site above or below. To address this issue, one can
adsorption/desorption from a pair of sites (from an average or
compensate by dividing each adsorption and desorption rate constant by 2. Alternatively, one can
from a single transition state that bridges two sites),
avoid double counting by only defining geometrically equivalent sites once per unit cell: a simple
then the right, up, left, down procedures will result in `double counting`.
trick to achieve this is to only consider processes in the `positive` directions, for example.
This is because, for example, adsorption_up is the same process
as adsorption_down, just executed from one site above or below.
However, it's crucial to recognize that in cases where there are two transition state
To address this issue, one can compensate by dividing each
possibilities (one above each site) due to a heterolytic cleavage transition state, it's essential
adsorption and desorption rate constant by 2.
to acknowledge and include both processes. These processes should not be dismissed as `double
Alternatively, one can avoid double counting by only defining geometrically equivalent
counting` because they represent distinct pathways with unique transition states sharing the same
sites once per unit cell: a simple trick to achieve this is to
reactants and products.
only consider processes in the `positive` directions, for example.
Most rate constants in the literature for dissociative adsorption are defined as an average for
However, it's crucial to recognize that in cases where there are two
the two sites, or involve a single homolytic transition state, and thus most cases of dissociative
transition state possibilities (one above each site) due to a
adsorption should have a single process between up and down as well as between left and right
heterolytic cleavage transition state, it's essential to acknowledge
and include both processes. These processes should not be dismissed
as 'double counting' because they represent distinct pathways with
unique transition states sharing the same reactants and products.
Most rate constants in the literature for dissociative adsorption
are defined as an average for the two sites,
or involve a single homolytic transition state,
and thus most cases of dissociate adsorption should have a single process
between up and down as well as between left and right
(yielding two processes, not four, for a simple cubic system).
(yielding two processes, not four, for a simple cubic system).
Taking It Home
Taking It Home
^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment