adc-connect / adcc

adcc: Seamlessly connect your program to ADC
https://adc-connect.org
GNU General Public License v3.0
32 stars 20 forks source link

"Need at least 1 alpha and 1 beta electron" error possibly due to occupation array handling #182

Open mmuelle6 opened 5 days ago

mmuelle6 commented 5 days ago

I am implementing a custom interface between adcc and QUEST, and I consistently encounter the following error:

"The HF data passed to adcc is not valid: Need at least 1 alpha and 1 beta electron."

It appears that my code has difficulty filling the occupation array correctly, although the interface follows the same logic as the working Psi4 interface. Additionally, the same issue occurs when performing the SCF calculation using PySCF, following the standard procedure outlined in the "Performing General ADC(n) Calculations" section of the documentation.

Consequently, I am wondering if there might be an issue with the API. If so, I suspect the problem could be related to adcc's internal handling of the occupation array, though I am having difficulty pinpointing the exact cause.

Could you please provide some guidance on whether this might be a known issue with the API, or if it is likely a problem within my code for the QUEST interface? Any feedback would be greatly appreciated!

maxscheurer commented 5 days ago

I tried to reproduce the error, and it seems to be related to NumPy. I get the same error in a conda environment with numpy>=2.0. Could you try to downgrade the NumPy version below 2.0 and see if the error persists?

mmuelle6 commented 5 days ago

It works with an older version of NumPy. Thank you very much!