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

Use the Gaussian check file #100

Merged
merged 7 commits into from
Apr 10, 2019
Merged

Use the Gaussian check file #100

merged 7 commits into from
Apr 10, 2019

Conversation

alongd
Copy link
Member

@alongd alongd commented Mar 21, 2019

The Gaussian check file check.chk will now be used from previous Gaussian jobs to speed up subsequent jobs and maintain WF consistency.
The most recent path of a check file from a composite / opt / conformer job is saved as a Species attribute, and passed to the next job executed for this species. If the next job uses Gaussian, the check file will be uploaded along with the input file (and will be used).

@alongd alongd added Topic: ESS Electronic Structure Software Module: Job Type: Feature labels Mar 21, 2019
@alongd alongd requested a review from dranasinghe March 21, 2019 14:42
@alongd
Copy link
Member Author

alongd commented Mar 21, 2019

@dranasinghe, try using this branch, please let me know if it behaves as expected. Thanks!

@codecov
Copy link

codecov bot commented Mar 21, 2019

Codecov Report

Merging #100 into master will decrease coverage by 0.38%.
The diff coverage is 13.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
- Coverage   40.52%   40.13%   -0.39%     
==========================================
  Files          22       22              
  Lines        5419     5511      +92     
  Branches     1415     1451      +36     
==========================================
+ Hits         2196     2212      +16     
- Misses       2872     2942      +70     
- Partials      351      357       +6
Impacted Files Coverage Δ
arc/job/submit.py 100% <ø> (ø) ⬆️
arc/job/job.py 18.31% <10.2%> (-0.37%) ⬇️
arc/scheduler.py 19.57% <20%> (-0.04%) ⬇️
arc/main.py 45.22% <22.22%> (+0.07%) ⬆️
arc/species/species.py 58.72% <25%> (-0.42%) ⬇️
arc/reaction.py 41.47% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ea8a57...0d2b704. Read the comment docs.

@alongd
Copy link
Member Author

alongd commented Mar 22, 2019

I think I haven't added guess=read to the input files if the check file is available...

Copy link
Member Author

@alongd alongd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these additions, @dranasinghe !
Please see the comments here

arc/job/job.py Outdated
@@ -150,21 +150,21 @@ def __init__(self, project, settings, species_name, xyz, job_type, level_of_theo
self.method, self.basis_set))
self.software = 'gaussian'
elif 'b97' in self.method or 'm06-2x' in self.method or 'def2' in self.basis_set:
if not self.settings['qchem']:
raise JobError('Could not find the QChem software to run {0}/{1}'.format(
if not self.settings['gaussian']:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, let's make QChem the fallback software if Gaussian isn't found.
Also, QChem should deal with m06-2x, and Gaussian should deal with m062x (is this correct?)
Same comment for scan jobs below

arc/job/job.py Outdated
if self.fine:
# Note that the Acc2E argument is not available in Gaussian03
fine = 'scf=(tight, direct) integral=(grid=ultrafine, Acc2E=12)'
fine = 'scf=(tight, direct) integral=(grid=ultrafine, Acc2E=12) guess=read'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine is appended to job_type_1 when writing the input file. This will result in having both guess=mix and guess=read in the same Gaussian directive. Is this the desirable behaviour?

arc/job/job.py Outdated
@@ -491,7 +491,7 @@ def write_input_file(self):

if self.job_type == 'sp':
if self.software == 'gaussian':
job_type_1 = 'scf=(tight, direct) integral=(grid=ultrafine, Acc2E=12)'
job_type_1 = 'scf=(tight, direct) integral=(grid=ultrafine, Acc2E=12) guess=read'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the optimization was done in a different software, and then we run sp in Gaussian? Will it complain if it has guess=read when the checkfile isn't available?

arc/job/job.py Outdated
if os.path.isfile(self.checkfile):
self._upload_check_file(local_check_file_path=self.checkfile)
if self.checkfile is not None:
if os.path.isfile(self.checkfile):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to if self.checkfile is not None and os.path.isfile(self.checkfile):

arc/job/job.py Outdated
@@ -588,6 +589,7 @@ def _upload_check_file(self, local_check_file_path=None):
else local_check_file_path
if os.path.isfile(local_check_file_path) and self.software.lower() == 'gaussian':
ssh.upload_file(remote_file_path=remote_check_file_path, local_file_path=local_check_file_path)
logging.info('uploading checkpoint file\n')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this logging statement added on purpose, or was it left from debugging and testing this brunch?
If we choose to keep it, maybe change logging.info to logging.debug to only log this when debugging?

arc/main.py Outdated
@@ -84,7 +84,7 @@ def __init__(self, input_dict=None, project=None, arc_species_list=None, arc_rxn
ts_guess_level='', fine=True, generate_conformers=True, scan_rotors=True, use_bac=True,
model_chemistry='', ess_settings=None, initial_trsh=None, t_min=None, t_max=None, t_count=None,
verbose=logging.INFO, project_directory=None, max_job_time=120, allow_nonisomorphic_2d=False,
job_memory=1500):
job_memory=15000):
Copy link
Member Author

@alongd alongd Mar 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also change the default memory in Scheduler's init function.
Then, In Scheduler under troubleshoot_ess() where we increase the memory allocation, we should use a multiplication factor instead of the current memory = 3000 assignment.

We should also check that this works OK for molpro, where memory is specified in MW, and I think ARC just divides the value here by 2 for a rough estimation. 7500 MW is feasible, but might consume too much resources on the RMG server.
Currently we do in job.py:

        if self.software == 'molpro':
            # molpro's memory is in MW, 750 should be enough
            memory /= 2
        self.memory = memory

to store the latest Gaussian check.chk file
Also store conformers check files in `conformer_checkfiles`
Also upload and dowload the check file
Also updated job.software determination by level of theory
If the check file doesn't exist, it will compain but continue to execute
the next command
also other minor style changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Job Topic: ESS Electronic Structure Software Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant