18.11.2012 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />

or:<br />

import stuff as st<br />

print st.f(1, 2)<br />

print st.C(1).m(2)<br />

Python will look for stuff.py in these directories:<br />

1. current working directory<br />

2. directories listed in your PYTHONPATH<br />

3. Python’s own system directory (typically /usr/lib/python2.5)<br />

and import the first one found.<br />

6.2 <strong>ASE</strong><br />

Most of the tutorials will use the EMT potential, but any other Calculator could be plugged in instead.<br />

6.2.1 Introduction: Nitrogen on copper<br />

This section gives a quick (and incomplete) overview of what <strong>ASE</strong> can do.<br />

We will calculate the adsorption energy of a nitrogen molecule on a copper surface. This is done by calculating<br />

the total energy for the isolated slab and for the isolated molecule. The adsorbate is then added to the slab and<br />

relaxed, and the total energy for this composite system is calculated. The adsorption energy is obtained as the sum<br />

of the isolated energies minus the energy of the composite system.<br />

Here is a picture of the system after the relaxation:<br />

Please have a look at the following script doc/tutorials/N2Cu.py:<br />

from ase import Atoms<br />

from ase.visualize import view<br />

from ase.calculators.emt import EMT<br />

from ase.constraints import FixAtoms<br />

from ase.optimize import QuasiNewton<br />

from ase.lattice.surface import fcc111,add_adsorbate<br />

h = 1.85<br />

d = 1.10<br />

slab = fcc111(’Cu’, size=(4,4,2), vacuum=10.0)<br />

slab.set_calculator(EMT())<br />

18 Chapter 6. Tutorials

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!