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-CASPT2 energy is different from CASPT2 energy for CASSCF(6,6) of N2 at cc-pVDZ #76

Closed 1234zou closed 4 years ago

1234zou commented 4 years ago

I've applied the conventional CASSCF(6,6) and CASPT2 methods to N2 molecule at d(N-N) = 1.4 A, cc-pVDZ basis set. The results are (in a.u.) CASSCF(6,6): -108.98010546 CASPT2: -109.15245772

And also the DMRG-CASSCF(6,6) and DMRG-CASPT2, the corresponding energies are CASSCF(6,6): -108.98010546 CASPT2: -109.15304957

The CASSCF energies make no difference. But the CASPT2 energies are diffetent. Is this normal or correct?

The .input file of OpenMolcas is shown below &GATEWAY Coord 2 Angstrom N 0.0 0.0 -0.7 N 0.0 0.0 0.7 Basis = cc-pVDZ Group = Nosymm

&SEWARD

&SCF

&RASSCF Spin = 1 Charge = 0 nActEl= 6 0 0 RAS2 = 6 DMRG = 500 3RDM LumOrb

&CASPT2 Frozen = 0 CheMPS2 MultiState = 1 1

In the conventional CASSCF .input file, the 'DMRG = 500', '3RDM', 'CheMPS2', and 'MultiState = 1 1' are deleted. Thank you!

quanp commented 4 years ago

Hi,

Perhaps there is something wrong with the RDM. I have the following results with DMRG-CASPT2 (your input)

      Reference energy:        -108.9801054580
      E2 (Non-variational):      -0.1723503408
      E2 (Variational):          -0.1723503080
      Total energy:            -109.1524557660
      Residual norm:              0.0000005484
      Reference weight:           0.95226

So you can see that DMRG-CASPT2 and conventional CASPT2 give almost the same energy. It will be nice if you can send the DMRG-CASPT2 log file.

Edit: and check the scratch if molcas_2rdm.h5.r0, molcas_3rdm.h5.r0, molcas_f4rdm.h5.r0 exist.

Best regards, Quan

1234zou commented 4 years ago

Many thanks, Quan!

All the 2, 3, and 4 RDM files exist. The output files are attached. By the way, the versions of related packages are OpenMolcas: v20.10 HDF5: 1.12.0 Python: Anaconda Python 3.7.6 CheMPS2: master (1.8.9) DMRG-CASPT2.zip

quanp commented 4 years ago

Thanks,

I think there is a bug in the code related to highly symmetric molecules (N2 in this case) and using NOSYM. The DMRG-CASPT2 result is unstable and I haven't find what causes it yet. For other molecules with lower symmetry, I think you will not see this problem.

The solution is to use D2h symmetry for this molecule.

      Reference energy:        -108.9801054580
      E2 (Non-variational):      -0.1723501401
      E2 (Variational):          -0.1723501073
      Total energy:            -109.1524555653
      Residual norm:              0.0000005484
      Reference weight:           0.95226
&GATEWAY
Coord
2
Angstrom
N 0.0 0.0 -0.7
N 0.0 0.0 0.7
Basis = cc-pVDZ

&SEWARD

&RASSCF
Spin = 1
Charge = 0
nActEl= 6 0 0
Inactive = 2 0 0 0 2 0 0 0
RAS2 =     1 1 1 0 1 1 1 0
DMRG = 500
3RDM
LumOrb

&CASPT2
Frozen = 0 0 0 0 0 0 0 0
CheMPS2
MultiState = 1 1

This bug is not related to CheMPS2 since all RDMs are calculated correctly. I think you can close the issue. If you have more problems, just contact me directly.

Thanks, Quan

1234zou commented 4 years ago

I tried running this DMRG-CASPT2 example several times, each time the result varies. So it is indeed unstable.

By the way, the '--enable-fortran2003' flag seems useless during configuring HDF5, but this flag is recommended in MOLCAS manual Chapter 4.3. I've tried using several versions of HDF5, but all got warning '--enable-fortran2003' unrecognized.

I'll try other molecules with lower symmetry.

Thanks.