Skip to content

Commit

Permalink
Minor: relocated invalidated for rotors in Scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Feb 23, 2019
1 parent 264b232 commit 94ef458
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ def check_scan_job(self, label, job):
break
v_last = v
# 2. Check conformation:
invalidated = ''
if not invalidate:
v_diff = (v_list[0] - np.min(v_list))
if v_diff >= 2 or v_diff > 0.5 * (max(v_list) - min(v_list)):
Expand All @@ -1008,17 +1009,15 @@ def check_scan_job(self, label, job):
self.run_opt_job(label) # run opt on new initial_xyz with the desired dihedral
else:
self.species_dict[label].rotors_dict[i]['success'] = True
else:
invalidated = '*INVALIDATED* '
symmetry = ''
if self.species_dict[label].rotors_dict[i]['success']:
self.species_dict[label].rotors_dict[i]['symmetry'], _ = determine_rotor_symmetry(
rotor_path=job.local_path_to_output_file, label=label,
pivots=self.species_dict[label].rotors_dict[i]['pivots'])
symmetry = ' has symmetry {0}'.format(self.species_dict[label].rotors_dict[i]['symmetry'])
if plot_scan:
invalidated = ''
if invalidate:
invalidated = '*INVALIDATED* '
message += invalidated
logging.info('{invalidated}Rotor scan {scan} between pivots {pivots}'
' for {label}{symmetry}'.format(invalidated=invalidated,
scan=self.species_dict[label].rotors_dict[i]['scan'],
Expand All @@ -1027,6 +1026,7 @@ def check_scan_job(self, label, job):
folder_name = 'rxns' if job.is_ts else 'Species'
rotor_path = os.path.join(self.project_directory, 'output', folder_name,
job.species_name, 'rotors')
message += invalidated
plotter.plot_rotor_scan(angle, v_list, path=rotor_path, pivots=job.pivots, comment=message)
else:
# scan job crashed
Expand Down

0 comments on commit 94ef458

Please sign in to comment.