Attachment 'N2Ru-association.py'

Download

   1 from math import sqrt
   2 
   3 from ASE.Calculators.PairPotential import PairPotential
   4 from ASE.Filters.Subset import Subset
   5 from ASE.Filters.FixBondLength import FixBondLength
   6 from ASE.Dynamics.MDMin import MDMin
   7 from ASE.Trajectories.NetCDFTrajectory import NetCDFTrajectory
   8 from ASE.IO.NetCDF import ReadNetCDF
   9 
  10 
  11 slab = ReadNetCDF('2N.nc')
  12 slab.SetCalculator(PairPotential())
  13 molecule = Subset(slab, indices=[-2, -1])
  14             
  15 # Create a trajectory for the dissociation path:
  16 path = NetCDFTrajectory('association.nc', slab)
  17 # Put the initial state in the trajectory:
  18 path.Update()
  19 
  20 # From now on, we relax the molecule under the constraint of fixed
  21 # bond length:
  22 fixed = FixBondLength(molecule, 0, 1)
  23 relax = MDMin(fixed, dt=0.08, fmax=0.05)
  24 
  25 d = fixed.GetBondLength()
  26 delta = 0.1
  27 e0 = slab.GetPotentialEnergy()
  28 print d, 0.0
  29 while d > 1.10:
  30     d -= delta
  31     fixed.SetBondLength(d, fix='first')
  32     relax.Converge()
  33     path.Update()
  34     print d, slab.GetPotentialEnergy() - e0

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.