-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support of non-standard basis set for Gaussian #221
Comments
This code snippet shows how to build a bais set for a given molecule, simple and fast from iodata import load_one
import basis_set_exchange as bse
mol = load_one("sample.sdf")
# get basis set information
selected_basis_set = bse.get_basis("def2-svpd",
fmt="gaussian94",
elements=mol.atnums.tolist(),
header=False) |
Thanks for keeping track of this. I believe for Gaussian, when using the gen keyword, the basis set for each element should only be listed once. We may needs something like |
Nice catch! We should use a list without duplicated elements (sort of Good to know |
I did some testing and extended the example to work out a specific case. This is just to get a better idea of how to proceed. Python script: from iodata import load_one, write_input
import basis_set_exchange as bse
mol = load_one("formamide.sdf")
basis_set = bse.get_basis(
"def2-svpd",
fmt="gaussian94",
elements=mol.atnums.tolist(),
header=False,
)
template = """\
#n {lot}/Gen {run_type}
{title}
{charge} {spinmult}
{geometry}
{basis_set}
"""
write_input(mol, "gaussian.com", "gaussian", template, basis_set=basis_set) The SDF file
This results in a valid Gaussian input file. The I'm not sure yet if we should build this into IOData, or just make sure it remains possible for users to use this approach in their own scripts. (We should at least add it as example to the documentation.) Implementing this inside IOData has the obvious advantage of convenience, but comes with some minor drawbacks as well: an extra dependency & (very minor) another option to control if built-in or |
At least from my point of view, adding the increasingly standard dependency on the basis-set-exchange would be outweighed by increased convenience. |
Good. It think it would become a much-loved feature. Should it be the default behavior? By the way, something similar is possible with ORCA, see https://sites.google.com/site/orcainputlibrary/basis-sets (see |
I'd be in favour of using BSE to do this, especially since it already prepares the formatted lines, so we could just put it right into the template. If we really wanted to be able to generate the non-standard basis from |
@wilhadams I hadn't thought yet of the second possibility you mention. It might be useful in some corner cases, e.g. when you have a |
Adding the Speaking of putting an example in the documentation, maybe we need to put more than one? Such as one example for regular geometry optimization and another to show how to handle multi-step jobs (https://gaussian.com/input/). This can show how useful |
Even the latest version of Gaussian will require the user to input exactly a non-standard basis set for the atoms in a given molecule, but give all the basic set for all the atoms will fail the Gaussian job. In this setting, we have to deal with the non-standard basis set properly.
It seems that we will need to add a dependency of bais set exchange. Although I know it's a pain to add a dependency,
bais_set_exchange
is not a giant one (~30 M).I have a naive idea that might work. We have two ways of generating input files for Gaussian:
iodata
. Then we set up another Template file along withbasis_set_exchange
to build an input file for Gaussian jobs.A possible, or even better solution, is to operate on the Template file where we can append
gen
keyword to the list of basis sets mentioned above. Then add none one more extra empty line at the end of the Template file. If it's the standard basis, we can just leave it as it is. Otherwise, we can substitute that line with the non-standard basis set.#188
@PaulWAyers @tovrstra @FarnazH
The text was updated successfully, but these errors were encountered: