Attachment 'N2Ru-Dissociation1.py'

Download

   1 from math import sqrt
   2 
   3 from ASE import Atom, Slab
   4 from ASE.Calculators.PairPotential import PairPotential
   5 from ASE.Filters.Subset import Subset
   6 from ASE.Dynamics.MDMin import MDMin
   7 from ASE.IO.NetCDF import WriteNetCDF
   8 
   9 # Find the initial and final states for the reaction.
  10 
  11 # Set up a (3 x 3) two layer slab of Ru:
  12 a = 2.70
  13 c = 1.59 * a
  14 bulk = Slab([Atom('Ru', (0, 0, 0), tag=1),
  15              Atom('Ru', (1./3, 1./3, -0.5*c), tag=1)],
  16             cell=(1, 1, 1))
  17 bulk.SetUnitCell([(a,     0,              0),
  18                   (a / 2, 3**0.5 * a / 2, 0),
  19                   (0,     0,              1)])
  20 slab = bulk.Repeat((4, 4, 1))
  21 
  22 # Initial state.
  23 # Add the molecule:
  24 x = a / 2
  25 y = a * sqrt(3) / 6
  26 z = 1.8
  27 d = 1.10 # N2 bond length
  28 
  29 # Molecular state parallel to the surface:
  30 slab.extend([Atom('N', (x, y, z)),
  31              Atom('N', (x + sqrt(3) * d / 2, y + d / 2, z))])
  32 
  33 # Use a the PairPotential for the forces and energies:
  34 slab.SetCalculator(PairPotential())
  35 
  36 # We don't want to worry about the Ru degrees of freedom:
  37 molecule = Subset(slab, indices=[-2, -1])
  38             
  39 # Create a quickmin object, and relax the molecule until all force
  40 # components are below 0.05 eV/Angstrom:
  41 relax = MDMin(molecule, dt=0.08, fmax=0.05)
  42 relax.Converge()
  43 print 'initial state:', slab.GetPotentialEnergy()
  44 WriteNetCDF(slab, 'N2.nc')
  45 
  46 # Now the final state.
  47 # Move the second N atom to a neighboring hollow site:
  48 slab[-1].SetCartesianPosition((x + a, y, z))
  49 relax.Converge()
  50 print 'final state:  ', slab.GetPotentialEnergy()
  51 WriteNetCDF(slab, '2N.nc')

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2005-11-17 10:40:35, 14.4 KB) [[attachment:2N.gif]]
  • [get | view] (2005-11-17 10:38:37, 14.6 KB) [[attachment:N2.gif]]
  • [get | view] (2005-11-17 10:37:12, 0.5 KB) [[attachment:N2.py]]
  • [get | view] (2005-11-17 10:41:12, 1.5 KB) [[attachment:N2Ru-Dissociation1.py]]
  • [get | view] (2006-09-27 15:11:52, 1.0 KB) [[attachment:N2Ru-Dissociation2-ANEB.py]]
  • [get | view] (2005-11-17 10:41:40, 0.9 KB) [[attachment:N2Ru-Dissociation2.py]]
  • [get | view] (2005-11-17 10:42:05, 1.0 KB) [[attachment:N2Ru-association.py]]
  • [get | view] (2005-11-17 10:38:04, 1.1 KB) [[attachment:N2Ru-relax.py]]
  • [get | view] (2005-11-17 10:37:43, 1.0 KB) [[attachment:N2Ru.py]]
  • [get | view] (2006-09-05 08:56:57, 30.4 KB) [[attachment:aneb.jpeg]]
  • [get | view] (2006-09-05 08:47:05, 23.2 KB) [[attachment:neb.jpeg]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.