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

printput: Basis input ----------------------------------------------<br />

Tip 2: You can look at the shape of the orbitals by plotting the contents of the ORB* files generated by SIESTA.<br />

Tip 3: You will find a lot of information on the run in the .txt output file<br />

Tip 4: In ag you can select View → VMD to start the VMD viewer. There you can change the atom representation<br />

to what you feel is more convenient. Do that by selecting Graphics → Representations in the top bar.<br />

Tip 5: SIESTA will store basis functions in ORB.* files. These files can be plotted using the xmgrace command<br />

on the GBAR like this:<br />

$ xmgrace ORB.S1.1.O ORB.S2.1.O<br />

Siesta 2: Molecular Dynamics<br />

This exercise is intended to illustrate a Molecular Dynamics run with the SIESTA calculator. The system is a<br />

Si(001) surface, in the 2x1 reconstruction with asymmetric dimers. The simulation cell contains two dimers. An<br />

H2 molecule approaches the surface, above one of the dimers, and dissociates, ending up with a H atom bonded<br />

to each of the Si atoms in the dimer (and thus leading to a symmetric dimer). You can get the xyz file with the<br />

initial geometry doc/exercises/siesta2/geom.xyz.<br />

#!/usr/bin/env python<br />

from ase.io import read<br />

from ase.constraints import FixAtoms<br />

from ase.calculators.siesta import Siesta<br />

from ase.md import VelocityVerlet<br />

from ase import units<br />

# Read in the geometry from a xyz file, set the cell, boundary conditions and center<br />

atoms = read(’geom.xyz’)<br />

atoms.set_cell([7.66348,7.66348,7.66348*2])<br />

atoms.set_pbc((1,1,1))<br />

atoms.center()<br />

# Set initial velocities for hydrogen atoms along the z-direction<br />

p = atoms.get_momenta()<br />

p[0,2]= -1.5<br />

p[1,2]= -1.5<br />

atoms.set_momenta(p)<br />

# Keep some atoms fixed during the simulation<br />

atoms.set_constraint(FixAtoms(indices=range(18,38)))<br />

# Set the calculator and attach it to the system<br />

calc = Siesta(’si001+h2’,basis=’SZ’,xc=’PBE’,meshcutoff=50*units.Ry)<br />

calc.set_fdf(’PAO.EnergyShift’, 0.25 * units.eV)<br />

calc.set_fdf(’PAO.SplitNorm’, 0.15)<br />

atoms.set_calculator(calc)<br />

# Set the VelocityVerlet algorithm and run it<br />

dyn = VelocityVerlet(atoms,dt=1.0 * units.fs,trajectory=’si001+h2.traj’)<br />

dyn.run(steps=100)<br />

Note that both H atoms are given an initial velocity towards the surface through the lines:<br />

p = atoms.get_momenta()<br />

p[0,2]= -1.5<br />

p[1,2]= -1.5<br />

atoms.set_momenta(p)<br />

Run the program, and check the results. You can visualize the dynamics using the trajectory file with the help of<br />

the <strong>ASE</strong> gui. For example you can visualize the behaviour of the potential and total energies during the dynamics<br />

50 Chapter 6. Tutorials

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

Saved successfully!

Ooh no, something went wrong!