Skip to content

Commit

Permalink
Merge pull request #132 from ReactionMechanismGenerator/job_types
Browse files Browse the repository at this point in the history
Activate the job_types flags for opt, freq, and sp
  • Loading branch information
alongd committed May 16, 2019
2 parents 1bb2739 + 8666df5 commit c8e6dc2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
8 changes: 5 additions & 3 deletions arc/job/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@
#SBATCH --time={t_max}
#SBATCH --mem-per-cpu {mem_cpu}
module add c3ddb/orca/4.0.0
module add c3ddb/openmpi/2.0.2
module add c3ddb/orca/4.1.2
module add c3ddb/openmpi/3.1.3
which orca
export ORCA_DIR=/cm/shared/c3ddb/orca/4.0.0/
export ORCA_DIR=/cm/shared/modulefiles/c3ddb/orca/4.1.2/
export OMPI_DIR=/cm/shared/modulefiles/c3ddb/openmpi/3.1.3/
export PATH=$PATH:$ORCA_DIR
export PATH=$PATH:$OMPI_DIR
echo "============================================================"
echo "Job ID : $SLURM_JOB_ID"
Expand Down
18 changes: 12 additions & 6 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ def __init__(self, project, ess_settings, species_list, composite_method, confor
if species.yml_path is None:
if self.job_types['1d_rotors'] and not self.species_dict[species.label].number_of_rotors:
self.species_dict[species.label].determine_rotors()
if not self.job_types['opt'] and self.species_dict[species.label].final_xyz is not None:
self.output[species.label]['status'] += 'opt converged; '
if species.label not in self.running_jobs:
self.running_jobs[species.label] = list() # initialize before running the first job
if not species.is_ts and species.number_of_atoms == 1:
Expand Down Expand Up @@ -324,7 +326,7 @@ def __init__(self, project, ess_settings, species_list, composite_method, confor
if 'sp' not in self.output[species.label] and 'sp' not in self.job_dict[species.label]:
self.run_sp_job(species.label)
if self.job_types['1d_rotors']:
# restart-related check are performed in run_scan_jobs()
# restart-related checks are performed in run_scan_jobs()
self.run_scan_jobs(species.label)
elif not self.species_dict[species.label].is_ts and self.job_types['conformers']\
and 'geo' not in self.output[species.label]:
Expand Down Expand Up @@ -667,6 +669,9 @@ def run_opt_job(self, label):
if 'opt' not in self.job_dict[label]: # Check whether or not opt jobs have been spawned yet
# we're spawning the first opt job for this species
self.job_dict[label]['opt'] = dict()
if self.species_dict[label].initial_xyz is None:
raise SpeciesError('Cannot execute opt job for {0} without xyz (got None for Species.initial_xyz)'.format(
label))
self.run_job(label=label, xyz=self.species_dict[label].initial_xyz, level_of_theory=self.opt_level,
job_type='opt', fine=False)

Expand All @@ -693,8 +698,9 @@ def run_freq_job(self, label):
if 'freq' not in self.job_dict[label]: # Check whether or not freq jobs have been spawned yet
# we're spawning the first freq job for this species
self.job_dict[label]['freq'] = dict()
self.run_job(label=label, xyz=self.species_dict[label].final_xyz,
level_of_theory=self.freq_level, job_type='freq')
if self.job_types['freq']:
self.run_job(label=label, xyz=self.species_dict[label].final_xyz,
level_of_theory=self.freq_level, job_type='freq')

def run_sp_job(self, label):
"""
Expand Down Expand Up @@ -738,7 +744,9 @@ def run_sp_job(self, label):
logging.info('running a CCSD job for {0} before MRCI'.format(label))
self.run_job(label=label, xyz=self.species_dict[label].final_xyz, level_of_theory='ccsd/vdz',
job_type='sp')
self.run_job(label=label, xyz=self.species_dict[label].final_xyz, level_of_theory=self.sp_level, 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')

def run_scan_jobs(self, label):
"""
Expand Down Expand Up @@ -1812,8 +1820,6 @@ def restore_running_jobs(self):
+ ' (conformer' + str(job_name) + ')' + ', '
content += '\n\n'
logging.info(content)
else:
logging.info('\nRestarting ARC. Did not identify any jobs spawned in previous sessions.\n')

def save_restart_dict(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion arc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# Avoid ascribing the same phrase to more than one server, this may cause undeterministic assignment of software
# Format is levels_ess = {ess: ['phrase1', 'phrase2'], ess2: ['phrase3', 'phrase3']}
levels_ess = {
'gaussian': ['b3lyp', 'm062x', '3df,3pd'],
'gaussian': ['b3lyp', 'm062x'],
'molpro': ['ccsd', 'cisd', 'vpz'],
'qchem': ['m06-2x', 'def2']
}
Expand Down

0 comments on commit c8e6dc2

Please sign in to comment.