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

#from <strong>ASE</strong>.Dynamics.MDMin import MDMin<br />

#from <strong>ASE</strong>.Trajectories.NetCDFTrajectory import NetCDFTrajectory<br />

#from <strong>ASE</strong>.IO.NetCDF import ReadNetCDF<br />

slab = read(’2N.traj’)<br />

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

constraint = FixBondLength(-2, -1)<br />

#mask=[atom.symbol != ’N’ for atom in slab])<br />

#molecule = Subset(slab, indices=[-2, -1])<br />

# Create a trajectory for the dissociation path:<br />

path = PickleTrajectory(’association.traj’, slab)<br />

# Put the initial state in the trajectory:<br />

path.write()<br />

# From now on, we relax the molecule under the constraint of fixed<br />

# bond length:<br />

#fixed = FixBondLength(molecule, 0, 1)<br />

#relax = MDMin(fixed, dt=0.08, fmax=0.05)<br />

relax = QuasiNewton(slab)<br />

d = linalg.norm(slab[-2].position - slab[-1].position)<br />

#d = fixed.GetBondLength()<br />

delta = 0.1<br />

e0 = slab.get_potential_energy()<br />

print d, 0.0<br />

while d > 1.10:<br />

d -= delta<br />

fixed.SetBondLength(d, fix=’first’)<br />

# XXX<br />

raise NotImplementedError<br />

relax.run(fmax=.05)<br />

path.write()<br />

print d, slab.GetPotentialEnergy() - e0<br />

6.2.10 Diffusion of gold atom on Al(100) surface (NEB)<br />

First, set up the initial and final states:<br />

34 Chapter 6. Tutorials

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

Saved successfully!

Ooh no, something went wrong!