def setup_overlap(self): """ Evaluates projectors <p_i|psi>, as well as <(phi-phit)|psi> and <(phi_i-phit_i)|(phi_j-phit_j)>, when needed """ M_R, M_S, N_R, N_S, N_RS = self.make_site_lists() num_N_RS = len(N_RS) if num_N_RS > 0: N_RS_R, N_RS_S = zip(*N_RS) else: N_RS_R, N_RS_S = [], [] self.site_cat = [M_R, M_S, N_R, N_S, N_RS_R, N_RS_S] start = time.monotonic() if self.method == "aug_recip": self._setup_overlap(self.site_cat, True) elif self.method == "aug_real": self._setup_overlap(self.site_cat, False) else: raise PAWpyError("method must be aug type for setup_overlap call") end = time.monotonic() Timer.overlap_time(end - start) print( '-------------\nran overlap_setup in %f seconds\n---------------' % (end - start))
def _single_band_projection_aug_real(self, band_num, flip_spin=False): """ All electron projection of the band_num band of self onto all the bands of basis. High frequency components are filtered out from the partial waves, which are then projected onto the pseudo wavefunctions in real space. """ res = self.wf.pseudoprojection(band_num, self.basis, flip_spin) start = time.monotonic() self._add_augmentation_terms(res, band_num, flip_spin) end = time.monotonic() Timer.augmentation_time(end - start) #print('---------\nran compensation_terms in %f seconds\n-----------' % (end-start)) return res