def __init__(self, filename=None, paw=None, lr=None, ws='all', frequencies=None, folding='Gauss', width=0.08, kickdir=0 ): """ Parameters (see also ``BaseInducedField``): ------------------------------------------- paw: GPAW object GPAW object for ground state lr: LrTDDFT object LrTDDFT object kickdir: int Kick direction: 0, 1, 2 for x, y, z """ # TODO: change kickdir to general kick = [1e-3, 1-e3, 0] etc. if type(lr) is not LrTDDFT: raise RuntimeError('Provide LrTDDFT object.') # Check that lr is diagonalized if len(lr) == 0: raise RuntimeError('Diagonalize LrTDDFT first.') self.lr = lr # "Kick" direction self.kickdir = kickdir self.readwritemode_str_to_list = \ {'': ['Frho', 'atoms'], 'all': ['Frho', 'Fphi', 'Fef', 'Ffe', 'atoms'], 'field': ['Frho', 'Fphi', 'Fef', 'Ffe', 'atoms']} BaseInducedField.__init__(self, filename, paw, ws, frequencies, folding, width)
def __init__(self, filename=None, paw=None, ws='all', frequencies=None, folding='Gauss', width=0.08, interval=1, restart_file=None): """ Parameters (see also ``BaseInducedField``): ------------------------------------------- paw: TDDFT object TDDFT object for time propagation width: float Width in eV for the Gaussian (sigma) or Lorentzian (eta) folding Gaussian = exp(- (1/2) * sigma^2 * t^2) Lorentzian = exp(- eta * t) interval: int Number of timesteps between calls (used when attaching) restart_file: string Name of the restart file """ Observer.__init__(self, interval) # From observer: # self.niter # self.interval # Restart file self.restart_file = restart_file # These are allocated in allocate() self.Fnt_wsG = None self.n0t_sG = None self.FD_awsp = None self.D0_asp = None self.readwritemode_str_to_list = \ {'': ['Fnt', 'n0t', 'FD', 'D0', 'atoms'], 'all': ['Fnt', 'n0t', 'FD', 'D0', 'Frho', 'Fphi', 'Fef', 'Ffe', 'atoms'], 'field': ['Frho', 'Fphi', 'Fef', 'Ffe', 'atoms']} BaseInducedField.__init__(self, filename, paw, ws, frequencies, folding, width)
def __init__(self, filename=None, paw=None, ws='all', frequencies=None, folding='Gauss', width=0.08, interval=1, restart_file=None ): """ Parameters (see also ``BaseInducedField``): ------------------------------------------- paw: TDDFT object TDDFT object for time propagation width: float Width in eV for the Gaussian (sigma) or Lorentzian (eta) folding Gaussian = exp(- (1/2) * sigma^2 * t^2) Lorentzian = exp(- eta * t) interval: int Number of timesteps between calls (used when attaching) restart_file: string Name of the restart file """ Observer.__init__(self, interval) # From observer: # self.niter # self.interval # Restart file self.restart_file = restart_file # These are allocated in allocate() self.Fnt_wsG = None self.n0t_sG = None self.FD_awsp = None self.D0_asp = None self.readwritemode_str_to_list = \ {'': ['Fnt', 'n0t', 'FD', 'D0', 'atoms'], 'all': ['Fnt', 'n0t', 'FD', 'D0', 'Frho', 'Fphi', 'Fef', 'Ffe', 'atoms'], 'field': ['Frho', 'Fphi', 'Fef', 'Ffe', 'atoms']} BaseInducedField.__init__(self, filename, paw, ws, frequencies, folding, width)