gpu4pyscf
gpu4pyscf copied to clipboard
Some issues while using gpu4pyscf.properties.polarizability.
I have some questions because I encountered some problems while using gpu4pyscf.properties.polarizability.
I tested it with a simple molecule (H2O) in both RKS and UKS cases. (Similar errors occurred in gpu4pyscf/properties/tests/test_polarizability.py.)
- RKS case
AttributeError: 'RKS' object has no attribute 'gen_response'
The above error occurs. I confirmed that gpu4pyscf/scf/_response_functions.py is defined in gpu4pyscf as in pyscf, but I confirmed that the above error occurs.
- UKS case
File ~/.local/lib/python3.10/site-packages/gpu4pyscf/properties/polarizability.py:71 in eval_polarizability
fx = gen_vind(mf, mo_coeff, mo_occ)
File ~/.local/lib/python3.10/site-packages/gpu4pyscf/properties/polarizability.py:32 in gen_vind
nao, nmo = mo_coeff.shape
ValueError: too many values to unpack (expected 2)
The above error occurred. It seems to be an error that occurs when trying to read the MO coefficient of UKS in the same format as RKS.
If possible, could you please review this issue and apply the necessary fixes when you have time? I would be very grateful for your help. Thank you for your support!
@JeongheonSeok Nice catch again! The issue for RKS object is fixed. Unfortunately, the polarizability for UKS is not supported yet. The unrestricted case has been developed on CPU (https://github.com/pyscf/properties/blob/master/pyscf/prop/polarizability/uhf.py), if you are interested in this module.
https://github.com/pyscf/gpu4pyscf/pull/322
Thank you for your kind reply and correction!