Skip to content

Commit

Permalink
Define a new method "post_opt_geo_work" for processing
Browse files Browse the repository at this point in the history
  • Loading branch information
JintaoWu98 committed Nov 27, 2023
1 parent 6022f3e commit dfc5ee1
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2285,34 +2285,10 @@ def parse_opt_geo(self,
if spc.multi_species == label:
# spc.final_xyz = opt_xyz_dict[spc.label]
self.species_dict[spc.label].final_xyz = opt_xyz_dict[spc.label]
self.output[spc.label]['job_types']['opt'] = True
if self.job_types['fine']:
self.output[spc.label]['job_types']['fine'] = True
self.species_dict[spc.label].opt_level = self.opt_level.simple()
plotter.save_geo(species=self.species_dict[spc.label], project_directory=self.project_directory)
if self.species_dict[spc.label].is_ts:
rxn_str = f' of reaction {self.species_dict[spc.label].rxn_label}' \
if self.species_dict[spc.label].rxn_label is not None else ''
else:
rxn_str = ''
logger.info(f'\nOptimized geometry for {spc.label}{rxn_str} at {job.level.simple()}:\n'
f'{xyz_to_str(self.species_dict[spc.label].final_xyz)}\n')
self.output[spc.label]['paths']['geo'] = job.local_path_to_output_file # will be overwritten with freq
self.post_opt_geo_work(spc.label, job)
else:
self.species_dict[label].final_xyz = opt_xyz
self.output[label]['job_types']['opt'] = True
if self.job_types['fine']:
self.output[label]['job_types']['fine'] = True
self.species_dict[label].opt_level = self.opt_level.simple()
plotter.save_geo(species=self.species_dict[label], project_directory=self.project_directory)
if self.species_dict[label].is_ts:
rxn_str = f' of reaction {self.species_dict[label].rxn_label}' \
if self.species_dict[label].rxn_label is not None else ''
else:
rxn_str = ''
logger.info(f'\nOptimized geometry for {label}{rxn_str} at {job.level.simple()}:\n'
f'{xyz_to_str(self.species_dict[label].final_xyz)}\n')
self.output[label]['paths']['geo'] = job.local_path_to_output_file # will be overwritten with freq
self.post_opt_geo_work(label, job)
if 'optfreq' in job.job_name:
self.check_freq_job(label, job)
self.save_restart_dict()
Expand All @@ -2339,6 +2315,21 @@ def parse_opt_geo(self,
self.troubleshoot_opt_jobs(label=label)
return success

def post_opt_geo_work(self, spc_label, job):
self.output[spc_label]['job_types']['opt'] = True
if self.job_types['fine']:
self.output[spc_label]['job_types']['fine'] = True
self.species_dict[spc_label].opt_level = self.opt_level.simple()
plotter.save_geo(species=self.species_dict[spc_label], project_directory=self.project_directory)
if self.species_dict[spc_label].is_ts:
rxn_str = f' of reaction {self.species_dict[spc_label].rxn_label}' \
if self.species_dict[spc_label].rxn_label is not None else ''
else:
rxn_str = ''
logger.info(f'\nOptimized geometry for {spc_label}{rxn_str} at {job.level.simple()}:\n'
f'{xyz_to_str(self.species_dict[spc_label].final_xyz)}\n')
self.output[spc_label]['paths']['geo'] = job.local_path_to_output_file # will be overwritten with freq

def check_freq_job(self,
label: str,
job: 'JobAdapter',
Expand Down

0 comments on commit dfc5ee1

Please sign in to comment.