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

Fix gaussian basis set #223

Merged
merged 6 commits into from
May 29, 2024
Merged

Fix gaussian basis set #223

merged 6 commits into from
May 29, 2024

Conversation

ladinesa
Copy link
Collaborator

A parsing error for gaussian has been reported for this upload . The basis set cannot be resolved so I simply set it to None, but @ndaelman-hu you should know more.

The method normalizer also fails so I put up a fix in nomad.

@ladinesa ladinesa requested a review from ndaelman-hu May 27, 2024 20:48
@coveralls
Copy link

coveralls commented May 27, 2024

Pull Request Test Coverage Report for Build 9285765274

Details

  • 6 of 7 (85.71%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.039%

Changes Missing Coverage Covered Lines Changed/Added Lines %
electronicparsers/gaussian/parser.py 6 7 85.71%
Totals Coverage Status
Change from base Build 9252035458: 0.0%
Covered Lines: 35712
Relevant Lines: 38384

💛 - Coveralls

@JosePizarro3
Copy link
Collaborator

Hi there,

I cannot see this upload, but is this the last one by Akseli Mansikkamäki (https://nomad-lab.eu/prod/v1/gui/upload/id/MASTxxsySg-SkFffP9j2Zw)? Do you know details on the data? I think he is studying magnetism in charged molecules, but I'd like to make sure.

@ndaelman-hu
Copy link
Contributor

Hi there,

I cannot see this upload, but is this the last one by Akseli Mansikkamäki (https://nomad-lab.eu/prod/v1/gui/upload/id/MASTxxsySg-SkFffP9j2Zw)? Do you know details on the data? I think he is studying magnetism in charged molecules, but I'd like to make sure.

Neither I can see the upload. @ladinesa Could you ask permissions to share the raw files or have us included?

Copy link
Contributor

@ndaelman-hu ndaelman-hu left a comment

Choose a reason for hiding this comment

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

This is okay for a quick fix. If I could take a look at the error or the raw files, I could probabaly hunt down the real reason.
In the past, there were issues matching the basis set specification due to Gaussian's formatting.

Comment on lines 1415 to 1420
BasisSetContainer(
type='atom-centered orbitals',
scope=['wavefunction'],
basis_set=[bs],
basis_set=[bs] if bs is not None else [],
)
]
Copy link
Contributor

Choose a reason for hiding this comment

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

You can leave out the entire BasisSetContainer if the requirement stands.

@ndaelman-hu
Copy link
Contributor

@ladinesa Okay, I got access to the failing upload. You made the right call: there simply isn't any basis set mentioned.
Likely, this is due to:

  1. this calculation starting from a previous SCF (not uploaded).
  2. this is a frequency calculation, with a different emphasis.

Still, this is pretty bad practice on Gaussian's side, as SCF routines shouldn't tacitly assume the basis set.
Fro the long-term, I'll see if I can hunt down their default, though Gaussian is likely to have some complex logic in assigning it.

@ndaelman-hu
Copy link
Contributor

@JosePizarro3 Regarding the upload you linked, all the Gaussian files parsed well there.
The issue seems to be with Orca, as we don't support CASSCF, yet. I have this on the planned list, but quite low.

We either add a schema there, or we harden the parsing not to fail for unrecognized methods.

@ndaelman-hu
Copy link
Contributor

Digging further, the default is STO-3G. I can see to improve on the current correction then.

@ladinesa
Copy link
Collaborator Author

@ndaelman there is a problematic test. is it possible for you to look at it so we can merge it already? thanks

Nathan Daelman added 3 commits May 29, 2024 12:52
- Remove double check with `basis_set_mappings`
- only add the default when no other basis sets are present
- do not allow uncaught settings to be added as basis sets
- Specify return type `resolve_basis_set`
@ndaelman-hu ndaelman-hu merged commit 1adcdff into develop May 29, 2024
4 checks passed
@ndaelman-hu
Copy link
Contributor

So, some final comments here that will lead to new issues:

  1. we need to add missing basis set specs to our tests
  2. we will have to extend "GEN" (or "Gen") parsing, as this indicates a user-defined basis set

@ndaelman-hu ndaelman-hu deleted the fix-guassian branch May 29, 2024 12:33
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.

5 participants