Code distribution

We distribute the XMCQDPT2, DSRG-MRPT2 and ASCI-PT2 codes here, in a form of patches to the software package BAGEL.
These codes are distributed under GPL-v3.
For any inquiry and bug reports, contact Jae Woo <jaewoopark.at.cbnu.ac.kr>, However, please keep in mind that there is no "official support" for these patches (we are maintaining them with very limited manpower).

How to apply patch & Cautions

On the cloned open-source BAGEL directory, executing

> git apply <patch_file_name>

will apply the patch. When configuring, you should have OpenMP for better performance (which is not recommended in building the original BAGEL). For this, execute configure with "-fopenmp" in CXXFLAGS. When higher GCC versions are used with OpenMP, linking with the GNU OpenMP library (libgomp), rather than Intel ones (libiomp5), is recommended (modify configure.ac file). The ASCI code requires Intel MKL. We have tested MVAPICH2.0 for MPI parallelization, CentOS 7 as OS, and GCC4.8.5 as C++ compiler.

PT2Pack (base version: Jul 09 2021)

includes
(X)MCQDPT2 analytical gradients with resolvent fitting
Spin-Free (SA-)DSRG-MRPT2 analytical gradients

DOWNLOAD: patch_dsrgmrpt2.tar.gz (hosted by Google Drive)

The older version of the MCQDPT2 patch can be found here

  • For XMCQDPT2, you can find input examples in test/lif_svp_xmcqdpt2_grad.json and test/lif_svp_xmcqdpt2_resolvent_grad.json.

  • For SA-DSRGMRPT2, you can find input examples in test/lif_svp_sadsrgmrpt2_grad.json and test/lif_svp_sadsrgmrpt2_relax_grad.json.

(X)MCQDPT2 calculations are invoked by "title" : "mcqdpt2".

Keywords:

  • frozen (boolean, default is true): Perform calculation with frozen core orbitals. BAGEL automatically counts the number of core electrons.

  • xmc (boolean, default is true): if true, do XMCQDPT2. otherwise, do MCQDPT2.

  • resolvent_fitting (boolean, default is false): If true, perform calculation with resolvent fitting. Resolvent fitted calculations are way more efficient. Should use with ISA shift.

  • shift (double precision, default is 0.0): Use intruder state avoidance (ISA) shift. This corresponds to an imaginary shift in CASPT2. Resolvent fitting should be used with the shift.

  • resolvent_lambda_de (double precision, default is 0.05): delta E in resolvent fitting. In our tests, 0.05 performed quite well (the errors in energies are below 1.0e-7 Hartrees)

DSRG-MRPT2 calculations are invoked by "title" : "dsrgmrpt2". Note that DSRG-MRPT2 is not MPI parallelized... yet!

Keywords:

  • frozen (boolean, default is false): Perform calculation with frozen core orbitals. BAGEL automatically counts the number of core electrons.

  • flow_parameter (double precision, default is 1.0): The value of the flow parameter. The value of this parameter is the most important.

  • cumulant_approx (boolean, default is false): Do cu(3) approximation, so that the three-particle RDM is not required.

  • fci_relax (boolean, default is false): When true, do reference relaxation after the DSRG-MRPT2 calculation. For state-averaged calculations, this corresponds to the "SA-DSRGMRPT2" calculation. When false, do not do reference relaxation. For state-averaged calculations, this corresponds to the "SA-DSRGMRPT2c" calculation.

ASCI-SCF and ASCI-SCF-PT2 analytical gradient (base version: Feb 05 2021)

DOWNLOAD: patch_asci_v1.1.tar.gz (hosted by Google Drive)

You can find input examples in test/benzene_asci_grad.json and test/benzene_asci_pt2_grad.json.

ASCI and ASCI-SCF calculations are invoked by "algorithm" : "asci" (when "title" : "FCI") and "fci_algorithm" : "asci" (when "title" : "CASSCF")

ASCI Keywords (title is "fci"):

  • no_core_det (integer, default is 200): Number of core determinants.

  • no_target_det (integer, default is 1000): Number of target determinants. Note that these default values are for test purposes, and you should set these numbers carefully.

  • target_thresh (double precision, default is 1.0e-12): The determinants with a perturbative amplitude below this number are not selected as the target determinant, even if they are ranked within no_target_det.

  • core_thresh (double precision, default is 1.0e-6): The determinants with CI coefficient this number are not selected as the core determinant, even if they are ranked within no_target_det.

  • hamiltonian_cutoff (double precision, default is 1.0e-5): The coupling below this value is ignored in obtaining perturbative amplitude or PT2 corrections. Setting this value to 0.0 will compute all the perturbative contributions. This value was tightened to 1.0e-7 in our PT2 analytical gradient calculations.

  • use_natural_orbital (boolean, default is false): Use natural orbital.

  • evaluate_pt2_rdm (boolean, default is false): Should set to true for ASCI-SCF-PT2 analytical gradient.

  • evaluate_pt2_ci (boolean, default is false): Should set to true for ASCI-SCF-PT2 analytical gradient.

  • perturbation (boolean, default is false): Do PT2 correction after each ASCI calculation.

ASCI-SCF Keywords (title is "casscf")

  • asci_perturbation (boolean, default is false): Do PT2 correction when the ASCI-SCF is converged.

  • supermacro_steps (integer, default is 10): Update the determinant list every supermacro_steps step.

Extrapolated ASCI-SCF-PT2 gradient (ASCI-SCF-PT2+X) Keywords (title is "force" or "optimize")

  • The title in the method block should be "asciscf_extrapolate"

  • extrapolation_point (integer vector): The number of target determinants for linear extrapolation. For example, "extrapolation_point" : [20000, 40000, 60000, 80000, 100000] will perform 5-point extrapolation using 20000, 40000, 60000, 80000, and 100000 determinants.

Some practical tips:

  • The maximum number of active orbitals is 64 in our implementation.

  • In ASCI-SCF calculations, the ASCI iteration sometimes exhibits oscillatory behavior. Set smaller "maxiter_fci" (e.g. 10), and then if ASCI did not converge, the ASCI iteration is re-performed in the next macroiteration until convergence (e.g. When the ASCI iteration did not converge in step 11, the orbital is optimized using the un-converged ASCI density matrices, and then the ASCI iteration is performed again in step 12, and continued until convergence...). In our experience, we always obtained a stable determinant list and energy at convergence with this strategy.

  • The R^2 values for extrapolations of energy and each component of the gradient are printed in output or log files. Check these values to evaluate the fidelity of your extrapolation.

  • Current version does not support the ASCI Hamiltonian with more than 2^31-1 nonzero elements.