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

Adds tutorial for using Psi4's SADGuess class #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schiebermc
Copy link

@schiebermc schiebermc commented Oct 25, 2017

Description

I added Self-Consistent-Field/RHF_libSADGuess.py, which uses Psi4's SADGuess class to produce a SAD Guess. This has been doable since my last PR to Psi4, which included the necessary python bindings. The file includes a toggle which allows one to compare the SAD and CORE guesses.

What are your new additions? Please provide a brief list.

  • New Features

    • SAD Guesses
  • Changes

    • Adds Self-Consistent-Field/RHF_libSADGuess.py

Any questions for the community?

  • This is not a tutorial on how to implement a SAD Guess, merely how to use a Psi4 object. Is this desirable to Psi4numpy?

Status

  • Click when ready for review-and-merge

@codecov-io
Copy link

codecov-io commented Oct 25, 2017

Codecov Report

Merging #36 into master will decrease coverage by 0.16%.
The diff coverage is 86.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   94.81%   94.64%   -0.17%     
==========================================
  Files          36       37       +1     
  Lines        4357     4448      +91     
==========================================
+ Hits         4131     4210      +79     
- Misses        226      238      +12
Impacted Files Coverage Δ
Self-Consistent-Field/RHF_libSADGuess.py 86.81% <86.81%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e1d82d...d2b690b. Read the comment docs.

@dgasmith
Copy link
Member

Hmm, I think you will at least need to write out a SAD guess to compare it to. This should very simply however, build a NMO x NMO matrix, put the densities on the diagonal, and your done. You can use scf_e, scf_wfn = psi4.energy("SCF", molecule=atom_mol) to get the densities out of Psi4.

@dgasmith
Copy link
Member

@schiebermc Would really love to get this in. Could you make the minor fixes required to do so?

@schiebermc
Copy link
Author

@dgasmith would you like this comparison to be in a separate file from Self-Consistent-Field/RHF_libSADGuess.py? If not how would you prefer me to organize this?

@dgasmith
Copy link
Member

I think it should be the same file, but instead of doing iterations/normal guesses I would just use the python based SAD machinery to do a comparison. The bulk of the code however, should be towards computing the SAD guess itself.

Basically what you want to do is the very simple:

D = np.zeros((nso, nso))
start = 0
for atom in molecule:
    start
    scf_e, scf_wfn = psi4.energy("SCF", molecule=atom)
   sl = slice(start, start + scf_wfn.nso())
   D[sl, sl]] = scf_wfn.Da()

Cocc = partial_cholesky(D)
...

The compare your density and Cocc vs the C++ SAD density. Thats all pseudocode, but should display the basic idea. The idea here is that we show how to compute SAD rather than just how to use the Psi4 python bindings.

@dgasmith
Copy link
Member

Are you planning to work on this? The deadline has technically passed for submissions.

@schiebermc
Copy link
Author

Sorry, I probably will not get to it.

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.

3 participants