示例#1
0
    def setup(self):
        '''
		Execute the Wannier90_setup
		'''

        seed__name = "wannier90"
        real_lattice_loc = self.real_lattice_loc.flatten()
        recip_lattice_loc = self.recip_lattice_loc.flatten()
        kpt_latt_loc = self.kpt_latt_loc.flatten()
        atoms_cart_loc = self.atoms_cart_loc.flatten()

        bands_wann_nntot, nn_list, proj_site, proj_l, proj_m, proj_radial, \
        proj_z, proj_x, proj_zona, exclude_bands, proj_s, proj_s_qaxis = \
           libwannier90.setup(seed__name, self.mp_grid_loc, self.num_kpts_loc, real_lattice_loc, \
           recip_lattice_loc, kpt_latt_loc, self.num_bands_tot, self.num_atoms_loc, \
           self.atom_atomic_loc, atoms_cart_loc, self.gamma_only, self.spinors)

        # Convert outputs to the correct data type
        self.num_bands_loc, self.num_wann_loc, self.nntot_loc = np.int32(
            bands_wann_nntot)
        self.nn_list = np.int32(nn_list)
        self.proj_site = proj_site
        self.proj_l = np.int32(proj_l)
        self.proj_m = np.int32(proj_m)
        self.proj_radial = np.int32(proj_radial)
        self.proj_z = proj_z
        self.proj_x = proj_x
        self.proj_zona = proj_zona
        self.exclude_bands = np.int32(exclude_bands)
        self.band_included_list = [
            i for i in range(self.num_bands_tot)
            if (i + 1) not in self.exclude_bands
        ]
        self.proj_s = np.int32(proj_s)
        self.proj_s_qaxis = proj_s_qaxis
示例#2
0
    def setup(self):
        '''
        Execute the Wannier90_setup
        '''

        seed__name = "wannier90"
        real_lattice_loc = self.real_lattice_loc.T.flatten()
        recip_lattice_loc = self.recip_lattice_loc.T.flatten()
        kpt_latt_loc = self.kpt_latt_loc.flatten()
        atoms_cart_loc = self.atoms_cart_loc.flatten()

        bands_wann_nntot, nn_list, proj_site, proj_l, proj_m, proj_radial, \
        proj_z, proj_x, proj_zona, exclude_bands, proj_s, proj_s_qaxis = \
                    libwannier90.setup(seed__name, self.mp_grid_loc, self.num_kpts_loc, real_lattice_loc, \
                    recip_lattice_loc, kpt_latt_loc, self.num_bands_tot, self.num_atoms_loc, \
                    self.atom_atomic_loc, atoms_cart_loc, self.gamma_only, self.spinors) 
                
        # Convert outputs to the correct data type
        self.num_bands_loc, self.num_wann_loc, self.nntot_loc = np.int32(bands_wann_nntot)
        self.nn_list = np.int32(nn_list)
        self.proj_site = proj_site
        self.proj_l = np.int32(proj_l)
        self.proj_m = np.int32(proj_m)
        self.proj_radial = np.int32(proj_radial)
        self.proj_z = proj_z
        self.proj_x = proj_x
        self.proj_zona = proj_zona
        self.exclude_bands = np.int32(exclude_bands)
        self.band_included_list = [i for i in range(self.num_bands_tot) if (i + 1) not in self.exclude_bands]
        self.proj_s = np.int32(proj_s)
        self.proj_s_qaxis = proj_s_qaxis
示例#3
0
if gamma_only_loc == True:
    spinors_boolean = 1
else:
    spinors_boolean = 0

#RUN WANNIER90
seed__name = "wannier90"
real_lattice_loc = real_lattice_loc.flatten()
recip_lattice_loc = recip_lattice_loc.flatten()
kpt_latt_loc = kpt_latt_loc.flatten()
atoms_cart_loc = atoms_cart_loc.flatten()

bands_wann_nntot, nn_list, proj_site, proj_l, proj_m, proj_radial, proj_z, proj_x, proj_zona, exclude_bands, proj_s, proj_s_qaxis = \
libwannier90.setup(seed__name, mp_grid_loc, num_kpts_loc, real_lattice_loc, \
     recip_lattice_loc, kpt_latt_loc, num_bands_tot, num_atoms_loc, \
     atom_atomic_loc, atoms_cart_loc, gamma_only_boolean, spinors_boolean)

# Convert outputs to the correct data type
num_bands_loc, num_wann_loc, nntot_loc = np.int32(bands_wann_nntot)
nn_list = np.int32(nn_list)
proj_l = np.int32(proj_l)
proj_m = np.int32(proj_m)
proj_radial = np.int32(proj_radial)
exclude_bands = np.int32(exclude_bands)
proj_s = np.int32(proj_s)

# Reading A_matrix
A_matrix_loc = np.empty([num_kpts_loc, num_wann_loc, num_bands_loc],
                        dtype=complex)
file = open(name + ".amn")