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-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef _psi_src_lib_libmints_x2cint_h_
29 #define _psi_src_lib_libmints_x2cint_h_
30 
31 #include "psi4/libmints/matrix.h"
32 
33 #define X2CDEBUG 0
34 
35 namespace psi {
36 
41 class X2CInt
42 {
43 public:
44  X2CInt();
45  ~X2CInt();
46 
54  void compute(std::shared_ptr<BasisSet> basis,
55  std::shared_ptr<BasisSet> x2c_basis, SharedMatrix S,
59 private:
61  std::string basis_;
63  std::string x2c_basis_;
66 
68  std::shared_ptr<IntegralFactory> integral_;
69 
71  std::shared_ptr<BasisSet> aoBasis_;
74  std::shared_ptr<BasisSet> aoBasis_contracted_;
75 
77  std::shared_ptr<MatrixFactory> ssFactory_;
79  std::shared_ptr<MatrixFactory> soFactory_;
84 
85  // Matrices in the orbital basis
106 
107  // Matrices in the orbital basis doubled
116 
118  void setup(std::shared_ptr<BasisSet> basis,
119  std::shared_ptr<BasisSet> x2c_basis);
121  void compute_integrals();
123  void form_dirac_h();
125  void diagonalize_dirac_h();
127  void form_X();
129  void form_R();
131  void form_h_FW_plus();
135  void test_h_FW_plus();
137  void project();
138 };
139 
140 }
141 
142 #endif // _psi_src_lib_libmints_x2cint_h_
SharedMatrix xMat
The X matrix.
Definition: x2cint.h:95
void write_integrals_to_disk()
Write the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:421
std::shared_ptr< BasisSet > aoBasis_contracted_
Definition: x2cint.h:74
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:58
SharedMatrix T_x2c_
The X2C kinetic energy matrix.
Definition: x2cint.h:103
bool do_project_
Do basis set projection?
Definition: x2cint.h:65
void diagonalize_dirac_h()
Diagonalize the modified Dirac equation.
Definition: x2cint.cc:202
SharedMatrix C_LS_Mat
Eigenvectors of the modified Dirac equation.
Definition: x2cint.h:113
std::shared_ptr< MatrixFactory > soFactory_
Matrix factory for matrices of dimension nbf x nbf.
Definition: x2cint.h:79
SharedMatrix sMat
The overlap matrix in the orbital basis.
Definition: x2cint.h:87
void form_R()
Form the matrices R and XR.
Definition: x2cint.cc:274
void compute(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis, SharedMatrix S, SharedMatrix T, SharedMatrix V)
Definition: x2cint.cc:54
SharedMatrix wMat
The spin-free relativistic potential (W = pVp) matrix in the orbital basis.
Definition: x2cint.h:93
void form_dirac_h()
Compute the Hamiltonian and overlap matrices of the modified Dirac equation.
Definition: x2cint.cc:154
void test_h_FW_plus()
Test the FW Hamiltonian.
Definition: x2cint.cc:460
SharedMatrix V_x2c_
The X2C potential energy matrix.
Definition: x2cint.h:105
void form_X()
Form the matrix X.
Definition: x2cint.cc:230
SharedMatrix dMat
The four-component Hamiltonian of the modified Dirac equation.
Definition: x2cint.h:109
SharedMatrix SXMat
The four-component overlap matrix of the modified Dirac equation.
Definition: x2cint.h:111
SharedMatrix xrMat
The XR matrix.
Definition: x2cint.h:99
SharedMatrix S_x2c_
The X2C overlap matrix.
Definition: x2cint.h:101
std::shared_ptr< MatrixFactory > ssFactory_
Matrix factory for matrices of dimension 2 nbf x 2 nbf.
Definition: x2cint.h:77
~X2CInt()
Definition: x2cint.cc:50
void form_h_FW_plus()
Form the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:357
Definition: dimension.h:39
std::shared_ptr< BasisSet > aoBasis_
The basis used to solve the Dirac equation.
Definition: x2cint.h:71
SharedMatrix tMat
The kinetic energy matrix in the orbital basis.
Definition: x2cint.h:89
std::string x2c_basis_
The name of the basis set.
Definition: x2cint.h:63
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
Dimension nsopi_
Dimension of the orbital basis.
Definition: x2cint.h:81
void compute_integrals()
Compute the S, T, V, and W integrals.
Definition: x2cint.cc:125
SharedMatrix vMat
The potential energy matrix in the orbital basis.
Definition: x2cint.h:91
X2CInt()
Definition: x2cint.cc:46
SharedVector E_LS_Mat
Eigenvalues of the modified Dirac equation.
Definition: x2cint.h:115
void setup(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis)
Setup the basis objects, integral factories, etc.
Definition: x2cint.cc:78
Computes the 1e-X2C kinetic and potential integrals.
Definition: x2cint.h:41
Dimension nsopi_contracted_
Dimension of the constracted orbital basis.
Definition: x2cint.h:83
std::shared_ptr< IntegralFactory > integral_
Integral factory.
Definition: x2cint.h:68
SharedMatrix rMat
The R matrix.
Definition: x2cint.h:97
Definition: PsiFileImpl.h:39
std::string basis_
The name of the basis set.
Definition: x2cint.h:61
std::shared_ptr< Vector > SharedVector
Definition: adc.h:52
void project()
Basis set projection.
Definition: x2cint.cc:431