.TH "sc::MBPT2" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::MBPT2 \- The \fBMBPT2\fP class implements several second-order perturbation theory methods\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::Wavefunction\fP\&. .PP Inherited by \fBsc::MBPT2_R12\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBMBPT2\fP (\fBStateIn\fP &)" .br .ti -1c .RI "\fBMBPT2\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .RI "The \fBKeyVal\fP constructor\&. " .ti -1c .RI "void \fBsave_data_state\fP (\fBStateOut\fP &)" .br .RI "Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. " .ti -1c .RI "\fBRef\fP< \fBSCF\fP > \fBref\fP ()" .br .ti -1c .RI "double \fBref_energy\fP ()" .br .ti -1c .RI "double \fBcorr_energy\fP ()" .br .ti -1c .RI "\fBRefSCVector\fP \fBref_energy_gradient\fP ()" .br .ti -1c .RI "\fBRefSCVector\fP \fBcorr_energy_gradient\fP ()" .br .ti -1c .RI "int \fBnelectron\fP ()" .br .RI "Returns the number of electrons\&. " .ti -1c .RI "int \fBnfzcore\fP () const" .br .ti -1c .RI "int \fBnfzvirt\fP () const" .br .ti -1c .RI "\fBRefSymmSCMatrix\fP \fBdensity\fP ()" .br .RI "Returns the \fBSO\fP density\&. " .ti -1c .RI "int \fBspin_polarized\fP ()" .br .RI "Return 1 if the alpha density is not equal to the beta density\&. " .ti -1c .RI "int \fBgradient_implemented\fP () const" .br .ti -1c .RI "int \fBvalue_implemented\fP () const" .br .RI "Information about the availability of values, gradients, and hessians\&. " .ti -1c .RI "void \fBsymmetry_changed\fP ()" .br .RI "Call this if you have changed the molecular symmetry of the molecule contained by this \fBMolecularEnergy\fP\&. " .ti -1c .RI "void \fBobsolete\fP ()" .br .RI "Marks all results as being out of date\&. " .ti -1c .RI "void \fBprint\fP (std::ostream &o=\fBExEnv::out0\fP()) const" .br .RI "Print information about the object\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBinit_variables\fP ()" .br .ti -1c .RI "void \fBcompute\fP ()" .br .RI "Recompute at least the results that have compute true and are not already computed\&. " .ti -1c .RI "void \fBeigen\fP (\fBRefDiagSCMatrix\fP &vals, \fBRefSCMatrix\fP &vecs, \fBRefDiagSCMatrix\fP &occs)" .br .ti -1c .RI "void \fBcompute_hsos_v1\fP ()" .br .ti -1c .RI "\fBdistsize_t\fP \fBcompute_v2_memory\fP (int ni, int nfuncmax, int nbfme, int nshell, int ndocc, int nsocc, int nvir, int nproc)" .br .ti -1c .RI "void \fBcompute_hsos_v2\fP ()" .br .ti -1c .RI "void \fBcompute_hsos_v2_lb\fP ()" .br .ti -1c .RI "int \fBcompute_cs_batchsize\fP (size_t mem_static, int nocc_act)" .br .ti -1c .RI "\fBdistsize_t\fP \fBcompute_cs_dynamic_memory\fP (int ni, int nocc_act)" .br .ti -1c .RI "int \fBmake_cs_gmat\fP (\fBRefSymmSCMatrix\fP &Gmat, double *DPmat)" .br .ti -1c .RI "int \fBmake_cs_gmat_new\fP (\fBRefSymmSCMatrix\fP &Gmat, const \fBRefSymmSCMatrix\fP &DPmat)" .br .ti -1c .RI "void \fBform_max_dens\fP (double *DPmat, signed char *maxp)" .br .ti -1c .RI "int \fBinit_cs_gmat\fP ()" .br .ti -1c .RI "void \fBdone_cs_gmat\fP ()" .br .ti -1c .RI "int \fBmake_g_d_nor\fP (\fBRefSymmSCMatrix\fP &Gmat, double *DPmat, const double *mgdbuff)" .br .ti -1c .RI "void \fBcs_cphf\fP (double **scf_vector, double *Laj, double *eigval, \fBRefSCMatrix\fP &P2aj)" .br .ti -1c .RI "void \fBs2pdm_contrib\fP (const double *intderbuf, double *PHF, double *P2AO, double **hf_ginter, double **ginter)" .br .ti -1c .RI "void \fBhcore_cs_grad\fP (double *PHF, double *PMP2, double **hf_ginter, double **ginter)" .br .ti -1c .RI "void \fBoverlap_cs_grad\fP (double *WHF, double *WMP2, double **hf_ginter, double **ginter)" .br .ti -1c .RI "void \fBcompute_cs_grad\fP ()" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBRef\fP< \fBSCF\fP > \fBreference_\fP" .br .ti -1c .RI "\fBRef\fP< \fBMemoryGrp\fP > \fBmem\fP" .br .ti -1c .RI "int \fBnfzc\fP" .br .ti -1c .RI "int \fBnfzv\fP" .br .ti -1c .RI "size_t \fBmem_alloc\fP" .br .ti -1c .RI "double \fBcphf_epsilon_\fP" .br .ti -1c .RI "int \fBeliminate_in_gmat_\fP" .br .ti -1c .RI "const double * \fBintbuf_\fP" .br .ti -1c .RI "\fBRef\fP< \fBTwoBodyInt\fP > \fBtbint_\fP" .br .ti -1c .RI "\fBRef\fP< \fBTwoBodyInt\fP > * \fBtbints_\fP" .br .ti -1c .RI "\fBRef\fP< \fBTwoBodyDerivInt\fP > * \fBtbintder_\fP" .br .ti -1c .RI "int \fBnbasis\fP" .br .ti -1c .RI "int \fBnoso\fP" .br .ti -1c .RI "\fBRef\fP< \fBMessageGrp\fP > \fBmsg_\fP" .br .ti -1c .RI "int \fBnvir\fP" .br .ti -1c .RI "int \fBnocc\fP" .br .ti -1c .RI "int \fBnsocc\fP" .br .ti -1c .RI "\fBRef\fP< \fBThreadGrp\fP > \fBthr_\fP" .br .ti -1c .RI "int \fBdynamic_\fP" .br .ti -1c .RI "double \fBprint_percent_\fP" .br .ti -1c .RI "int \fBmax_norb_\fP" .br .ti -1c .RI "int * \fBsymorb_irrep_\fP" .br .ti -1c .RI "int * \fBsymorb_num_\fP" .br .ti -1c .RI "char * \fBmethod_\fP" .br .ti -1c .RI "char * \fBalgorithm_\fP" .br .ti -1c .RI "int \fBdo_d1_\fP" .br .ti -1c .RI "int \fBdo_d2_\fP" .br .ti -1c .RI "int \fBnfuncmax\fP" .br .ti -1c .RI "double \fBhf_energy_\fP" .br .ti -1c .RI "\fBRefSCVector\fP \fBhf_gradient_\fP" .br .ti -1c .RI "double \fBrestart_ecorr_\fP" .br .ti -1c .RI "int \fBrestart_orbital_v1_\fP" .br .ti -1c .RI "int \fBrestart_orbital_memgrp_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBMBPT2\fP class implements several second-order perturbation theory methods\&. .SH "Constructor & Destructor Documentation" .PP .SS "sc::MBPT2::MBPT2 (const \fBRef\fP< \fBKeyVal\fP > &)" .PP The \fBKeyVal\fP constructor\&. .IP "\fB\fCreference\fP\fP" 1c This gives the reference wavefunction\&. It must be an object of type \fBCLSCF\fP for closed-shell molecules and \fBHSOSSCF\fP for open-shell molecules\&. The is no default\&. .PP .IP "\fB\fCnfzc\fP\fP" 1c The number of frozen core orbitals\&. The default is 0\&. If no atoms have an atomic number greater than 30, then the number of orbitals to be frozen can be automatically determined by specifying nfzc = auto\&. .PP .IP "\fB\fCnfzv\fP\fP" 1c The number of frozen virtual orbitals\&. The default is 0\&. .PP .IP "\fB\fCmemory\fP\fP" 1c The amount of memory, in bytes, that each processor may use\&. .PP .IP "\fB\fCmethod\fP\fP" 1c This gives a string that must take on one of the values below\&. The default is mp for closed-shell systems and zapt for open-shell systems\&. .PP .IP "\fB\fCmp\fP\fP" 1c Use Mo/ller-Plesset perturbation theory\&. This is only valid for closed-shell systems\&. Energies and gradients can be computed with this method\&. .PP .IP "\fB\fCopt1\fP\fP" 1c Use the OPT1 variant of open-shell perturbation theory\&. Only energies can be computed for open-shell systems\&. .PP .IP "\fB\fCopt2\fP\fP" 1c Use the OPT2 variant of open-shell perturbation theory\&. Only energies can be computed for open-shell systems\&. .PP .IP "\fB\fCzapt\fP\fP" 1c Use the ZAPT variant of open-shell perturbation theory\&. Only energies can be computed for open-shell systems\&. .PP .PP .PP .IP "\fB\fCalgorithm\fP\fP" 1c This gives a string that must take on one of the values given below\&. The default is memgrp for closed-shell systems\&. For open-shell systems v1 is used for a small number of processors and v2 is used otherwise\&. .PP .IP "\fB\fCmemgrp\fP\fP" 1c Use the distributed shared memory algorithm (which uses a \fBMemoryGrp\fP object)\&. This is only valid for MP2 energies and gradients\&. .PP .IP "\fB\fCv1\fP\fP" 1c Use algorithm V1\&. Only energies can be computed\&. The maximum number of processors that can be utilized is the number of virtual orbitals\&. This algorithm computes few integrals than the others, but has higher communication requirements\&. .PP .IP "\fB\fCv2\fP\fP" 1c Use algorithm V2\&. Only energies can be computed\&. The maximum number of processors that can be utilized is the number of shells\&. .PP .IP "\fB\fCv2lb\fP\fP" 1c Use a modified V2 algorithm that may compute more two electron integrals, but may get better load balance on the $O(n_\mathrm{basis}^5)$ part of the calculation\&. Only energies can be computed\&. This is recommended only for computations involving large molecules (where the transformation is dominant) on very many processors (approaching the number of shells)\&. .PP .PP .PP The v1 and v2 algorithms are discussed in Ida M\&. B\&. Nielsen and Edward T\&. Seidl, J\&. Comp\&. Chem\&. 16, 1301 (1995)\&. The memgrp algorithm is discussed in Ida M\&. B\&. Nielsen, Chem\&. Phys\&. Lett\&. 255, 210 (1996)\&. .PP .IP "\fB\fCmemorygrp\fP\fP" 1c A \fBMemoryGrp\fP object is used by the memgrp algorithm\&. If this is not given the program will try to find an appropriate default\&. .PP .PP .SH "Member Function Documentation" .PP .SS "void sc::MBPT2::compute ()\fC [protected]\fP, \fC [virtual]\fP" .PP Recompute at least the results that have compute true and are not already computed\&. This should only be called by \fBResult\fP's members\&. .PP Implements \fBsc::Compute\fP\&. .PP Reimplemented in \fBsc::MBPT2_R12\fP\&. .SS "void sc::MBPT2::obsolete ()\fC [virtual]\fP" .PP Marks all results as being out of date\&. Any subsequent access to results will cause \fBCompute::compute()\fP to be called\&. .PP Reimplemented from \fBsc::Compute\fP\&. .PP Reimplemented in \fBsc::MBPT2_R12\fP\&. .SS "void sc::MBPT2::save_data_state (\fBStateOut\fP &)\fC [virtual]\fP" .PP Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. This must be implemented by the derived class if the class has data\&. .PP Reimplemented from \fBsc::MolecularEnergy\fP\&. .PP Reimplemented in \fBsc::MBPT2_R12\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.