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 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/matrix.h"
33 
34 #define X2CDEBUG 0
35 
36 namespace psi {
37 
38 class MatrixFactory;
39 
44 class X2CInt
45 {
46 public:
47  X2CInt();
48  ~X2CInt();
49 
57  void compute(std::shared_ptr<BasisSet> basis,
58  std::shared_ptr<BasisSet> x2c_basis, SharedMatrix S,
62 private:
64  std::string basis_;
66  std::string x2c_basis_;
69 
71  std::shared_ptr<IntegralFactory> integral_;
72 
74  std::shared_ptr<BasisSet> aoBasis_;
77  std::shared_ptr<BasisSet> aoBasis_contracted_;
78 
80  std::shared_ptr<MatrixFactory> ssFactory_;
82  std::shared_ptr<MatrixFactory> soFactory_;
87 
88  // Matrices in the orbital basis
109 
110  // Matrices in the orbital basis doubled
119 
121  void setup(std::shared_ptr<BasisSet> basis,
122  std::shared_ptr<BasisSet> x2c_basis);
124  void compute_integrals();
126  void form_dirac_h();
128  void diagonalize_dirac_h();
130  void form_X();
132  void form_R();
134  void form_h_FW_plus();
138  void test_h_FW_plus();
140  void project();
141 };
142 
143 }
144 
145 #endif // _psi_src_lib_libmints_x2cint_h_
SharedMatrix xMat
The X matrix.
Definition: x2cint.h:98
void write_integrals_to_disk()
Write the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:422
std::shared_ptr< BasisSet > aoBasis_contracted_
Definition: x2cint.h:77
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
SharedMatrix T_x2c_
The X2C kinetic energy matrix.
Definition: x2cint.h:106
bool do_project_
Do basis set projection?
Definition: x2cint.h:68
void diagonalize_dirac_h()
Diagonalize the modified Dirac equation.
Definition: x2cint.cc:203
SharedMatrix C_LS_Mat
Eigenvectors of the modified Dirac equation.
Definition: x2cint.h:116
std::shared_ptr< MatrixFactory > soFactory_
Matrix factory for matrices of dimension nbf x nbf.
Definition: x2cint.h:82
SharedMatrix sMat
The overlap matrix in the orbital basis.
Definition: x2cint.h:90
void form_R()
Form the matrices R and XR.
Definition: x2cint.cc:275
void compute(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis, SharedMatrix S, SharedMatrix T, SharedMatrix V)
Definition: x2cint.cc:55
SharedMatrix wMat
The spin-free relativistic potential (W = pVp) matrix in the orbital basis.
Definition: x2cint.h:96
void form_dirac_h()
Compute the Hamiltonian and overlap matrices of the modified Dirac equation.
Definition: x2cint.cc:155
void test_h_FW_plus()
Test the FW Hamiltonian.
Definition: x2cint.cc:461
SharedMatrix V_x2c_
The X2C potential energy matrix.
Definition: x2cint.h:108
void form_X()
Form the matrix X.
Definition: x2cint.cc:231
SharedMatrix dMat
The four-component Hamiltonian of the modified Dirac equation.
Definition: x2cint.h:112
SharedMatrix SXMat
The four-component overlap matrix of the modified Dirac equation.
Definition: x2cint.h:114
SharedMatrix xrMat
The XR matrix.
Definition: x2cint.h:102
SharedMatrix S_x2c_
The X2C overlap matrix.
Definition: x2cint.h:104
std::shared_ptr< MatrixFactory > ssFactory_
Matrix factory for matrices of dimension 2 nbf x 2 nbf.
Definition: x2cint.h:80
~X2CInt()
Definition: x2cint.cc:51
void form_h_FW_plus()
Form the FW Hamiltonian for positive energy states.
Definition: x2cint.cc:358
Definition: dimension.h:38
std::shared_ptr< BasisSet > aoBasis_
The basis used to solve the Dirac equation.
Definition: x2cint.h:74
SharedMatrix tMat
The kinetic energy matrix in the orbital basis.
Definition: x2cint.h:92
std::string x2c_basis_
The name of the basis set.
Definition: x2cint.h:66
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
Dimension nsopi_
Dimension of the orbital basis.
Definition: x2cint.h:84
void compute_integrals()
Compute the S, T, V, and W integrals.
Definition: x2cint.cc:126
SharedMatrix vMat
The potential energy matrix in the orbital basis.
Definition: x2cint.h:94
X2CInt()
Definition: x2cint.cc:47
SharedVector E_LS_Mat
Eigenvalues of the modified Dirac equation.
Definition: x2cint.h:118
void setup(std::shared_ptr< BasisSet > basis, std::shared_ptr< BasisSet > x2c_basis)
Setup the basis objects, integral factories, etc.
Definition: x2cint.cc:79
Computes the 1e-X2C kinetic and potential integrals.
Definition: x2cint.h:44
Dimension nsopi_contracted_
Dimension of the constracted orbital basis.
Definition: x2cint.h:86
std::shared_ptr< IntegralFactory > integral_
Integral factory.
Definition: x2cint.h:71
SharedMatrix rMat
The R matrix.
Definition: x2cint.h:100
Definition: PsiFileImpl.h:40
std::string basis_
The name of the basis set.
Definition: x2cint.h:64
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51
void project()
Basis set projection.
Definition: x2cint.cc:432