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

Enable getting basis sets through BSE library #2905

Merged
merged 6 commits into from
Mar 22, 2023
Merged

Conversation

bennybp
Copy link
Member

@bennybp bennybp commented Mar 20, 2023

Description

This PR allows for using basis sets from the Basis Set Exchange library (https://github.com/MolSSI-BSE/basis_set_exchange) directly in psi4.

To use a basis set from the BSE, you prefix the name of the basis set with bse:. Optionally, you can specify the version with a suffix (like :1)

# use most recent def2-tzvp version
set basis bse:def2-tzvp

# specifically use version 0 of sto-3g
set basis bse:sto-3g:0

Also can be used with assign

basis  {
   assign DZ
   assign C bse:sto-3g:0
}

Using these of course requires that the BSE be installed. This should be accessible from both schema/json and psithon.

User API & Changelog headlines

  • Add capability to use basis sets from the Basis Set Exchange

Dev notes & details

  • Adds optional dependency to basis_set_exchange
  • Adds handling for basis sets that start with bse:
  • Modifies some regexes to allow for colons in basis set names

Questions

None

Checklist

Status

  • Ready for review
  • Ready for merge

@loriab loriab added enhancement external-interface For issues about interfaces with external programs: ADCC, CheMPS2, GDMA, MRCC... labels Mar 21, 2023
@loriab loriab added this to the Psi4 1.8 milestone Mar 21, 2023
psi4/driver/qcdb/libmintsbasisset.py Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@JonathonMisiewicz JonathonMisiewicz left a comment

Choose a reason for hiding this comment

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

Why does refscf disagree between mints2-bse and mints2?

@loriab
Copy link
Member

loriab commented Mar 22, 2023

Why does refscf disagree between mints2-bse and mints2?

I think Ben mentioned to me that it's because of revision of the basis set, and if a :0 (equals old PNNL BSE) version is used they match exactly.

@JonathonMisiewicz
Copy link
Contributor

The output file included in the PR uses :0 but is still showing disagreement with mints2. (The input and output files have different reference energies, which is more confusing.)

@loriab
Copy link
Member

loriab commented Mar 22, 2023

The "base" basis changed, too, from DZ to 6-31g. Only one atom left with it, if I'm reading it right.

mints2 (usual)

   # First, assign DZ to all atoms
   assign DZ
   # Now, assign 3-21G to all carbon atoms
   assign C my3-21G
   # The two atoms labelled H1 get a STO-3G basis two
   assign H1 sto-3g
   # Carbons 3 and 5 get a STO-3G basis, too
   assign C1 sto-3g

mints2-bse

   # First, assign DZ to all atoms
   assign bse:6-31g
   # Now, assign 3-21G from bse library all carbon atoms (latest version)
   assign C bse:3-21g
   # The two atoms labelled H1 get a STO-3G basis from psi4 library
   assign H1 sto-3g
   # Carbons 3 and 5 get a STO-3G basis from BSE, but specify v0
   assign C1 bse:sto-3g:0

@JonathonMisiewicz
Copy link
Contributor

Thanks. In that case, can we change the comment at the start of the file to mention that? As written, I thought the two energies were supposed to be identical.

@loriab
Copy link
Member

loriab commented Mar 22, 2023

Thanks. In that case, can we change the comment at the start of the file to mention that? As written, I thought the two energies were supposed to be identical.

Sounds good. This is why I like parameterized pytest for seeing the input differences.

@bennybp, did I get the why-different reasons right above? And if you're changing that comment, maybe regenerate the ref file w/o test fail:

https://github.com/psi4/psi4/pull/2905/files#diff-667f7008a6b3ab105b3130447305716990d91451c161ed7eaf1f04886bd32a00R361

@bennybp
Copy link
Member Author

bennybp commented Mar 22, 2023

Well that was sloppy of me. Thanks for catching that

@JonathonMisiewicz
Copy link
Contributor

I'm letting @loriab merge, since she's more familiar with MolSSI interfaces.

@loriab loriab merged commit ef66d38 into psi4:master Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement external-interface For issues about interfaces with external programs: ADCC, CheMPS2, GDMA, MRCC...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants