def __init__(self, atoms, restart=None, logfile='-', trajectory=None, dt=0.1, maxmove=0.2,dtmax=1.0,Nmin=5,finc=1.1,fdec=0.5, astart=0.1,fa=0.99,a=0.1): Optimizer.__init__(self, atoms, restart, logfile, trajectory) # if dt is not None: self.dt = dt self.Nsteps = 0 self.maxmove = maxmove self.dtmax = dtmax self.Nmin = Nmin self.finc = finc self.fdec = fdec self.astart = astart self.fa = fa self.a = a
def __init__(self, atoms, restart=None, logfile='-', trajectory=None, maxstep=0.2, dR=0.1, memory=25, alpha=0.05, method=None, damping=1.): Optimizer.__init__(self, atoms, restart, logfile, trajectory) if maxstep > 1.0: raise ValueError( 'Wanna fly? I know the calculation is too slow. ' + 'But you have to follow the rules.\n'+ ' The maximum step size %.1f' % maxstep +' is too big! \n'+ ' Try to set the maximum step size'+ ' below 0.2.') self.maxstep = maxstep self.dR = dR self.memory = memory self.alpha = alpha self.method = method self.damping = damping
def __init__(self, atoms, restart=None, logfile='-', trajectory=None, fmax=None, converged=None, hessianupdate='BFGS',hessian=None,forcemin=True, verbosity=None,maxradius=None, diagonal=20.,radius=None, transitionstate = False): Optimizer.__init__(self, atoms, restart, logfile, trajectory) self.eps = 1e-12 self.hessianupdate = hessianupdate self.forcemin = forcemin self.verbosity = verbosity self.diagonal = diagonal self.atoms = atoms n = len(self.atoms) * 3 if radius is None: self.radius = 0.05*np.sqrt(n)/10.0 else: self.radius = radius if maxradius is None: self.maxradius = 0.5*np.sqrt(n) else: self.maxradius = maxradius # 0.01 < radius < maxradius self.radius = max(min( self.radius, self.maxradius ), 0.0001) self.transitionstate = transitionstate # check if this is a nudged elastic band calculation if hasattr(atoms,'springconstant'): self.forcemin=False self.t0 = time.time()
def __init__(self, atoms, restart=None, logfile='-', trajectory=None, maxstep=None): """Quasi-Newton optimizer. Parameters: restart: string Pickle file used to store hessian matrix. If set, file with such a name will be searched and hessian matrix stored will be used, if the file exists. trajectory: string Pickle file used to store trajectory of atomic movement. maxstep: float Used to set the maximum distance an atom can move per iteration (default value is 0.04 Å). """ Optimizer.__init__(self, atoms, restart, logfile, trajectory) if maxstep is not None: if maxstep > 1.0: raise ValueError('You are using a much too large value for ' + 'the maximum step size: %.1f Å' % maxstep) self.maxstep = maxstep
def __init__(self, atoms, restart=None, logfile='-', trajectory=None, dt=None): Optimizer.__init__(self, atoms, restart, logfile, trajectory) if dt is not None: self.dt = dt