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

QC-program keywords #239

Merged
merged 4 commits into from
Mar 23, 2023
Merged

QC-program keywords #239

merged 4 commits into from
Mar 23, 2023

Conversation

jthorton
Copy link
Contributor

Description

Fixes #238 by adding a program-based keyword generator until we have a general interface to accept keywords.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • TODO 1

Questions

  • should I also extend the qc task to accept keywords so the user can set them? Then the new function _get_program_keywords could add program-specific keywords needed from our experience that are missing from the provided dictionary.

Status

  • Ready to go

@jthorton
Copy link
Contributor Author

needs #235 for testing faliures

@Yoshanuikabundi Yoshanuikabundi added this to the v0.2.1 milestone Mar 16, 2023
@Yoshanuikabundi
Copy link
Contributor

Thanks for looking into this @jthorton! Can I just make sure I understand what's going on here?

We expose QCSubmit's QCSpec class to users to define the calculation they want to make, but then when defining the tasks we want to run we only take the method, basis, and program and everything else is ignored. This happens here (is default_qc_specs used anywhere else? My IDE couldn't find anything else).

We want to add the 'muted' verbosity keyword to fix #238, so we're adding some code to add that keyword at the end to the specification of the QC job as an interim fix until something better can be worked out.

Have I got that right? If that's right, then I think this is great. I might also add a note to the big refactor issue that we should move away from using QCSpec here, since we don't support most of its settings?

@jthorton
Copy link
Contributor Author

jthorton commented Mar 16, 2023

Hi, @Yoshanuikabundi that's right!

Our main reason for using QCSpec is the validation it provides on the combination of method, basis, program and implicit solvent but a few other fields are redundant like the spec name or description. Ideally, I think we would offer a base model in qcsubmit which still has this validation but with these redundant terms removed. We might also consider splitting the specification classes to offer even better validation or maybe even program-specific validation

The main features we will want here are validation of the method, basis and program combination along with the ability to pass keywords and possibly the validation of implicit solvent settings.

Copy link
Contributor

@Yoshanuikabundi Yoshanuikabundi left a comment

Choose a reason for hiding this comment

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

This looks good! I'd like to add tests as we add new features, so I've written one in #244 - It's a PR to this PR. If you like it (after any tweaks you wanna make), could you merge it in here and make sure CI passes before merging this? Thanks @jthorton!

Also - do you know if its possible for the keyword to be set incorrectly in the input and then not get passed on to XTB without raising an error? Or do you know a way to test that the keyword was correctly set in tests?

@jthorton
Copy link
Contributor Author

Thanks for adding the test.

do you know if its possible for the keyword to be set incorrectly in the input and then not get passed on to XTB without raising an error?

With most keywords, if it is misspelt it just won't be set by the wrapper around the program, and errors will only be raised if the value is incorrect in most cases. This is why we tried to build some validation into the QCSpec class to catch these before run time and would be another point in favour of more specialised program-specific keyword validation.

With regard to testing this case, it would make sense to check that the output is empty from each single point calculation to confirm the keyword was correct and accepted however the result is currently striped by the worker here to make the results objects smaller. The test does check that the keyword was inserted though which in this case is the best we can do I would say.

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #239 (848100f) into main (ac5dd88) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

@jthorton jthorton merged commit 6b57aa6 into main Mar 23, 2023
@jthorton jthorton deleted the xtb_verbosity branch March 23, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fitting failing due to too many open files
2 participants