QuantumLab-ZY / HamGNN

An E(3) equivariant Graph Neural Network for predicting electronic Hamiltonian matrix
GNU General Public License v3.0
63 stars 15 forks source link

Several question about training #23

Open liangzhixin-202169 opened 4 months ago

liangzhixin-202169 commented 4 months ago

Hello, I am learning the equivariant Hamilton, and I have several questions. (1) I am a few confused about how to choose a proper cutoff. When I use abacus to perform scf for graphene with 7 Bohr orbital cutoff radius, should I give 14 Bohr cutoff or larger for HamGNN? It seems that the abacus's neighbor list is slightly larger than 14 Bohr due to the non-local projector. (2) I have read the "read_scfout.c" file and find two hamiltons: "Hks" and "iHks". Is "iHks" used only when consider spin, and is "Hks+iHks" what HamGNN learning?
(3)The option "add_H0" suggests to predict the complete Hamiltonian as the sum of "H_scf+H_nonscf". So, will HamGNN obtain the complete Hamiltonian from openmx's output file such as ".scfout" throught "read_scfout.c"? If so, which variable in the ".scfout" file correspond to complete Hamiltonian?

QuantumLab-ZY commented 3 months ago

Hello,

Thank you for reaching out with your questions about the equivariant Hamiltonian and your work with abacus and HamGNN. I'll do my best to provide clear answers to your queries:

  1. Choosing a Proper Cutoff:

    • Currently, the neighbor list used by HamGNN is derived from the neighbor list generated by DFT, so the actual cutoff used in HamGNN comes from the DFT calculation. The cutoff parameter in the config.yaml file is only used to define the cutoff_function and does not determine the neighbor list.
  2. Understanding "Hks" and "iHks":

    • In the read_scfout.c file, "Hks" typically refers to the Kohn-Sham Hamiltonian. The "iHks" is often used when spin considerations are involved, representing the imaginary part of the Hamiltonian in spin calculations. When HamGNN is learning, it usually considers the combined Hamiltonian Hks + iHks if spin is taken into account. For non-spin-polarized calculations, only "Hks" might be relevant.
  3. Predicting the Complete Hamiltonian:

    • The option "add_H0" indeed suggests predicting the full Hamiltonian as the sum of "H_scf" (self-consistent field Hamiltonian) and "H_nonscf" (non-self-consistent field Hamiltonian). HamGNN reads "H_nonscf" from overlap.scfout and reads "H_scf" from system_name.scfout. The corresponding variable for the complete Hamiltonian is Hks in "read_scfout.c".

Best wishes,

Yang Zhong

liangzhixin-202169 commented 3 months ago

Thank you for your answer, I think I have understood it