コード例 #1
0
 def run(self, fmax=0.05, steps=None):
     self.fmax = fmax
     if steps:
         self.max_steps = steps
     old_positions = self.atoms.get_positions()
     for converged in Dynamics.irun(self):
         if (np.linalg.norm(self.atoms.get_positions() - self.start_geo) >
                 self.trustradius):
             print('Trust radius exceeded. Resetting to last position')
             self.atoms.set_positions(old_positions)
             break
         old_positions = self.atoms.get_positions()
     return converged
コード例 #2
0
ファイル: md.py プロジェクト: arosen93/rASE
 def irun(self, steps=50):
     """ Call Dynamics.irun and adjust max_steps """
     self.max_steps = steps + self.nsteps
     return Dynamics.irun(self)