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

DMRG-CI and DMRG-PT2 #38

Closed quanp closed 8 years ago

quanp commented 8 years ago

Dear Sebastian,

Is it possible to only do DMRG-PT2 without doing DMRG-SCF. I have a set of orbitals and just want to do DMRG-CI and the DMRG-PT2. Using SCF_MAX_ITER=1 doesn't help because after the first DMRG iteration, CheMP2 does an extra iteration. I want to avoid this as I still have the convergence problem in my previous example. This is the ouput:

First iteration: the energy agrees well with Block * Minimum energy encountered during all instructions = -3568.52263095819 * Minimum energy encountered during all instructions = -3568.52359557749 * Minimum energy encountered during all instructions = -3568.52361266158 * Minimum energy encountered during all instructions = -3568.52388112512

Second iteration: * Minimum energy encountered during all instructions = -3568.45160821293 * Minimum energy encountered during all instructions = -3568.52042497932 *\ Minimum energy encountered during all instructions = -3568.52068472411

You can see that the energy of the second iteration is clearly higher than the first one.

Best regards, Quan

SebWouters commented 8 years ago

Hi Quan,

Did you put CASPT2_ORBS to 'P' ? Because if you did, this might explain the difference between the first and the second iteration. The first and second iteration normally occur with exactly the same active space orbitals, but possibly rotated if you select 'P' instead of 'A' for CASPT2_ORBS.

That being said: I have not implemented the gradient terms for CASPT2. After CASSCF/DMRGSCF is converged, the f_ai terms of the Fock operator, between doubly occupied (core) and virtual (secondary) orbitals, are zero because they are proportional to the CASSCF orbital rotation gradient. If you look at https://github.com/SebWouters/CheMPS2/blob/master/CheMPS2/CASPT2.cpp#L1210, wherever there's a GRAD in the table, these terms correspond to f_ai Fock operator terms, and they are not implemented.

Best wishes, Sebastian

quanp commented 8 years ago

Hi Sebastian,

I used CASPT2_ORBS=A (as specified in SCF_ACTIVE_SPACE). You can see the output file (not completed) here: https://github.com/quanp/NiFe/blob/master/caspt2.log

Best regards, Quan

SebWouters commented 8 years ago

Hi Quan,

Mea culpa.

I've just realized that the option 'F' for SCF_ACTIVE_SPACE was not checked for the CASPT2 calculation. That should be fine now with commit 4478a4bd3dfd394a5abeae80f6d9d89241157217.

The PT2 part corresponding to f_ai Fock operator terms should be done at one point, because for diagonalize - perturb - diagonalize approaches, or for state-averaging, they are needed.

Best wishes, Sebastian

quanp commented 8 years ago

Hi Sebastian,

I installed the new version and have a strange behavior of CheMP2. In the first DMRG iteration:

   EdmistonRuedenberg::FiedlerGlobal : Cost function at start = 1052.4956647805
   EdmistonRuedenberg::FiedlerGlobal : Cost function at end   = 425.833854731409
   EdmistonRuedenberg::FiedlerGlobal : Reordering = [ 3, 21, 10, 16, 15, 18, 20, 23, 0, 7, 13, 6, 2, 9, 4, 8, 12, 1, 5, 14, 19, 11, 22, 17 ].

D = 250  ***     Minimum energy encountered during the last sweep   = -3568.55484472569
D = 500  ***     Minimum energy encountered during the last sweep   = -3568.55503071459
D = 500  ***     Minimum energy encountered during the last sweep   = -3568.55503433024
D = 1000 ***     Minimum energy encountered during the last sweep   = -3568.55508571798

While in the next iteration (DMRG-PT2)

   EdmistonRuedenberg::FiedlerGlobal : Cost function at start = 0
   EdmistonRuedenberg::FiedlerGlobal : Cost function at end   = 0
   EdmistonRuedenberg::FiedlerGlobal : Reordering = [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1 ].

D = 250  ***     Minimum energy encountered during the last sweep   = -3568.5443755162
D = 500  ***     Minimum energy encountered during the last sweep   = -3568.55113033118
D = 500  ***     Minimum energy encountered during the last sweep   = -3568.5512422651

Best regards, Quan

SebWouters commented 8 years ago

Hi Quan,

Should be fixed with b2efeddb9bdaba7dd2b6d761919fbebafb2fddda.

Best wishes, Sebastian