@@ -221,40 +221,41 @@ def execute_incore(self):
221221 )
222222
223223 t0_0 = datetime .datetime .now ()
224- xyz_0 = interpolate (rxn = rxn , use_weights = False )
224+ xyzs_0 = interpolate (rxn = rxn , use_weights = False )
225225 t_ex_0 = datetime .datetime .now () - t0_0
226226
227227 t0_1 = datetime .datetime .now ()
228- xyz_1 = interpolate (rxn = rxn , use_weights = True )
228+ xyzs_1 = interpolate (rxn = rxn , use_weights = True )
229229 t_ex_1 = datetime .datetime .now () - t0_1
230230
231- for method_index , (xyz , t0 , t_ex ) in enumerate (zip ([xyz_0 , xyz_1 ], [t0_0 , t0_1 ], [t_ex_0 , t_ex_1 ])):
232- if colliding_atoms (xyz ):
233- continue
234- unique = True
235- for other_tsg in rxn .ts_species .ts_guesses :
236- if almost_equal_coords (xyz , other_tsg .initial_xyz ):
237- if 'linear' not in other_tsg .method .lower ():
238- other_tsg .method += f' and Linear { method_index } '
239- unique = False
240- break
241- if unique :
242- ts_guess = TSGuess (method = f'linear { method_index } ' ,
243- index = len (rxn .ts_species .ts_guesses ),
244- method_index = method_index ,
245- t0 = t0 ,
246- execution_time = t_ex ,
247- success = True ,
248- family = family_label ,
249- xyz = xyz ,
250- )
251- rxn .ts_species .ts_guesses .append (ts_guess )
252- save_geo (xyz = xyz ,
253- path = self .local_path ,
254- filename = f'Linear { method_index } ' ,
255- format_ = 'xyz' ,
256- comment = f'Linear { method_index } , family: { family_label } ' ,
257- )
231+ for method_index , (xyzs , t0 , t_ex ) in enumerate (zip ([xyzs_0 , xyzs_1 ], [t0_0 , t0_1 ], [t_ex_0 , t_ex_1 ])):
232+ for xyz in xyzs :
233+ if colliding_atoms (xyz ):
234+ continue
235+ unique = True
236+ for other_tsg in rxn .ts_species .ts_guesses :
237+ if almost_equal_coords (xyz , other_tsg .initial_xyz ):
238+ if 'linear' not in other_tsg .method .lower ():
239+ other_tsg .method += f' and Linear { method_index } '
240+ unique = False
241+ break
242+ if unique :
243+ ts_guess = TSGuess (method = f'linear { method_index } ' ,
244+ index = len (rxn .ts_species .ts_guesses ),
245+ method_index = method_index ,
246+ t0 = t0 ,
247+ execution_time = t_ex ,
248+ success = True ,
249+ family = family_label ,
250+ xyz = xyz ,
251+ )
252+ rxn .ts_species .ts_guesses .append (ts_guess )
253+ save_geo (xyz = xyz ,
254+ path = self .local_path ,
255+ filename = f'Linear { method_index } ' ,
256+ format_ = 'xyz' ,
257+ comment = f'Linear { method_index } , family: { family_label } ' ,
258+ )
258259
259260 if len (self .reactions ) < 5 :
260261 successes = len ([tsg for tsg in rxn .ts_species .ts_guesses if tsg .success and 'linear' in tsg .method ])
@@ -275,7 +276,7 @@ def execute_queue(self):
275276
276277def interpolate (rxn : 'ARCReaction' ,
277278 use_weights : bool = False ,
278- ) -> Optional [dict ]:
279+ ) -> Optional [List [ dict ] ]:
279280 """
280281 Search for a TS by interpolating internal coords.
281282
@@ -284,7 +285,7 @@ def interpolate(rxn: 'ARCReaction',
284285 use_weights (bool, optional): Whether to use the well energies to determine relative interpolation weights.
285286
286287 Returns:
287- Optional[dict]: The XYZ coordinates guess .
288+ Optional[List[ dict]]: Entries are the XYZ coordinate guesses .
288289 """
289290 if rxn .is_isomerization ():
290291 return interpolate_isomerization (rxn = rxn , use_weights = use_weights )
@@ -295,7 +296,7 @@ def interpolate(rxn: 'ARCReaction',
295296
296297def interpolate_isomerization (rxn : 'ARCReaction' ,
297298 use_weights : bool = False ,
298- ) -> Optional [dict ]:
299+ ) -> Optional [List [ dict ] ]:
299300 """
300301 Search for a TS of an isomerization reaction by interpolating internal coords.
301302
@@ -304,23 +305,25 @@ def interpolate_isomerization(rxn: 'ARCReaction',
304305 use_weights (bool, optional): Whether to use the well energies to determine relative interpolation weights.
305306
306307 Returns:
307- Optional[dict]: The XYZ coordinates guess .
308+ Optional[List[ dict]]: Entries are the XYZ coordinate guesses .
308309 """
309310 rxn .r_species [0 ].get_xyz ()
310311 rxn .p_species [0 ].get_xyz ()
311312 r_zmat = xyz_to_zmat (xyz = rxn .r_species [0 ].get_xyz (),
312313 consolidate = False ,
313314 atom_order = list (range (sum (r .number_of_atoms for r in rxn .r_species ))))
314- p_zmat = xyz_to_zmat (xyz = rxn .p_species [0 ].get_xyz (),
315- consolidate = False ,
316- atom_order = rxn .atom_map )
317315 weight = get_rxn_weight (rxn ) if use_weights else 0.5
318- if weight is None :
319- return None
320- ts_zmat = average_zmat_params (zmat_1 = r_zmat , zmat_2 = p_zmat , weight = weight )
321- if ts_zmat is None :
316+ if weight is None or rxn .atom_maps is None :
322317 return None
323- return zmat_to_xyz (ts_zmat )
318+ ts_xyzs = list ()
319+ for atom_map in rxn .atom_maps :
320+ p_zmat = xyz_to_zmat (xyz = rxn .p_species [0 ].get_xyz (),
321+ consolidate = False ,
322+ atom_order = atom_map )
323+ ts_zmat = average_zmat_params (zmat_1 = r_zmat , zmat_2 = p_zmat , weight = weight )
324+ if ts_zmat is not None :
325+ ts_xyzs .append (zmat_to_xyz (ts_zmat ))
326+ return ts_xyzs
324327
325328
326329def average_zmat_params (zmat_1 : dict ,
0 commit comments