# Re: [QE-users] Best way to extract eigenvectors from pwscf output?

```Dear Prof. Paolo,

Thank you for your prompt response.```
```
I want to extract the Hamiltonian and eigenvectors (not necessarily Kohn-Sham,
whatever eigenvectors QE solves for; I am aware that QE solves the Kohn-Sham
equation, so I think it outputs the Kohn-Sham eigenvectors, please correct me
if I am wrong).

The reasons for extracting the eigenvectors and the Hamiltonian are multiple.
Primarily to calculate a couple of matrix elements for my research project. But
I want to extract this data in a human-readable format so that I can get a
better understanding of the QE DFT package as a whole.

Would the simple_output code provided by you in the post I linked earlier be
the best way to go about doing this?

Regards,
Pratyush Manocha
Graduate Student | M.S. Electrical & Computer Engineering
School of Electrical and Computer Engineering
Georgia Institute of Technology
[cid:25bb8cf8-c47e-4cd7-b1d6-4838034fb6c7]
________________________________
From: Paolo Giannozzi <paolo.gianno...@uniud.it>
Sent: Monday, March 20, 2023 11:52
To: Quantum ESPRESSO users Forum <users@lists.quantum-espresso.org>
Cc: Manocha, Pratyush <pmano...@gatech.edu>
Subject: Re: [QE-users] Best way to extract eigenvectors from pwscf output?

On 3/20/23 16:32, Manocha, Pratyush wrote:

>  I also saw a code posted by Prof. Paolo Giannozzi, which is not
> supposed to be used for anything greater than simple crystals

the first code (simple_output) can be used for large systems as well. It
will produce large files, though. The second code (simple_test) is
provided just as a test: it fills and diagonalizes a matrix containing
the hamiltonian in plane waves. This is possible only for small systems.
QE never fills the hamiltonian matrix.

> What would be the most robust way of extracting the
> Hamiltonian and eigenvectors of the Kohn-Sham equation in a
> human-readable format for such a large input cell size?

Once you have Kohn-Sham human-readable eigenvectors, what do you plan to

Paolo
--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
```
```_______________________________________________
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users```