deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
174 stars 136 forks source link

How to output momentum/velocity matrix in ABACUS #5553

Closed DzzZ1 closed 9 hours ago

DzzZ1 commented 1 day ago

Background

I noticed that abacus has implemented the rt-TDDFT function in Velocity-gauge and can output current. My current requirement is to output the momentum p matrix of the system ground state under the LCAO basis set and energy eigenvalue basis set, which is very important to me. But when I was reading the manual, I did not find a label for outputting the p matrix. The p matrix I refer to here is similar to the label out_mat_r in the manual for extracting the position r matrix, but the difference from r is that the r operator now needs to be replaced by the matrix of the p operator (https://abacus.deepmodeling.com/en/latest/advanced/elec_properties/position_matrix.html#extracting-position-matrices). At the same time, I also read the second reference under the rt-TDDFT tutorial (title: Velocity-gauge real-time TDDFT within a numerical atomic orbital basis set). From formulas 7, 8 and 9 in the literature, it can be seen that calculating momentum is a prerequisite for obtaining current. I guess abacus should have calculated this item, but there is no output label.

Describe the solution you'd like

It is recommended to add labels for output momentum matrix p under the energy eigenvalue basis set.

Task list only for developers

Notice Possible Changes of Behavior (Reminder only for developers)

No response

Notice any changes of core modules (Reminder only for developers)

No response

Notice Possible Changes of Core Modules (Reminder only for developers)

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

ESROAMER commented 10 hours ago

Your requirements can be achieved using functions in the pyatb. The function get_velocity_matrix(kpt) can obtain the velocity matrix in k-space under energy eigenstates, while the function get_velocity_basis_k(kpt) provides the velocity matrix in k-space under the atomic orbital basis. You can reach out to the developers of pyatb to learn how to use these functions correctly. Hope this helps!

DzzZ1 commented 9 hours ago

Thanks for your reply, I will do it.