Access DFT solution coefficients for LCAO from python


Clicked A Few Times
Dear developers,

I would like to get expansion coefficients for orbitals in specified basis (say 3-21G) for single energy DFT calculation. In other words, i want to access the solution coefficients which are used (together with the basis), for example, to plot orbitals in DPLOT.

My best guess would be that I can get this from RunTimeDataBase via rtdb_get(). The question is where in RTDB the solution coefficients are stored and in what format? Of course, I also need centers of AOs used to form LCAO.

p.s. to avoid the confusion, I am not speaking about coefficients and exponents of Gaussian basis functions used for each atom. That info is easy to get from "libraries" database.

Regards,
Denis.

Forum Vet
Denis, I am guessing what you are looking for are the eigenvalues, eigenvectors and occupation numbers, right?

Clicked A Few Times
Quote:Edoapra Aug 24th 8:46 pm
Denis, I am guessing what you are looking for are the eigenvalues, eigenvectors and occupation numbers, right?


I am new to LCAO, i normally do DFT ground state calculation using other approaches.
My understanding is the following: In LCAO one essentially search for unknown wavefunctions as a linear combination of atomic orbitals (thus the name), i.e.

\Psi_j = \sum_i C_{ij} N_i (r_i),

where C_{ij} are expansion coefficients and {N_i} is the basis (atomic orbitals). So what I am interested in are those coefficients C_{ij} with their correspondence to the actual basis used (like 3-21G).
Plus occupation numbers.

Clicked A Few Times
Quote:Edoapra Aug 24th 8:46 pm
Denis, I am guessing what you are looking for are the eigenvalues, eigenvectors and occupation numbers, right?


sorry to bother, but did you have a chance to check RunTimeDataBase (or other DB) for eigenvectors and occupation numbers?

Forum Regular
All of that information is stored in the *.movecs file, not in the run time database. If you want access to that information, you would need to either parse the output file (you can modify print options to get all of the eigenvectors, eigenvalues, and occupations numbers to be included in the output file), or you would need to read the *.movecs file (there is a script in the contrib directory of the source code that should be able to convert the *.movecs file from binary to ASCII).

Clicked A Few Times
Quote:Sean Aug 29th 3:56 pm
All of that information is stored in the *.movecs file, not in the run time database. If you want access to that information, you would need to either parse the output file (you can modify print options to get all of the eigenvectors, eigenvalues, and occupations numbers to be included in the output file), or you would need to read the *.movecs file (there is a script in the contrib directory of the source code that should be able to convert the *.movecs file from binary to ASCII).


I had some problems compiling mov2asc`, could be more specific on which print options to add to get all eigenvectors and eigenvalues and occupations number in the terminal output?

Just Got Here
You can print eigenvalues and eigenvectors in output-file using
Quote:
print high
or
Quote:
print "final evals" "final vectors"
in DFT block. I suppose that occupation numbers also will be written in this case.

See more information here

But I am not sure that all eigenvalues and eigenvectors are printed and not only the highest ones lying above some energetic threshold. This has to be checked.

Clicked A Few Times
Thanks Egor, will give it a try!

Forum Regular
Adding

print "final vectors analysis"

to the dft block will cause all of the eigenvalues, occupation numbers, and eigenvectors to be included in the output file for the molecular orbital analysis section. The default is to only print eigenvectors with an absolute value above 0.15; however, this can be modified through a movecs set directive, e.g.

set movecs:tanalyze 1.e-8

Clicked A Few Times
Thanks, Sean. It looks like with this setting and http://cclib.github.io i can parse terminal output to get all eigenvectors and the correspondence between the basis and the coefficients. I assume that the numbering correspond to the order of atoms. So first X coefficients are for all X AOs of 1st atom, then next Y coefficients are for all Y AOs of 2nd atom, while the order of coefficients for a single atom are listed here http://nwchemgit.github.io/index.php/Release66:Basis ,i.e. s px py pz ...


Forum >> NWChem's corner >> General Topics