  In the present article, we show how to formulate the partially contracted
n-electron valence second order perturbation theory (NEVPT2) energies in the
atomic and active molecular orbital basis by employing the Laplace
transformation of orbital-energy denominators (OED). As atomic-orbital (AO)
basis functions are inherently localized and the number of active orbitals is
comparatively small, our formulation is particularly suited for a
linearly-scaling NEVPT2 implementation. Some of the NEVPT2 energy contributions
can be formulated completely in the AO basis as single-reference second-order
M{\o}ller-Plesset perturbation theory and benefit from sparse active-pseudo
density matrices - particularly if the active molecular orbitals are localized
only in parts of a molecule. Furthermore, we show that for multi-reference
perturbation theories it is particularly challenging to find optimal parameters
of the numerical Laplace transformation as the fit range may vary among the 8
different OEDs by many orders of magnitude. Selecting the number of quadrature
points for each OED separately according to an accuracy-based criterion allows
us to control the errors in the NEVPT2 energies reliably.
