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

Some issues while using gpu4pyscf.properties.polarizability. #321

Open
JeongheonSeok opened this issue Jan 31, 2025 · 2 comments
Open

Some issues while using gpu4pyscf.properties.polarizability. #321

JeongheonSeok opened this issue Jan 31, 2025 · 2 comments
Assignees

Comments

@JeongheonSeok
Copy link

JeongheonSeok commented Jan 31, 2025

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.)

  1. 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.

  1. 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 JeongheonSeok changed the title I noticed some issues while using gpu4pyscf.properties.polarizability. Some issues while using gpu4pyscf.properties.polarizability. Jan 31, 2025
@wxj6000 wxj6000 self-assigned this Jan 31, 2025
@wxj6000
Copy link
Collaborator

wxj6000 commented Jan 31, 2025

@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.

#322

@JeongheonSeok
Copy link
Author

Thank you for your kind reply and correction!

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

No branches or pull requests

2 participants