-
Notifications
You must be signed in to change notification settings - Fork 32
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
TREXIO + MCSCF wavefunction #92
base: master
Are you sure you want to change the base?
Conversation
Thank you @NastaMauger ! I noticed that you do not register the CI determinants as part of your new |
I guess the best test of the validity of the produced multi-configurational TREXIO wavefunction is via an attempt to import and use it in some software that handles such wave functions (e.g. QP2)? @NastaMauger @scemama |
@@ -434,10 +464,6 @@ def det_to_trexio(mcscf, norb, nelec, filename, backend='h5', ci_threshold=0., c | |||
with trexio.File(filename, 'u', back_end=_mode(backend)) as tf: | |||
if trexio.has_determinant(tf): | |||
trexio.delete_determinant(tf) | |||
trexio.write_mo_num(tf, mo_num) | |||
trexio.write_electron_up_num(tf, len(a)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? We need the number of up and down electrons to perform the CI determinants "correctness" check before writing them in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now handled by the _mcscf_to_trexio
function, which calls _mol_to_trexio
.
Reshape write_eri function to ensusre conssitency between other codes mcscf_function directly register the determinant list now
|
For the ERIs - I agree, @kgasperich submitted a draft PR which takes care of the AO/MO inconsistency. |
Hello, I am following this issue as it's a feature I really want to add. After discussing with @q-posev and @scemama, we observed that although we correctly registered all necessary data into TREXIO, there is still a difference between the CASSCF energy from PySCF and the exported TREXIO file. Upon examining the convergence of the energy with respect to the CAS space, it seems there may be a hidden selected CI procedure within the CASSCF routine. @sunqm Could you please confirm and provide guidance on how to correctly register the CASCI wavefunction if some selected CI is implicitly performed? Best |
There is no selected CI procedure in CASSCF that I am aware of. There is a procedure to approximate the CI step during the orbital optimization, but that should have no effect on the evaluation of the CASCI energy, which is entirely determined by the MO coefficients, one- and two-electron integrals, and CI vectors. Could you elaborate on what you are seeing? |
Are you able to reproduce the CASSCF energy for small systems like H2 molecule with (2,2) CAS? |
Hello,
In this PR, you will find modifications that allow users to register an MCSCF function in the TREXIO format.
I am uncertain if additional data must be stored for TREXIO to function correctly with other software and to return the corresponding wave function produced by PySCF before registering it into TREXIO. However, the corresponding HDF5 file generated using the following code:
seems to register the data correctly.
Please let me know if further modifications or improvements are necessary. I am also uncertain whether the one-electron MO group is essential, as mentione here. I would also appreciate any feedback on whether the
write_eri
function needs to be modified to handle CASCI/CASSCF, particularly for the corresponding active spaceBest