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

Catch Basis Set Errors in Parse Step #1332

Open
JonathonMisiewicz opened this Issue Nov 4, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@JonathonMisiewicz
Copy link
Contributor

JonathonMisiewicz commented Nov 4, 2018

Discovered yet again when trying to reproduce an issue reported on the forums. When I defined a custom basis set but forgot to include the final quadruple asterisk, the error message appeared when I attempted the scf and did not leave me any clues about what was wrong in the basis set. Such errors should be caught in the basis set input phase, where a usual error message can be printed.

It would be useful to try a few other basis inputs that break the parser and verify that a useful error message is printed in the parsing phase.

@JonathonMisiewicz

This comment has been minimized.

Copy link
Contributor

JonathonMisiewicz commented Nov 4, 2018

More playing with the same issue: this input file fails as written, but it works fine if I comment the assign line at the bottom and uncomment the lines in the basis block. I can't imagine why one case works but the other doesn't. This may be related to the failure initially reported here?

@loriab

This comment has been minimized.

Copy link
Member

loriab commented Nov 4, 2018

The basis block is anonymous, so the external following set basis mysvp doesn't have anything to hang onto. basis mysvp {...} is the preferred way to go.

I agree on the fragility of the gbs reader. The current is a direct translation from C++, which isn't a great language for parsing and error trapping. It could use an overhaul like mol got so we could do nice things like have a comment in a gbs file. I want to see what tools @bennybp has developed for the new Basis Set Exchange and also use schema as the medium of exchange between string and the psi4 nested dictionary that currently is the unit of basis set truth.

EDIT: "pickiness", not "fragility"

@JonathonMisiewicz

This comment has been minimized.

Copy link
Contributor

JonathonMisiewicz commented Nov 4, 2018

Good to know!

And naming the block and applying set basis_relativistic mysvp fixes the original forum issue. It would still be nice if the error message had told him the problem was needing to define basis_relativistic, though...

@JonathonMisiewicz

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment