Skip to content

feat: TDDFT-ris store Tia Tij Tab in RAM #461

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

Merged
merged 7 commits into from
Jul 28, 2025
Merged

Conversation

John-zzh
Copy link
Contributor

@John-zzh John-zzh commented Jul 18, 2025

  1. Add option to store Tia Tij Tab in RAM.
  2. cleanup the tensor initialization logic
  3. merge zhichen's get_ab function into new structure
  4. replace krylov_tools.krylov_solver to replace Davidson
  5. an example for preconditioned TDA with ~2 speedup.

TODO:

  1. implement krylov_solver for ABBA situations.


siz_p = C_p.shape[1]
siz_q = C_q.shape[1]

upper_inv_eri2c = lower_inv_eri2c[intopt._aux_ao_idx,:][:,intopt._aux_ao_idx].T.copy()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upper_inv_eri2c = lower_inv_eri2c[intopt._aux_ao_idx, intopt._aux_ao_idx[:,None]]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing broadcasting and indexing... I have not fully understand the mechanism but I did test out that lower_inv_eri2c[intopt._aux_ao_idx, intopt._aux_ao_idx[:,None]] does not need an extra transpose :-)

self.device = mf.device

self._in_ram = in_ram
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of this parameter and some of the parameters (spectra, out_name, etc.) are not printed anywhere. They can be logged in the build() function. Some attributes like n_occ, n_vir should also be dumped into the log at INFO level

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, n_occ, n_vir and many other attributes are printed out in build()

@sunqm sunqm merged commit e5ba7b6 into pyscf:master Jul 28, 2025
4 checks passed
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.

2 participants