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

Define conformer single point calculation after optimization #766

Merged
merged 8 commits into from
Nov 4, 2024

Conversation

JintaoWu98
Copy link
Member

@JintaoWu98 JintaoWu98 commented Sep 15, 2024

  1. We change the name of job_type conformers to conf_opt.
  2. We define a new job_type conf_sp.
  3. We can now calculate the sp value after the optimization job using the level of theory in conformer_sp_level.
  4. Save the conformers_after_optimization.txt using the updated level of theory and energies specified in conformer_sp_level, if it is being used.

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 69 lines in your changes missing coverage. Please review.

Project coverage is 74.04%. Comparing base (fb16f4a) to head (9444375).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
arc/scheduler.py 7.69% 42 Missing and 6 partials ⚠️
arc/main.py 46.66% 5 Missing and 3 partials ⚠️
arc/checks/common.py 33.33% 1 Missing and 1 partial ⚠️
arc/job/adapters/orca.py 0.00% 0 Missing and 2 partials ⚠️
arc/job/adapters/qchem.py 0.00% 1 Missing and 1 partial ⚠️
arc/job/adapters/terachem.py 0.00% 2 Missing ⚠️
arc/job/trsh.py 0.00% 0 Missing and 2 partials ⚠️
arc/plotter.py 33.33% 1 Missing and 1 partial ⚠️
arc/job/adapters/cfour.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #766      +/-   ##
==========================================
- Coverage   74.09%   74.04%   -0.06%     
==========================================
  Files         101      101              
  Lines       28005    28030      +25     
  Branches     5860     5870      +10     
==========================================
+ Hits        20751    20754       +3     
- Misses       5786     5802      +16     
- Partials     1468     1474       +6     
Flag Coverage Δ
?
unittests 74.04% <40.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JintaoWu98 JintaoWu98 force-pushed the conf_opt_level branch 2 times, most recently from 47882b1 to 0577e94 Compare September 16, 2024 11:08
@JintaoWu98 JintaoWu98 force-pushed the conf_opt_level branch 2 times, most recently from 0107934 to 0577e94 Compare September 26, 2024 04:17
@JintaoWu98 JintaoWu98 changed the title Define conformer_sp_level Define conformer single point calculation after optimization Oct 17, 2024
@JintaoWu98 JintaoWu98 requested a review from alongd October 17, 2024 13:35
Copy link
Member

@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.

Looking good! I added some minor comments and questions

arc/main.py Outdated
@@ -169,6 +170,7 @@ class ARC(object):
level_of_theory (str): A shortcut representing either sp//geometry levels or a composite method.
composite_method (Level): Composite method.
conformer_opt_level (Level): Level of theory for conformer searches.
conformer_sp_level (str, dict, Level, optional): Level of theory for conformer sp jobs after opt.
Copy link
Member

Choose a reason for hiding this comment

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

please remove "optional" (arguments can be optional, not attributes)
Why are the types of conformer_opt_level and conformer_sp_level different?

Copy link
Member Author

Choose a reason for hiding this comment

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

The difference was a mistake, it's fixed now.

@@ -91,6 +91,7 @@

# List here job types to execute by default
default_job_types = {'conf_opt': True, # defaults to True if not specified
'conf_sp': False, # defaults to True if not specified
Copy link
Member

Choose a reason for hiding this comment

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

please fix the comment to False as well (also align)

if not sp_flag:
content += f'Conformers for {label}, optimized at the {level_of_theory} level:\n\n'
else:
content += f'Conformers for {label}, single point calculation at the {level_of_theory} level:\n\n'
Copy link
Member

Choose a reason for hiding this comment

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

will ARC now save two files, for conf_opt and for conf_sp, or will it override one?

Copy link
Member Author

@JintaoWu98 JintaoWu98 Oct 18, 2024

Choose a reason for hiding this comment

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

In our previous discussion, we wanted to overwrite it, meaning conf_sp will overwrite conf_opt if it exists. But feel free to let me know if we need to change it.

arc/scheduler.py Outdated
@@ -547,20 +547,27 @@ def schedule_jobs(self):
continue
job_list = self.running_jobs[label]
for job_name in job_list:
if 'conformer' in job_name:
if 'conf_opt' in job_name or 'conf_sp' in job_name:
Copy link
Member

Choose a reason for hiding this comment

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

maybe check here if 'conf_' in job_name?

arc/scheduler.py Outdated
xyz=self.species_dict[label].conformers[i],
level_of_theory=self.conformer_sp_level,
job_type='conf_sp',
conformer=i,)
Copy link
Member

Choose a reason for hiding this comment

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

you can remove the comma at the end here

arc/scheduler.py Outdated
self.job_dict[label]['conf_opt'] = dict()
if 'conf_sp' not in self.job_dict[label] and job_type == 'conf_sp':
self.job_dict[label]['conf_sp'] = dict()
if job_type == 'conf_opt':
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we can replace these four lines with
self.job_dict[label][job_type][conformer] = job # save job object
?

arc/scheduler.py Show resolved Hide resolved
arc/scheduler.py Outdated
content += job_name + ', '
elif job_type == 'conformers':
elif job_type == 'conf_opt':
Copy link
Member

Choose a reason for hiding this comment

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

shall we also restore conf_sp jobs here?

At this branch, we would like to define a new job_type during our conformer search, `conf_sp`, which will be run after the conformer optimization job. Thus, we want to distinguish them by giving a new name `conf_opt`.
Copy link
Member

@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!

@alongd alongd merged commit f20c453 into main Nov 4, 2024
5 of 7 checks passed
@alongd alongd deleted the conf_opt_level branch November 4, 2024 06:20
calvinp0 added a commit that referenced this pull request Dec 2, 2024
This is a follow-up to PR #766 and aims to refine the existing
implementation by adhering to a consistent job naming standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants