[gpaw-users] wannier.py : Wannier functions not orthonormal

Jens Jørgen Mortensen jjmo at dtu.dk
Tue Aug 13 10:48:42 CEST 2019


On 8/13/19 12:18 AM, Ravindra Shinde via gpaw-users wrote:
> Hi All,
>    I am adding a module to GPAW which requires calculations of Wannier 
> functions. I am using wannier.py to store them into cube files. These 
> functions will be read and tested for orthonormality. However, I found 
> that the overlap matrix of these functions is not identity.

In the PAW aspproximation, your wave functions (psit-tilde) are 
orthogonal like <psit-tilde_m|O-hat|psi-tilde_n> (O-hat is the PAW 
overlap operator) as show here:

 
https://wiki.fysik.dtu.dk/gpaw/devel/developersguide.html#wave-functions

What you are calculating is <psit-tilde_m|psi-tilde_n>.

Jens Jørgen


>    Following are the input files which can reproduce the results and the 
> added function (to the wannier.py) which calculates the overlap matrix.
> 
>      def wannier_overlap_matrix(self, calc):
>          """ This function computes the overlap between Wannier orbitals 
> stored on the grid """
> 
>          centers = self.get_centers()
>          num_wann = np.shape(centers)[0]
>          overlap = np.zeros((num_wann, num_wann))
> 
>          for i in range(num_wann):
>              for j in range(i,num_wann):
>                  wann_i = self.get_function(calc, i, pad=False)
>                  wann_j = self.get_function(calc, j, pad=False)
>                  overlap[i][j] = 
> (calc.wfs.gd.dv*Bohr**3)*np.sum(wann_i*wann_j)
> 
>          overlap_matrix = np.transpose(overlap) + overlap
>          overlap_matrix[np.diag_indices_from(overlap_matrix)] /= 2.0
> 
>          np.savetxt("overlap_matrix.txt", (overlap_matrix), fmt='%8.6f', 
> delimiter=' ', newline='\n', header='Overlap Matrix', comments='# 
> Ravindra ::  ', encoding=None)
>          return
> 
> Best regards,
> 
> *Ravindra Shinde, Ph.D.*
> Department of Chemical and Environmental Engineering
> University of California, Riverside
> Email: ravindra.shinde at ucr.edu <mailto:ravindra.shinde at ucr.edu>
> Phone: +1(951) 466-8168
> 
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> 



More information about the gpaw-users mailing list