Attachment 'H2O_vib.py'

Download

   1 """Calculate the vibrational modes of a H2O molecule."""
   2 from Dacapo import Dacapo
   3 from ASE.Utilities.VibrationalCalculation import *
   4 
   5 #Change filename to *.nc output file of your relaxation
   6 loa=Dacapo.ReadAtoms('H2Orelax.nc')
   7 loa.GetCalculator().SetNetCDFFile('temp.nc')
   8 
   9 vib=VibrationalCalculation(filetoken='H2O_vib',
  10                            atoms=loa,
  11                            freeatoms=[0,1,2],
  12                            displacements=[0.08] * 3,
  13                            method=0)
  14 
  15 
  16 vib.RunCalculations()
  17 
  18 #Ensure symmetry of Hessian matrix
  19 vib.SetHessianSymmetry(1)
  20 
  21 vib.PrintFrequencies()
  22 
  23 #Make trajectory files to visualize normal modes
  24 #for all 9 modes
  25 for mode in range(0,9):
  26     vib.CreateModeTrajectory(mode=mode,scaling=2)
  27 
  28 
  29 print 'Zero-point energy = %1.2f eV' % vib.GetZeroPointEnergy()

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] (2007-01-26 13:09:42, 0.8 KB) [[attachment:Fe-ferro.py]]
  • [get | view] (2006-02-02 12:16:15, 0.8 KB) [[attachment:H2O_vib.py]]
  • [get | view] (2007-02-20 13:13:49, 0.6 KB) [[attachment:LDOS.py]]
  • [get | view] (2007-03-14 13:57:46, 1.3 KB) [[attachment:VTKplotwavefunction.py]]
  • [get | view] (2006-02-02 14:33:52, 1.1 KB) [[attachment:dos.py]]
  • [get | view] (2007-02-20 15:04:44, 1.4 KB) [[attachment:localmagmoment.py]]
  • [get | view] (2007-03-14 13:54:20, 0.7 KB) [[attachment:plotwavefunction.py]]
 All files | Selected Files: delete move to page copy to page

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