Psi4
x2cint.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2018 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_lib_libmints_x2cint_h_
30 #define _psi_src_lib_libmints_x2cint_h_
31 
32 #include "psi4/libmints/typedefs.h"
34 
35 #include <string>
36 
37 #define X2CDEBUG 0
38 
39 namespace psi {
40 
41 class MatrixFactory;
42 class IntegralFactory;
43 class BasisSet;
44 
49 class X2CInt {
50  public:
51  X2CInt();
52  ~X2CInt();
53 
61  void compute(std::shared_ptr<BasisSet> basis, std::shared_ptr<BasisSet> x2c_basis, SharedMatrix S, SharedMatrix T,
62  SharedMatrix V);
65  private:
67  std::string basis_;
69  std::string x2c_basis_;
72 
74  std::shared_ptr<IntegralFactory> integral_;
75 
77  std::shared_ptr<BasisSet> aoBasis_;
80  std::shared_ptr<BasisSet> aoBasis_contracted_;
81 
83  std::shared_ptr<MatrixFactory> ssFactory_;
85  std::shared_ptr<MatrixFactory> soFactory_;
90 
91  // Matrices in the orbital basis
112 
113  // Matrices in the orbital basis doubled
122 
124  void setup(std::shared_ptr<BasisSet> basis, std::shared_ptr<BasisSet> x2c_basis);
126  void compute_integrals();
128  void form_dirac_h();
130  void diagonalize_dirac_h();
132  void form_X();
134  void form_R();
136  void form_h_FW_plus();
140  void test_h_FW_plus();
142  void project();
143 };
144 
145 } // namespace psi
146 
147 #endif // _psi_src_lib_libmints_x2cint_h_
SharedMatrix xMat
The X matrix.
Definition: x2cint.h:101
void write_integrals_to_disk()
Write the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:405
std::shared_ptr< BasisSet > aoBasis_contracted_
Definition: x2cint.h:80
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
SharedMatrix T_x2c_
The X2C kinetic energy matrix.
Definition: x2cint.h:109
bool do_project_
Do basis set projection?
Definition: x2cint.h:71
void diagonalize_dirac_h()
Diagonalize the modified Dirac equation.
Definition: x2cint.cc:194
SharedMatrix C_LS_Mat
Eigenvectors of the modified Dirac equation.
Definition: x2cint.h:119
std::shared_ptr< MatrixFactory > soFactory_
Matrix factory for matrices of dimension nbf x nbf.
Definition: x2cint.h:85
SharedMatrix sMat
The overlap matrix in the orbital basis.
Definition: x2cint.h:93
int * T
Definition: stringlist.cc:66
void form_R()
Form the matrices R and XR.
Definition: x2cint.cc:263
void compute(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis, SharedMatrix S, SharedMatrix T, SharedMatrix V)
Definition: x2cint.cc:51
SharedMatrix wMat
The spin-free relativistic potential (W = pVp) matrix in the orbital basis.
Definition: x2cint.h:99
void form_dirac_h()
Compute the Hamiltonian and overlap matrices of the modified Dirac equation.
Definition: x2cint.cc:148
void test_h_FW_plus()
Test the FW Hamiltonian.
Definition: x2cint.cc:444
SharedMatrix V_x2c_
The X2C potential energy matrix.
Definition: x2cint.h:111
void form_X()
Form the matrix X.
Definition: x2cint.cc:220
SharedMatrix dMat
The four-component Hamiltonian of the modified Dirac equation.
Definition: x2cint.h:115
SharedMatrix SXMat
The four-component overlap matrix of the modified Dirac equation.
Definition: x2cint.h:117
SharedMatrix xrMat
The XR matrix.
Definition: x2cint.h:105
SharedMatrix S_x2c_
The X2C overlap matrix.
Definition: x2cint.h:107
std::shared_ptr< MatrixFactory > ssFactory_
Matrix factory for matrices of dimension 2 nbf x 2 nbf.
Definition: x2cint.h:83
~X2CInt()
Definition: x2cint.cc:49
void form_h_FW_plus()
Form the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:343
Definition: dimension.h:40
std::shared_ptr< BasisSet > aoBasis_
The basis used to solve the Dirac equation.
Definition: x2cint.h:77
SharedMatrix tMat
The kinetic energy matrix in the orbital basis.
Definition: x2cint.h:95
std::string x2c_basis_
The name of the basis set.
Definition: x2cint.h:69
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
Dimension nsopi_
Dimension of the orbital basis.
Definition: x2cint.h:87
void compute_integrals()
Compute the S, T, V, and W integrals.
Definition: x2cint.cc:120
SharedMatrix vMat
The potential energy matrix in the orbital basis.
Definition: x2cint.h:97
X2CInt()
Definition: x2cint.cc:47
SharedVector E_LS_Mat
Eigenvalues of the modified Dirac equation.
Definition: x2cint.h:121
void setup(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis)
Setup the basis objects, integral factories, etc.
Definition: x2cint.cc:74
Computes the 1e-X2C kinetic and potential integrals.
Definition: x2cint.h:49
Dimension nsopi_contracted_
Dimension of the constracted orbital basis.
Definition: x2cint.h:89
std::shared_ptr< IntegralFactory > integral_
Integral factory.
Definition: x2cint.h:74
SharedMatrix rMat
The R matrix.
Definition: x2cint.h:103
std::string basis_
The name of the basis set.
Definition: x2cint.h:67
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51
void project()
Basis set projection.
Definition: x2cint.cc:414