  We have implemented internally contracted complete active space second order
perturbation theory (CASPT2) with the density matrix renormalization group
(DMRG) as active space solver [Y. Kurashige and T. Yanai, J. Chem. Phys. 135,
094104 (2011)]. Internally contracted CASPT2 requires to contract the
generalized Fock matrix with the 4-particle reduced density matrix (4-RDM) of
the reference wavefunction. The required 4-RDM elements can be obtained from
3-particle reduced density matrices (3-RDM) of different wavefunctions, formed
by symmetry-conserving single-particle excitations op top of the reference
wavefunction. In our spin-adapted DMRG code chemps2
[https://github.com/sebwouters/chemps2], we decompose these excited
wavefunctions as spin-adapted matrix product states, and calculate their 3-RDM
in order to obtain the required contraction of the generalized Fock matrix with
the 4-RDM of the reference wavefunction. In this work, we study the
longitudinal static second hyperpolarizability of all-trans polyenes
C$_{2n}$H$_{2n+2}$ [n = 4 - 12] in the cc-pVDZ basis set. DMRG-SCF and
DMRG-CASPT2 yield substantially lower values and scaling with system size
compared to RHF and MP2, respectively.
