예제 #1
0
    def __init__(self,
                 keep_htpsit=True,
                 blocksize=None,
                 niter=3,
                 rtol=1e-16,
                 limit_lambda=False,
                 use_rayleigh=False,
                 trial_step=0.1):
        """Initialize RMM-DIIS eigensolver.

        Parameters:

        limit_lambda: dictionary
            determines if step length should be limited
            supported keys:
            'absolute':True/False limit the absolute value
            'upper':float upper limit for lambda
            'lower':float lower limit for lambda

        """

        Eigensolver.__init__(self, keep_htpsit, blocksize)
        self.niter = niter
        self.rtol = rtol
        self.limit_lambda = limit_lambda
        self.use_rayleigh = use_rayleigh
        if use_rayleigh:
            1 / 0
            self.blocksize = 1
        self.trial_step = trial_step
        self.first = True
예제 #2
0
 def __init__(self, niter=1, smin=None, normalize=True):
     Eigensolver.__init__(self)
     self.niter = niter
     if not smin is None:
         raise NotImplementedError("See https://trac.fysik.dtu.dk/projects/gpaw/ticket/248")
     self.smin = smin
     self.normalize = normalize
     self.orthonormalization_required = False
예제 #3
0
    def __init__(self, niter=1, smin=None, normalize=True):
        Eigensolver.__init__(self)
        self.niter = niter
        self.smin = smin
        self.normalize = normalize

        if smin is not None:
            raise NotImplementedError(
                'See https://trac.fysik.dtu.dk/projects/gpaw/ticket/248')

        self.orthonormalization_required = False
예제 #4
0
파일: cg.py 프로젝트: robwarm/gpaw-symm
    def __init__(self, niter=4, rtol=0.30):
        """Construct conjugate gradient eigen solver.

        parameters:

        niter: int
            Maximum number of conjugate gradient iterations per band
        rtol: float
            If change in residual is less than rtol, iteration for band is
            not continued

        """
        Eigensolver.__init__(self)
        self.niter = niter
        self.rtol = rtol
        if extra_parameters.get('PK', False):
            self.orthonormalization_required = True
        else:
            self.orthonormalization_required = False
예제 #5
0
    def __init__(self, niter=4, rtol=0.30):
        """Construct conjugate gradient eigen solver.

        parameters:

        niter: int
            Maximum number of conjugate gradient iterations per band
        rtol: float
            If change in residual is less than rtol, iteration for band is
            not continued

        """
        Eigensolver.__init__(self)
        self.niter = niter
        self.rtol = rtol
        if extra_parameters.get('PK', False):
            self.orthonormalization_required = True
        else:
            self.orthonormalization_required = False
예제 #6
0
    def __init__(self, keep_htpsit=True, blocksize=10, niter=3, rtol=1e-16,
                 limit_lambda=False, use_rayleigh=False, trial_step=0.1):
        """Initialize RMM-DIIS eigensolver.

        Parameters:

        limit_lambda: dictionary
            determines if step length should be limited
            supported keys:
            'absolute':True/False limit the absolute value
            'upper':float upper limit for lambda
            'lower':float lower limit for lambda

        """

        Eigensolver.__init__(self, keep_htpsit, blocksize)
        self.niter = niter
        self.rtol = rtol
        self.limit_lambda = limit_lambda
        self.use_rayleigh = use_rayleigh
        if use_rayleigh:
            self.blocksize = 1
        self.trial_step = trial_step
        self.first = True
예제 #7
0
파일: cg.py 프로젝트: yihsuanliu/gpaw
 def __init__(self, niter=4):
     Eigensolver.__init__(self)
     self.niter = niter
예제 #8
0
 def __init__(self, keep_htpsit=True, blocksize=10, fixed_trial_step=None):
     self.fixed_trial_step = fixed_trial_step
     Eigensolver.__init__(self, keep_htpsit, blocksize)
예제 #9
0
 def __init__(self, keep_htpsit=True, blocksize=1):
     Eigensolver.__init__(self, keep_htpsit, blocksize)
예제 #10
0
 def __init__(self, keep_htpsit=True, blocksize=10,
              fixed_trial_step=None):
     self.fixed_trial_step = fixed_trial_step
     Eigensolver.__init__(self, keep_htpsit, blocksize)
예제 #11
0
    def __init__(self, keep_htpsit=False):
        """Initialize direct eigensolver. """

        Eigensolver.__init__(self, keep_htpsit)