SebWouters / CheMPS2

CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
GNU General Public License v2.0
70 stars 34 forks source link

Natural occupation number #40

Closed susilehtola closed 8 years ago

susilehtola commented 8 years ago

Hi,

is there a simple way to extract natural occupation numbers from a Psi4 CheMPS2 calculation? I know you can dump out the AO density matrix and the basis set in a molden file, but extracting the NOs would also require evaluating the AO overlap matrix (and parsing the molden file)...

SebWouters commented 8 years ago

Hi Susi,

Currently the NOON (per irrep) are printed when the 2-RDM is calculated: https://github.com/SebWouters/CheMPS2/blob/master/CheMPS2/TwoDM.cpp#L233

In the dmrgscf.cc plugin, it is called via DMRG::calc2DMandCorrelations() or DMRG::calc_rdms_and_correlations( bool do_3rdm ).

Does this suffice, or would you like a numerical extraction as well?

Best wishes, Sebastian

susilehtola commented 8 years ago

Dear Sebastian,

so does this mean I should run energy('dmrg-scf') instead of energy('dmrg-ci') to get the NOONs? I'm running small benchmark calculations (STO-3G) and I'm including all the orbitals of a given symmetry in the active space, so I don't need to / want to rotate the orbitals unless absolutely necessary.

I'm fine with the numbers in the log file, since based on the code you pasted they should be very easy to grep from the logs.

SebWouters commented 8 years ago

Let me check, but I was under the assumption that it also prints during DMRG-CI calculations.

SebWouters commented 8 years ago

It should either run line 812 or line 818 of https://github.com/psi4/psi4/blob/master/src/bin/dmrg/dmrgscf.cc#L812 before exiting. It exists via line 852 of https://github.com/psi4/psi4/blob/master/src/bin/dmrg/dmrgscf.cc#L852. So the DMRG-CI calculation are a wrap around the DMRG-SCF calculation with dmrg_max_iter = 1.

Could you check the NOON are printed?

susilehtola commented 8 years ago

You are exactly right - the NOONs were in the output. Sorry for the noise!