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

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 />

neb = NEB(images, parallel=True)<br />

neb.interpolate()<br />

qn = BFGS(neb)<br />

if rank % (size // 3) == 0:<br />

traj = PickleTrajectory(’neb%d.traj’ % j, ’w’, images[1 + j], master=True)<br />

qn.attach(traj)<br />

qn.run(fmax=0.05)<br />

6.2.11 Diffusion of gold atom on Al(100) surface (constraint)<br />

In this tutorial, we will calculate the energy barrier that was found using the NEB method in the Diffusion of gold<br />

atom on Al(100) surface (NEB) tutorial. Here, we use a siple FixedPlane constraint that forces the Au atom to<br />

relax in the yz-plane only:<br />

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

from ase.constraints import FixAtoms, FixedPlane<br />

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

from ase.optimize import QuasiNewton<br />

# 2x2-Al(001) surface with 3 layers and an<br />

# Au atom adsorbed in a hollow site:<br />

slab = fcc100(’Al’, size=(2, 2, 3))<br />

add_adsorbate(slab, ’Au’, 1.7, ’hollow’)<br />

slab.center(axis=2, vacuum=4.0)<br />

# Make sure the structure is correct:<br />

#view(slab)<br />

# Fix second and third layers:<br />

mask = [atom.tag > 1 for atom in slab]<br />

#print mask<br />

fixlayers = FixAtoms(mask=mask)<br />

# Constrain the last atom (Au atom) to move only in the yz-plane:<br />

plane = FixedPlane(-1, (1, 0, 0))<br />

slab.set_constraint([fixlayers, plane])<br />

# Use EMT potential:<br />

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

# Initial state:<br />

for i in range(5):<br />

qn = QuasiNewton(slab, trajectory=’mep%d.traj’ % i)<br />

qn.run(fmax=0.05)<br />

slab[-1].x += slab.get_cell()[0, 0] / 8<br />

The result can be analysed with the command ag mep?.traj -n -1 (choose Tools → NEB). The barrier is found to<br />

be 0.35 eV - exactly as in the NEB tutorial.<br />

Here is a side-view of the path (unit cell repeated twice):<br />

6.2. <strong>ASE</strong> 37

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

Saved successfully!

Ooh no, something went wrong!