Interface for developers

An interface for developers is provided. The matrix elements for the Hamiltonian, overlap, density matrix, position operator, and momentum operator, which are all obtained from the SCF calculation, can be accessed from your post processing code using the functionality. It should be also noted that from the OpenMX Ver. 3.9, the data format for the relevant codes 'SCF2File.c', 'read_scfout.c', 'read_scfout.h', and 'analysis_example.c' have been changed so that the full information of density matrix, and the matrices for the position operator and momentum operator can be included in the scfout file. So, the scfout files generated by the older versions of OpenMX cannot be analyzed by Ver. 3.9. These data can be utilized by the following steps:

  1. Generation of 'HS.fileout'

    Include the keyword 'HS.fileout' in your input file as follows:

      HS.fileout                    on      # on|off, default=off
    and perform a convetional OpenMX calculation. Then, these data are output to a file 'System.Name.scfout' where System.Name means System.Name in your input file.

  2. make analysis_example

    In the directory 'source' compile by

      % make analysis_example
    Then, an executable file 'analysis_example' is generated in the directory 'work'.

  3. ./analysis_example System.Name.scfout

    Move to the directory 'work', and then perform the program as follows:

      % ./analysis_example System.Name.scfout
      % ./analysis_example System.Name.scfout > HS.out
    You can find the elements of the Hamiltonian, the overlap, and the density matrices in a file 'HS.out'

  4. explanation of analysis_example

    In a file 'analysis_example.c' you can find a detailed description for these data. A part of the description is as follows:

      You can utilize a filename.scfout which is generated by the SCF
      calculation of OpenMX by the following procedure:
      1. Define your main routine as follows:
      int main(int argc, char *argv[]) 
      2. Include a header file, "read_scfout.h", in your main routine
      (if you want, also in other routines) as follows:
      #include "read_scfout.h"
      3. Call a function, read_scfout(), in the main routine as follows:

It is noted that 'polB', 'jx', and 'kSpin' have been developed using the functionality as post processing code.