Menu

How to get the momentum matrix elements.

Elk Users
2024-06-24
2024-08-23
  • Vivek Pandey

    Vivek Pandey - 2024-06-24

    Dear Elk Users,
    I am currently using the latest version of Elk code (elk-9.6.8). At some point of my work, I am in need of the momentum matrix elements. By momentum matrix elements I mean <Ψik| − i∇|Ψjk>. Reagarding this, I searched in the userguide. I found that using the task_number=120, we can generate the PAMT.OUT file containing the momentum matrix elements. However, when I calculated, I found that the PAMT.OUT file is in binary format. Due to this, I could not explicitly get the momentum matrix elements.
    Kindly guide me in getting the momentum matrix elements data from this file or any other possible way.

    Sincerely,
    Vivek Pandey
    Indian Institute of Technology, Mandi
    Himachal Pradesh, India

     
  • J. K. Dewhurst

    J. K. Dewhurst - 2024-08-16

    Hi Vivek,

    PMAT.OUT is a Fortran direct access file. You'll have to write a small Fortran code to extract the data from PMAT.OUT and write it to a (human-readable) formatted file.

    Regards,
    Kay.

     
    • Vivek Pandey

      Vivek Pandey - 2024-08-16

      Hii Kay,
      Thank you for your reply. I have now written a code to extract the
      data. However, I found that each time I am running the scf calculation
      followed by the momentum matrix elements, I get different results (momentum
      matrix values). To make it more clear, suppose I ran a scf calculation and
      then using the converged density, I calculated the momentum matrix, and got
      some values (momentum matrix elements). Now, if I repeat this procedure:
      again running the scf calculation (keeping all other parameters same as in
      previous case) and the calculating the momentum matrix values. I am getting
      different result in comparison to previous one. Also, if I am using these
      momentum values to calculate some transport (in my case, anomalous hall
      conductivity), I am getting different values.

      Please guide me what is going one here. Also, advise me how to deal with
      this problem to get correct values of anomalous hall conductivity.

      Sincerely yours
      Vivek Pandey

      On Fri, 16 Aug, 2024, 6:32 pm J. K. Dewhurst, jkdewhurst@users.sourceforge.net wrote:

      Hi Vivek,

      PMAT.OUT is a Fortran direct access file. You'll have to write a small
      Fortran code to extract the data from PMAT.OUT and write it to a
      (human-readable) formatted file.

      Regards,
      Kay.


      How to get the momentum matrix elements.
      https://sourceforge.net/p/elk/discussion/897820/thread/f2817f06d9/?limit=50#583c


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/elk/discussion/897820/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Youzhao Lan

    Youzhao Lan - 2024-08-23

    Hi Vivek,
    As a suggestion, you can try serial ELK version (or set MPI np=1 and OMP_NUM_THREADS=1), then see what happens

    Best regards
    Youzhao Lan

     
  • J. K. Dewhurst

    J. K. Dewhurst - 2024-08-23

    Dear Vivek and Youzhao,

    The matrix elements can be different between runs for two reasons:

    1. Performing floating point operations in parallel can result in small changes between runs. As Youzhao suggested, you can try running on a single thread to and check if the results are the same between runs.

    2. The phase of the eigenvectors returned by LAPACK can be arbitrary. LAPACK fixes the phase of its eigenvectors by demanding that the eigenvector component with the largest magnitude is real. However, this may not work in the case of degenerate eigenvalues. In this case the differences between runs can be large and arbitrary.

    It is important to remember though, that even though the matrix elements can change between runs, your observables should not. In other words, quantities like energy, density, conductivity, etc. should stay the same. Any change in these should be small and due to reason 1 and not reason 2. If their value depends on 2 then there is a problem with your code.

    Regards,
    Kay.

     

Log in to post a comment.