def initialize(self, paw, allocate=True): BaseInducedField.initialize(self, paw, allocate) # Artificial background electric field (linear response) # TODO: change kickdir to general kick = [1e-3, 1-e3, 0] etc. Fbgef_v = np.zeros((self.nv, ), dtype=float) Fbgef_v[self.kickdir] = 1.0 self.Fbgef_v = Fbgef_v # Initialize PAW object paw.initialize_positions()
def initialize(self, paw, allocate=True): BaseInducedField.initialize(self, paw, allocate) # Artificial background electric field (linear response) # TODO: change kickdir to general kick = [1e-3, 1-e3, 0] etc. Fbgef_v = np.zeros((self.nv,), dtype=float) Fbgef_v[self.kickdir] = 1.0 self.Fbgef_v = Fbgef_v # Initialize PAW object self.density.ghat.set_positions(self.atoms.get_scaled_positions()) paw.converge_wave_functions()
def initialize(self, paw, allocate=True): BaseInducedField.initialize(self, paw, allocate) assert hasattr(paw, 'time') and hasattr(paw, 'niter'), 'Use TDDFT!' self.time = paw.time self.niter = paw.niter # TODO: remove this requirement assert np.count_nonzero(paw.kick_strength) > 0, \ 'Apply absorption kick before %s' % self.__class__.__name__ # Background electric field self.Fbgef_v = paw.kick_strength # Attach to PAW-type object paw.attach(self, self.interval) # TODO: write more details (folding, freqs, etc) parprint('%s: Attached ' % self.__class__.__name__)
def initialize(self, paw, allocate=True): BaseInducedField.initialize(self, paw, allocate) assert hasattr(paw, 'time') and hasattr(paw, 'niter'), 'Use TDDFT!' self.time = paw.time self.niter = paw.niter # TODO: remove this requirement assert np.count_nonzero(paw.kick_strength) > 0, \ 'Apply absorption kick before %s' % self.__class__.__name__ # Background electric field self.Fbgef_v = paw.kick_strength # Attach to PAW-type object paw.attach(self, self.interval) # TODO: write more details (folding, freqs, etc) parprint('%s: Attached ' % self.__class__.__name__)