Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining a TS species simply with .xyz guesses #124

Merged
merged 2 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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