Skip to content

Commit

Permalink
Merge pull request #139 from ReactionMechanismGenerator/fix_job_types
Browse files Browse the repository at this point in the history
Fix job types
  • Loading branch information
alongd committed Jun 18, 2019
2 parents 515462f + 0b5840c commit b3b0cf8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
9 changes: 8 additions & 1 deletion arc/job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __init__(self, project, ess_settings, species_name, xyz, job_type, level_of_
raise JobError('Could not find the Gaussian software to run the double-hybrid method {0}.\n'
'ess_settings is:\n{1}'.format(self.method, self.ess_settings))
self.software = 'gaussian'
if 'ccs' in self.method or 'cis' in self.method or 'pv' in self.basis_set:
if 'ccs' in self.method or 'cis' in self.method:
if 'molpro' in self.ess_settings.keys():
self.software = 'molpro'
elif 'gaussian' in self.ess_settings.keys():
Expand Down Expand Up @@ -260,6 +260,13 @@ def __init__(self, project, ess_settings, species_name, xyz, job_type, level_of_
raise JobError('Could not find the Gaussian software to run {0}/{1}'.format(
self.method, self.basis_set))
self.software = 'gaussian'
if 'pv' in self.basis_set:
if 'molpro' in self.ess_settings.keys():
self.software = 'molpro'
elif 'gaussian' in self.ess_settings.keys():
self.software = 'gaussian'
elif 'qchem' in self.ess_settings.keys():
self.software = 'qchem'
else:
if 'gaussian' in self.ess_settings.keys():
self.software = 'gaussian'
Expand Down
24 changes: 19 additions & 5 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def __init__(self, project, ess_settings, species_list, composite_method, confor
and 'opt' not in self.job_dict[species.label] and not self.composite_method \
and 'geo' not in self.output[species.label]:
self.run_opt_job(species.label)
elif 'opt converged' in self.output[species.label]['status']:
elif 'opt converged' in self.output[species.label]['status'] and not self.composite_method:
# opt is done
if 'freq' not in self.output[species.label] and 'freq' not in self.job_dict[species.label]:
if self.species_dict[species.label].is_ts\
Expand Down Expand Up @@ -632,10 +632,22 @@ def run_conformer_jobs(self):
job_type='conformer', conformer=i)
elif len(self.species_dict[label].conformers) == 1:
logging.info('Only one conformer is available for species {0}, '
'using it for geometry optimization'.format(label))
'using it as initial xyz'.format(label))
self.species_dict[label].initial_xyz = self.species_dict[label].conformers[0]
if not self.composite_method:
self.run_opt_job(label)
if self.job_types['opt']:
self.run_opt_job(label)
else:
if self.job_types['freq']:
self.run_freq_job(label)
if self.job_types['sp']:
self.run_sp_job(label)
if self.job_types['1d_rotors']:
self.run_scan_jobs(label)
if self.job_types['onedmin']:
self.run_onedmin_job(label)
if self.job_types['orbitals']:
self.run_orbitals_job(label)
else:
self.run_composite_job(label)

Expand Down Expand Up @@ -746,8 +758,10 @@ def run_sp_job(self, label):
self.run_job(label=label, xyz=self.species_dict[label].final_xyz, level_of_theory='ccsd/vdz',
job_type='sp')
if self.job_types['sp']:
self.run_job(label=label, xyz=self.species_dict[label].final_xyz,
level_of_theory=self.sp_level, job_type='sp')
xyz = self.species_dict[label].final_xyz or self.species_dict[label].initial_xyz
if xyz is None:
xyz = self.species_dict[label].conformers[0]
self.run_job(label=label, xyz=xyz, level_of_theory=self.sp_level, job_type='sp')

def run_scan_jobs(self, label):
"""
Expand Down
2 changes: 1 addition & 1 deletion arc/species/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def determine_multiplicity(self, smiles, adjlist, mol):
if xyz is None and len(self.conformers):
xyz = self.conformers[0]
if xyz:
_, atoms, _, _, _ = get_xyz_matrix(xyz)
atoms = get_xyz_matrix(xyz)[1]
electrons = 0
for atom in atoms:
for number, symbol in symbol_by_number.items():
Expand Down

0 comments on commit b3b0cf8

Please sign in to comment.