File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -159,11 +159,9 @@ def process_step():
159159
160160 # preliminary value
161161 final_status = 'unconverged'
162- is_converged = False
163162
164163 try :
165- for is_converged in opt .irun (fmax = fmax , smax = smax , steps = steps ):
166- pass
164+ opt .run (fmax = fmax , smax = smax , steps = steps )
167165 except Exception as exc :
168166 # label actual failed optimizations
169167 # when this happens, the atomic config somehow ends up with a 6-vector stress, which can't be
@@ -186,8 +184,9 @@ def process_step():
186184
187185 # as of 3.26 converged() requires a gradient, but for PreconLBFGS it's not used
188186 # See https://gitlab.com/ase/ase/-/issues/1744
189- # use Optimizer.irun instead, since it returns converged status
190- if is_converged :
187+ # would like to use Optimizer.irun instead, since it returns converged status, but
188+ # not supported for PreconLBFGS
189+ if opt .converged (None ):
191190 final_status = 'converged'
192191
193192 traj [- 1 ].info ['optimize_config_type' ] = f'optimize_last_{ final_status } '
You can’t perform that action at this time.
0 commit comments