Esempio n. 1
0
import biggles
from Siesta.Interface import Atom      
from ASE import ListOfAtoms
from Siesta.efs import Siesta_efs as Siesta
import math, os, shutil, urllib
import Numeric as Num

p=biggles.FramedPlot(title="Energy/cutoff")

#
# Range of cutoffs
#
cutoffs = Num.arange(100.0,801.0,100.0)
energy = 0.0*cutoffs

a = Siesta(executable="$HOME/bin/siesta-2.6.9")          # Initialize object

# create a work subdirectory
orig_dir = os.getcwd()
dir = "cutoff_work"
if os.path.isdir(dir): # does dir exist? 
  shutil.rmtree(dir) # yes, remove old directory 
os.mkdir(dir) # make dir directory 
os.chdir(dir) # move to dir 

open("basis.fdf", "w").write("""
%block kgrid_Monkhorst_Pack
   7   0    0    0.5
   0   7    0    0.5
   0    0   7    0.5
%endblock kgrid_Monkhorst_Pack
Esempio n. 2
0
f=open(pseudo_file,"r")
symbol=f.readline().split()[0]
f.close()
label = os.path.basename(pseudo_file[:-len(".psf")])

pseudo_file = os.path.abspath(pseudo_file)
print "Processing ", pseudo_file

print "Element label, symbol: ", label, symbol

a=10.0              # Default box length in Ang
cell=Num.array([(a, 0, 0),
      (0, a, 0),
      (0, 0, a)])

a = Siesta(executable="$HOME/bin/siesta-test")          # Initialize object

a.SetOption("DM.NumberPulay","3")
a.SetOption("DM.UseSaveDM","T")
a.SetOption("UseSaveDM","T")
a.SetOption("Meshcutoff", str(cutoff)+" Ry")
#
# Make sure that your fdf has been patched to allow long %include filenames
#
a.SetOption("%include",basis_file)

m=20             # Number of displacements to try
disps=Num.zeros(m,Num.Float)
energy=Num.zeros(m,Num.Float)

output_file=os.path.abspath(label+".eggbox."+str(cutoff))