ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />
7.9.5 Surfaces<br />
Common surfaces<br />
A number of utility functions are provided to set up the most common surfaces, to add vacuum layers, and to add<br />
adsorbates to a surface. In general, all surfaces can be set up with the modules described in the section General<br />
crystal structures and surfaces, but these utility functions make common tasks easier.<br />
Example<br />
To setup an Al(111) surface with a hydrogen atom adsorbed in an on-top position:<br />
from ase.lattice.surface import *<br />
slab = fcc111(’Al’, size=(2,2,3), vacuum=10.0)<br />
This will produce a slab 2x2x3 times the minimal possible size, with a (111) surface in the z direction. A 10 Å<br />
vacuum layer is added on each side.<br />
To set up the same surface with with a hydrogen atom adsorbed in an on-top position 1.5 Å above the top layer:<br />
from ase.lattice.surface import *<br />
slab = fcc111(’Al’, size=(2,2,3))<br />
add_adsorbate(slab, ’H’, 1.5, ’ontop’)<br />
slab.center(vacuum=10.0, axis=2)<br />
Note that in this case is is probably not meaningful to use the vacuum keyword to fcc111, as we want to leave 10<br />
Å of vacuum after the adsorbate has been added. Instead, the center() method of the Atoms is used to add<br />
the vacuum and center the system.<br />
The atoms in the slab will have tags set to the layer number: First layer atoms will have tag=1, second layer atoms<br />
will have tag=2, and so on. Addsorbates get tag=0:<br />
>>> print atoms.get_tags()<br />
[3 3 3 3 2 2 2 2 1 1 1 1 0]<br />
This can be useful for setting up constraints (see Diffusion of gold atom on Al(100) surface (NEB)).<br />
Utility functions for setting up surfaces<br />
All the functions setting up surfaces take the same arguments.<br />
symbol: The chemical symbol of the element to use.<br />
size: A tuple giving the system size in units of the minimal unit cell.<br />
a: (optional) The lattice constant. If specified, it overrides the expermental lattice constant of the element. Must<br />
be specified if setting up a crystal structure different from the one found in nature.<br />
c: (optional) Extra HCP lattice constant. If specified, it overrides the expermental lattice constant of the element.<br />
Can be specified if setting up a crystal structure different from the one found in nature and an ideal c/a ratio<br />
is not wanted (c/a = (8/3) 1/3 ).<br />
vacuum: The thickness of the vacuum layer. The specified amount of vacuum appears on both sides of the slab.<br />
Default value is None, meaning not to add any vacuum. In that case a “vacuum” layer equal to the interlayer<br />
spacing will be present on the upper surface of the slab. Specify vacuum=0.0 to remove it.<br />
orthogonal: (optional, not supported by all functions). If specified and true, forces the creation of a unit cell with<br />
orthogonal basis vectors. If the default is such a unit cell, this argument is not supported.<br />
Each function defines a number of standard adsorbtion sites that can later be used when adding an adsorbate with<br />
lattice.surface.add_adsorbate().<br />
86 Chapter 7. Documentation for modules in <strong>ASE</strong>