Skip to content

Commit

Permalink
Don't continue to process conformers if one is being troubleshooted (#…
Browse files Browse the repository at this point in the history
…637)

Fixes #636

Also added CH2's geometry
  • Loading branch information
alongd committed Apr 16, 2023
2 parents 8b01a7b + 4bee0f4 commit 8b1a8ee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ def schedule_jobs(self):
# this is a completed conformer job
successful_server_termination = self.end_job(job=job, label=label, job_name=job_name)
if successful_server_termination:
self.parse_conformer(job=job, label=label, i=i)
troubleshooting_conformer = self.parse_conformer(job=job, label=label, i=i)
if troubleshooting_conformer:
break
# Just terminated a conformer job.
# Are there additional conformer jobs currently running for this species?
for spec_jobs in job_list:
Expand Down Expand Up @@ -1845,6 +1847,9 @@ def parse_conformer(self,
job (JobAdapter): The conformer job object.
label (str): The TS species label.
i (int): The conformer index.
Returns:
bool: Whether the conformer job is being troubleshooted by running a new job.
"""
if job.job_status[1]['status'] == 'done':
xyz = parser.parse_geometry(path=job.local_path_to_output_file)
Expand All @@ -1868,6 +1873,8 @@ def parse_conformer(self,
logger.warning(f'Conformer {i} for {label} did not converge.')
if job.times_rerun == 0 and self.trsh_ess_jobs:
self._run_a_job(job=job, label=label, rerun=True)
return True
return False

def determine_most_stable_conformer(self, label):
"""
Expand Down
10 changes: 9 additions & 1 deletion arc/species/conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@
'index': 0,
'FF energy': 0,
'source': 'CHEAT_SHEET',
'torsion_dihedrals': {}}}
'torsion_dihedrals': {}},
'[CH2]': {'xyz': converter.str_to_xyz("""C 0.0 0.000000 0.1051320
H 0.0 0.988263 -0.3153960
H 0.0 -0.988263 -0.3153960"""),
'index': 0, # Singlet CH2 forms the same H-C-H angle as triplet CH2
'FF energy': 0,
'source': 'CHEAT_SHEET',
'torsion_dihedrals': {}},
}


def generate_conformers(mol_list: Union[List[Molecule], Molecule],
Expand Down

0 comments on commit 8b1a8ee

Please sign in to comment.