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

Q-Chem: QCInput could handle JOBTYPE better in various ways #3481

Open
Andrew-S-Rosen opened this issue Nov 21, 2023 · 0 comments
Open

Q-Chem: QCInput could handle JOBTYPE better in various ways #3481

Andrew-S-Rosen opened this issue Nov 21, 2023 · 0 comments

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Nov 21, 2023

Problem

Part 1

valid_job_types = [
"opt",
"optimization",
"sp",
"freq",
"frequency",
"force",
"nmr",
"ts",
"pes_scan",
]

image

The list of valid job types in QCInput does not include all the valid ones that Q-Chem takes. I must admit, I don't really know why Pymatgen is bothering with checking the validity of the input flags (seems out of scope), but regardless, there are several missing.

Part 2

Also, QCInput will raise a ValueError if no job type is specified, but the default value in Q-Chem is "SP". So, QCInput should still be able to write an input file if no job type is explicitly specified by the user.

Part 3

EDIT: I guess this is more just me being pedantic. Let's ignore this one.

The appropriate name for the job type according to the Q-Chem manual is JOBTYPE (case-insensitive). However, QCInput internally uses job_type (with the underscore). To make sure QCInput handles things appropriately, it will automatically convert jobtype to job_type. This is, in principle, fine. However, one would expect that the written input file would revert back to what the Q-Chem manual states, which is jobtype without the underscore. QCInput does not do this.

Yes, this is minor, but I found this incredibly confusing as a new user of QCInput but existing user of Q-Chem itself. Presumably, Q-Chem ignores the underscores, although I was not aware of this since it doesn't seem to be documented anywhere.

Proposed Solution

Part 1

Add support for additional job types listed in the above table. While QCInput might not actually support all the various features, there are several job types that are valid and missing, e.g. "SINGLE_POINT" as a synonym to "SP". If some are not explicitly supported by QCInput, a different error should be raised specifically for those.

Part 2

Allow for no job type at all (i.e. effectively a single point).

Part 3

In the __str__ method of QCInput, switch back to using jobtype to be in alignment with the Q-Chem manual.

Alternatives

No response

@Andrew-S-Rosen Andrew-S-Rosen changed the title Q-Chem: QCInput does not support all valid JOBTYPE variables Q-Chem: QCInput could handle JOBTYPE better in various ways Nov 21, 2023
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

No branches or pull requests

1 participant