Skip to content

Commit

Permalink
Merge pull request #124 from ReactionMechanismGenerator/tsg
Browse files Browse the repository at this point in the history
 Allow defining a TS species simply with .xyz guesses
  • Loading branch information
alongd committed Apr 30, 2019
2 parents 355f6a3 + 6bd5345 commit 5b39b88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,9 @@ def run_ts_conformer_jobs(self, label):
elif len(self.species_dict[label].conformers) == 1:
if 'opt' not in self.job_dict[label] and 'composite' not in self.job_dict[label]:
# proceed only if opt (/composite) not already spawned
if self.species_dict[label].rxn_label is None:
raise SchedulerError('TS {0} is missing a reaction label'.format(label))
rxn = ' ' if not self.species_dict[label].is_ts else\
' of reaction ' + self.species_dict[label].rxn_label
rxn = ''
if self.species_dict[label].rxn_label is not None:
rxn = ' of reaction ' + self.species_dict[label].rxn_label
logging.info('Only one TS guess is available for species {0}{1},'
' using it for geometry optimization'.format(label, rxn))
self.species_dict[label].initial_xyz = self.species_dict[label].conformers[0]
Expand Down
10 changes: 10 additions & 0 deletions arc/species/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,16 @@ def generate_conformers(self):
tsg_index = 0
self.successful_methods = list()
self.unsuccessful_methods = list()
for i, xyz in enumerate(self.conformers):
# when defining a TS species with xyz, it is saved in self.conformers via self.process_xyz()
# make TSGuess objects out of them if don't already exist
for tsg in self.ts_guesses:
if xyz == tsg.xyz:
break
else:
self.ts_guesses.append(TSGuess(method='user guess {0}'.format(i), xyz=xyz))
self.ts_guesses[-1].success = True
self.conformers = list()
for tsg in self.ts_guesses:
if tsg.success:
self.conformers.append(tsg.xyz)
Expand Down

0 comments on commit 5b39b88

Please sign in to comment.