Esempio n. 1
0
  def __init__(self, **kw):
    from pyscf.nao.m_fermi_dirac import fermi_dirac_occupations
    
    tddft_iter.__init__(self, **kw)
    self.x_zip = kw['x_zip'] if 'x_zip' in kw else False
    self.x_zip_eps = kw['x_zip_eps'] if 'x_zip_eps' in kw else 0.05
    self.x_zip_emax = kw['x_zip_emax'] if 'x_zip_emax' in kw else 0.25

    if self.x_zip: # redefine the eigenvectors
      sm2e,sma2x = self.build_x_zip()
      if self.verbosity>0: 
        print(__name__, 'self.mo_energy.shape =', self.mo_energy.shape)
        print(__name__, 'sm2e.shape =', sm2e.shape)
      self.ksn2e = array([sm2e])
      ksn2fd = fermi_dirac_occupations(self.telec, self.ksn2e, self.fermi_energy)
      for s,n2fd in enumerate(ksn2fd[0]):
        if not all(n2fd>self.nfermi_tol): continue
        print(self.telec, s, nfermi_tol, n2fd)
        raise RuntimeError(__name__, 'telec is too high?')
        
      self.ksn2f = (3-self.nspin)*ksn2fd
      self.nfermi = array([argmax(ksn2fd[0,s,:]<self.nfermi_tol) for s in range(self.nspin)], dtype=int)
      self.vstart = array([argmax(1.0-ksn2fd[0,s,:]>=self.nfermi_tol) for s in range(self.nspin)], dtype=int)
      self.xocc = [ma2x[:nfermi,:] for ma2x,nfermi in zip(sma2x,self.nfermi)]
      self.xvrt = [ma2x[vstart:,:] for ma2x,vstart in zip(sma2x,self.vstart)]
Esempio n. 2
0
    def __init__(self, **kw):
        """ 
        Iterative TDDFT using the electostatic potential of a moving charge as perturbation.
        The units of the input are in Hartree atomic units...

        Input Parameters:
            dr: spatial resolution for the electron trajectory in atomic unit.
                Warning: This parameter influence the accuracy of the calculations.
                    if it is taken too large the results will be wrong.

            freq: Frequency range (in atomic unit), freq[0] must be 0.0!!
            
        """
        
        tddft_iter.__init__(self, **kw)

        self.freq = kw["freq"] if "freq" in kw else np.arange(0.0, 0.367, 1.5*self.eps)
        self.dr = kw["dr"] if "dr" in kw else np.array([0.3, 0.3, 0.3])
        self.V_freq = None
        self.velec = None
        self.beam_offset = None
Esempio n. 3
0
 def __init__(self, **kw):
     tddft_iter.__init__(self, **kw)
Esempio n. 4
0
 def __init__(self, **kw):
   tddft_iter.__init__(self, **kw)