Attachment 'Wannier2.py'

Download

   1 from ASE import Atom, ListOfAtoms
   2 from Dacapo import Dacapo
   3 from ASE.Utilities.Wannier.Wannier import Wannier
   4 atoms = Dacapo.ReadAtoms('Benzene.nc')
   5 
   6 calc = atoms.GetCalculator()
   7 # Initialize the Wannier class
   8 wannier = Wannier(numberofwannier=18,calculator=calc)
   9 
  10 # Perform the localization with specified convergence criterion
  11 wannier.Localize(tolerance=1.0e-8)
  12 
  13 
  14 for n in range(0,wannier.GetNumberOfWannierFunctions()):
  15     wannier.WriteCube(n,'WF_'+str(n)+'.cube',real=True)
  16 
  17 
  18 # Read the centers, (quicker than plotting the cube files)
  19 for center in  wannier.GetCenters():
  20     print center
  21 
  22 centers = wannier.GetCentersAsAtoms()
  23 
  24 # plot centers together with atoms
  25 from ASE.Visualization.VMD import VMD
  26 VMD(atoms,centers)

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] (2006-03-13 10:09:16, 2.0 KB) [[attachment:Al111.py]]
  • [get | view] (2006-03-14 15:20:16, 27761.4 KB) [[attachment:Benzene.nc]]
  • [get | view] (2006-03-21 11:41:32, 27746.8 KB) [[attachment:Pyridine.nc]]
  • [get | view] (2006-03-06 15:30:49, 0.5 KB) [[attachment:STM_VMD.py]]
  • [get | view] (2006-03-01 11:15:00, 102.9 KB) [[attachment:Si_banddiagram.gif]]
  • [get | view] (2006-03-21 11:41:56, 27717.4 KB) [[attachment:Thiophene.nc]]
  • [get | view] (2006-03-14 15:33:28, 0.7 KB) [[attachment:Wannier2.py]]
 All files | Selected Files: delete move to page copy to page

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