## Written by D. Sanchez-Portal 2001-2006

The programs contained in this directory calculate different
optical properties of a solid out of the file 

         Systemlabel.EPSIMG 

generated by SIESTA, that contains the imaginary part of the
dielectric function in the energy range specified in the
input file of SIESTA.

There are two small programs:

optical_input (in source optical_input.f)

and

optical (in source optical_cond.f)


Both can be compile independently:

     make all # or
     make optical_input
     make optical

The first program creates the input file for optical, containing the 
imaginary part of the dielectric function, from the file

          Systemlabel.EPSIMG

To do so, you just need to type:

       optical_input < Systemlabel.EPSIMG

The program will create the file 'e2.dat' if there is not spin polarization,
or the files 'e2.dat.spin1' and 'e2.dat.spin2' for the spin polarized case.

If the F-sum rule is not fulfilled by an amount larger than certain 
percentage specified in the program via the parameter THRESHOLD, 
the imaginary part of the dielectric function will be appended
by a tail of the form:
                   
                       C/w**p

where C and p are determine to ensure continuity and to enforce the F-sum rule.
This should increase the quality of the quantities determined via the
Kramers-Kroning relations, however it is not very sophisticated and in certain
cases it can create pathological problems. Anyway, it can be easily 
desactivated by setting THRESHOLD to zero.


The program optical reads a file called 'e2.dat' containing 
the imaginary part of the dieletric function, and creates the
file 'e1.interband.out' that contains the real part of the dieletric function, 
'e2.interband.out' is the imaginary part calculated back 
from the data in 'e1.interband.out', this serves as a cross check 
of the quality of the Kramers-Kroning transformation. 

For metals it is also necessary to include a Drude term (associated
to intraband transitions) of the form w_p^2/w(w+i*gamma) where
w_p^2 has been calculated by SIESTA and appears at the beginning
of the file Systemlabel.EPSIMG, and gamma is an empirical parameter,
the invers of the relaxation time.

Also creates the files:
'epsilon_real.out'  containing the real part of the dielectric function
'epsilon_img.out'  containing the imaginary part of the dielectric function
'refrac_index.out'   containing the refraction index
'absorp_index.out'  containing the extintion coefficient
'absorp_coef.out'    containing the absorption coefficient in cm**-1
'reflectance.out'     containing the reflectance
'conductivity.out'     containing the optical conductivity in (ohm*m)**-1
