Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous changes #109

Merged
merged 42 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c2c8956
Added examples to gitignore
alongd Mar 28, 2019
cc49247
Allow users to specify the number of cpu's to use per server
alongd Mar 28, 2019
7c7ebbc
Minor: changed `except Error as e` if `e` isn't being used
alongd Mar 28, 2019
6d9b41a
Download additional info re failed jobs
alongd Mar 28, 2019
82956ad
Minor: Convert `if` to `elif` in job ess error identification
alongd Mar 28, 2019
77d27ff
Minor: Modification to job error messages
alongd Mar 28, 2019
0b70824
Make sure initial and final job times are defined
alongd Mar 28, 2019
e57ed27
Added fail-safe try-except blocks in ssh
alongd Mar 28, 2019
c1fa402
Renamed `visualize_orbitals` as `run_orbitals`
alongd Mar 28, 2019
c2513f4
Minor robustness changes to Species
alongd Mar 28, 2019
e7f9ec8
Correcting scan_level assignments, particularly for composite methods
alongd Mar 28, 2019
e4f25b2
Avoid paranthesis in unique species name
alongd Mar 28, 2019
d85deeb
Don't crush if a stat_mech job fails
alongd Mar 28, 2019
39566d9
Append species to thermo library only after calculating thermo for it
alongd Mar 28, 2019
ea3f6c0
Make sure we get initial_xyz from conformers_path
alongd Mar 28, 2019
83c5a54
Troubleshooting improvements
alongd Mar 28, 2019
9d399bd
Added levels_ess to settings
alongd Mar 28, 2019
c6f2176
Changed ess_settings to contain a list of servers
alongd Mar 28, 2019
85716a2
Tests: Adapt `ess_settings` syntax
alongd Mar 29, 2019
170da71
Tests: Update to the run_orbitals syntax
alongd Mar 29, 2019
20c5fc5
Added ess_settings to settings.py instead of the API
alongd Mar 29, 2019
c7ab677
Added testing to job
alongd Mar 29, 2019
86bd59d
Tests: Functions in main
alongd Mar 29, 2019
3c2c7e5
Changed default levels of theory for conformers and orbitals
alongd Mar 29, 2019
ed05744
Added number_of_atoms as a property of Species
alongd Mar 29, 2019
84f7083
Tests: Species number of atoms
alongd Mar 29, 2019
716d0e0
Minor: Chnaged syntax of input_dict['verbose'] in ARC.py
alongd Mar 31, 2019
1e26db3
Minor: Enhanced error and debug messages in Job
alongd Apr 2, 2019
25d35f6
Corrected default values for max_job_time and job_memory
alongd Apr 2, 2019
433067b
Run statemech in Processor using a single method
alongd Apr 2, 2019
e183ea1
Dont run opt if `geo` is present in the output dictionary
alongd Apr 2, 2019
6579582
Don't crush ARC if cannot order atoms
alongd Apr 2, 2019
0db95a9
Correctly assing S/D BAC to aromatic species
alongd Apr 2, 2019
4e4aa9a
TS species are allowed to be loaded w/o structure or xyz
alongd Apr 2, 2019
923355b
Combine TSError for unrecognized TSGuess methods
alongd Apr 2, 2019
73782c5
Minor: Reordered Exceptions
alongd Apr 2, 2019
1b58718
Don't throw a SpecieError of no structure if conformers are available
alongd Apr 2, 2019
99dc7a0
Minor: Text addition to project info file
alongd Apr 2, 2019
7cb194d
Capture AutoTST TSErrors in Scheduler
alongd Apr 2, 2019
eee93c9
BugFix: Only consider converged TSGuesses for min(energies)
alongd Apr 2, 2019
dc8a46a
BugFix: Determine stable conformers and run them
alongd Apr 2, 2019
ea19450
Minor: Changed `if not x in` to `if x not in`
alongd Apr 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# PyCharm project files
.idea/*

# settings file
arc/settings.py

# Projects
Projects/

# Examples
examples/

# Unit test files
.coverage
testing/*
Expand Down
5 changes: 1 addition & 4 deletions ARC.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ def main():
verbose = logging.DEBUG
elif args.quiet:
verbose = logging.WARNING
try:
input_dict['verbose']
except KeyError:
input_dict['verbose'] = verbose
input_dict['verbose'] = input_dict['verbose'] if 'verbose' in input_dict else verbose
arc_object = ARC(input_dict=input_dict, project_directory=project_directory)
arc_object.execute()

Expand Down
40 changes: 20 additions & 20 deletions arc/arc_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,71 +13,71 @@ class InputError(Exception):
pass


class OutputError(Exception):
class JobError(Exception):
"""
This exception is raised whenever an error occurs while saving output information
An exception class for exceptional behavior that occurs while working with jobs
"""
pass


class SettingsError(Exception):
class OutputError(Exception):
"""
An exception raised when dealing with settings
This exception is raised whenever an error occurs while saving output information
"""
pass


class SpeciesError(Exception):
class ReactionError(Exception):
"""
An exception class for exceptional behavior that occurs while working with chemical species
An exception class for exceptional behavior that occurs while working with reactions
"""
pass


class TSError(Exception):
class RotorError(Exception):
"""
An exception class for exceptional behavior that occurs while working with transition states
An exception class for exceptional behavior that occurs while working with rotors
"""
pass


class ReactionError(Exception):
class SanitizationError(Exception):
"""
An exception class for exceptional behavior that occurs while working with reactions
Exception class to handle errors during SMILES perception.
"""
pass


class RotorError(Exception):
class SchedulerError(Exception):
"""
An exception class for exceptional behavior that occurs while working with rotors
An exception class for exceptional behavior that occurs while working with the scheduler
"""
pass


class SchedulerError(Exception):
class ServerError(Exception):
"""
An exception class for exceptional behavior that occurs while working with the scheduler
An exception class for exceptional behavior that occurs while working with servers
"""
pass


class JobError(Exception):
class SettingsError(Exception):
"""
An exception class for exceptional behavior that occurs while working with jobs
An exception raised when dealing with settings
"""
pass


class ServerError(Exception):
class SpeciesError(Exception):
"""
An exception class for exceptional behavior that occurs while working with servers
An exception class for exceptional behavior that occurs while working with chemical species
"""
pass


class SanitizationError(Exception):
class TSError(Exception):
"""
Exception class to handle errors during SMILES perception.
An exception class for exceptional behavior that occurs while working with transition states
"""
pass
4 changes: 2 additions & 2 deletions arc/job/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
input_files = {
'gaussian': """%chk=check.chk
%mem={memory}mb
%nproc=8
%nproc={cpus}
#P {job_type_1} {restricted}{method}{slash}{basis} {job_type_2} {fine} {trsh} iop(2/9=2000)
Expand Down Expand Up @@ -113,7 +113,7 @@
""",

'arkane_species': """#!/usr/bin/env python
'arkane_input_species': """#!/usr/bin/env python
# -*- coding: utf-8 -*-
linear = {linear}{bonds}
Expand Down
283 changes: 192 additions & 91 deletions arc/job/job.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions arc/job/jobTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def setUpClass(cls):
A method that is run before all unit tests in this class.
"""
cls.maxDiff = None
settings = {'gaussian': 'server1', 'molpro': 'server2', 'qchem': 'server1', 'ssh': False}
cls.job1 = Job(project='project_test', settings=settings, species_name='tst_spc', xyz='C 0.0 0.0 0.0',
job_type='opt', level_of_theory='b3lyp/6-31+g(d)', multiplicity=1,
ess_settings = {'gaussian': ['server1','server2'], 'molpro': ['server2'], 'qchem': ['server1'], 'ssh': False}
cls.job1 = Job(project='project_test', ess_settings=ess_settings, species_name='tst_spc', xyz='C 0.0 0.0 0.0',
job_type='opt', level_of_theory='b3lyp/6-31+g(d)', multiplicity=1, testing=True,
project_directory=os.path.join(arc_path, 'Projects', 'project_test'), fine=True, job_num=100)
cls.job1.initial_time = datetime.datetime(2019, 3, 15, 19, 53, 7, 0)
cls.job1.final_time = datetime.datetime(2019, 3, 15, 19, 53, 8, 0)
Expand Down
11 changes: 9 additions & 2 deletions arc/job/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def _download_file(self, remote_file_path, local_file_path):
Download a file from `remote_file_path` to `local_file_path`.
"""
sftp, ssh = self.connect()
sftp.get(remotepath=remote_file_path, localpath=local_file_path)
try:
sftp.get(remotepath=remote_file_path, localpath=local_file_path)
except IOError:
logging.warning('Got an IOError when trying to download file {0} from {1}'.format(remote_file_path,
self.server))
sftp.close()
ssh.close()

Expand Down Expand Up @@ -257,7 +261,10 @@ def try_connecting(self):
def get_last_modified_time(self, remote_file_path):
"""returns the last modified time of `remote_file` in a datetime format"""
sftp, ssh = self.connect()
timestamp = sftp.stat(remote_file_path).st_mtime
try:
timestamp = sftp.stat(remote_file_path).st_mtime
except IOError:
return None
sftp.close()
ssh.close()
return datetime.datetime.fromtimestamp(timestamp)
Expand Down
69 changes: 53 additions & 16 deletions arc/job/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#SBATCH -p defq
#SBATCH -J {name}
#SBATCH -N 1
#SBATCH -n 8
#SBATCH -n {cpus}
#SBATCH --time={t_max}
#SBATCH --mem-per-cpu 4500
Expand Down Expand Up @@ -48,14 +48,55 @@
rm -rf $GAUSS_SCRDIR
rm -rf $WorkDir
""",
# Gaussian16 on RMG
'gaussian16': """#!/bin/bash -l
#SBATCH -p long
#SBATCH -J {name}
#SBATCH -N 1
#SBATCH -n {cpus}
#SBATCH --time={t_max}
#SBATCH --mem-per-cpu={mem_cpu}
which 16
echo "============================================================"
echo "Job ID : $SLURM_JOB_ID"
echo "Job Name : $SLURM_JOB_NAME"
echo "Starting on : $(date)"
echo "Running on node : $SLURMD_NODENAME"
echo "Current directory : $(pwd)"
echo "============================================================"
WorkDir=/scratch/users/{un}/$SLURM_JOB_NAME-$SLURM_JOB_ID
SubmitDir=`pwd`
GAUSS_SCRDIR=/scratch/users/{un}/g16/$SLURM_JOB_NAME-$SLURM_JOB_ID
export GAUSS_SCRDIR
mkdir -p $GAUSS_SCRDIR
mkdir -p $WorkDir
cd $WorkDir
. $g16root/g16/bsd/g16.profile
cp $SubmitDir/input.gjf .
g16 < input.gjf > input.log
formchk check.chk check.fchk
cp * $SubmitDir/
rm -rf $GAUSS_SCRDIR
rm -rf $WorkDir
""",

# Orca on C3DDB:
'orca': """#!/bin/bash -l
#SBATCH -p defq
#SBATCH -J {name}
#SBATCH -N 1
#SBATCH -n 8
#SBATCH -n {cpus}
#SBATCH --time={t_max}
#SBATCH --mem-per-cpu 4500
Expand Down Expand Up @@ -95,7 +136,7 @@
#SBATCH -p long
#SBATCH -J {name}
#SBATCH -N 1
#SBATCH -n 8
#SBATCH -n {cpus}
#SBATCH --time={t_max}
#SBATCH --mem-per-cpu={mem_cpu}
Expand All @@ -112,7 +153,7 @@
sdir=/scratch/{un}/$SLURM_JOB_NAME-$SLURM_JOB_ID
mkdir -p $sdir
molpro -n 8 -d $sdir input.in
molpro -n {cpus} -d $sdir input.in
rm -rf $sdir
Expand All @@ -125,10 +166,9 @@
'gaussian': """#!/bin/bash -l
#$ -N {name}
#$ -l long
#$ -l harpertown
#$ -l long{architecture}
#$ -l h_rt={t_max}
#$ -pe singlenode 6
#$ -pe singlenode {cpus}
#$ -l h=!node60.cluster
#$ -cwd
#$ -o out.txt
Expand All @@ -152,10 +192,9 @@
'gaussian03_pharos': """#!/bin/bash -l
#$ -N {name}
#$ -l long
#$ -l harpertown
#$ -l long{architecture}
#$ -l h_rt={t_max}
#$ -pe singlenode 6
#$ -pe singlenode {cpus}
#$ -l h=!node60.cluster
#$ -cwd
#$ -o out.txt
Expand All @@ -179,10 +218,9 @@
'qchem': """#!/bin/bash -l
#$ -N {name}
#$ -l long
#$ -l harpertown
#$ -l long{architecture}
#$ -l h_rt={t_max}
#$ -pe singlenode 6
#$ -pe singlenode {cpus}
#$ -l h=!node60.cluster
#$ -cwd
#$ -o out.txt
Expand All @@ -207,10 +245,9 @@
'molpro': """#! /bin/bash -l
#$ -N {name}
#$ -l long
#$ -l harpertown
#$ -l long{architecture}
#$ -l h_rt={t_max}
#$ -pe singlenode 6
#$ -pe singlenode {cpus}
#$ -l h=!node60.cluster
#$ -cwd
#$ -o out.txt
Expand Down
Loading