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/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 {
51 public:
52  X2CInt();
53  ~X2CInt();
54 
62  void compute(std::shared_ptr<BasisSet> basis,
63  std::shared_ptr<BasisSet> x2c_basis, SharedMatrix S,
67 private:
69  std::string basis_;
71  std::string x2c_basis_;
74 
76  std::shared_ptr<IntegralFactory> integral_;
77 
79  std::shared_ptr<BasisSet> aoBasis_;
82  std::shared_ptr<BasisSet> aoBasis_contracted_;
83 
85  std::shared_ptr<MatrixFactory> ssFactory_;
87  std::shared_ptr<MatrixFactory> soFactory_;
92 
93  // Matrices in the orbital basis
114 
115  // Matrices in the orbital basis doubled
124 
126  void setup(std::shared_ptr<BasisSet> basis,
127  std::shared_ptr<BasisSet> x2c_basis);
129  void compute_integrals();
131  void form_dirac_h();
133  void diagonalize_dirac_h();
135  void form_X();
137  void form_R();
139  void form_h_FW_plus();
143  void test_h_FW_plus();
145  void project();
146 };
147 
148 }
149 
150 #endif // _psi_src_lib_libmints_x2cint_h_
SharedMatrix xMat
The X matrix.
Definition: x2cint.h:103
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:82
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
SharedMatrix T_x2c_
The X2C kinetic energy matrix.
Definition: x2cint.h:111
bool do_project_
Do basis set projection?
Definition: x2cint.h:73
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:121
std::shared_ptr< MatrixFactory > soFactory_
Matrix factory for matrices of dimension nbf x nbf.
Definition: x2cint.h:87
SharedMatrix sMat
The overlap matrix in the orbital basis.
Definition: x2cint.h:95
int * T
Definition: stringlist.cc:66
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:101
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:113
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:117
SharedMatrix SXMat
The four-component overlap matrix of the modified Dirac equation.
Definition: x2cint.h:119
SharedMatrix xrMat
The XR matrix.
Definition: x2cint.h:107
SharedMatrix S_x2c_
The X2C overlap matrix.
Definition: x2cint.h:109
std::shared_ptr< MatrixFactory > ssFactory_
Matrix factory for matrices of dimension 2 nbf x 2 nbf.
Definition: x2cint.h:85
~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:79
SharedMatrix tMat
The kinetic energy matrix in the orbital basis.
Definition: x2cint.h:97
std::string x2c_basis_
The name of the basis set.
Definition: x2cint.h:71
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
Dimension nsopi_
Dimension of the orbital basis.
Definition: x2cint.h:89
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:99
X2CInt()
Definition: x2cint.cc:47
SharedVector E_LS_Mat
Eigenvalues of the modified Dirac equation.
Definition: x2cint.h:123
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:49
Dimension nsopi_contracted_
Dimension of the constracted orbital basis.
Definition: x2cint.h:91
std::shared_ptr< IntegralFactory > integral_
Integral factory.
Definition: x2cint.h:76
SharedMatrix rMat
The R matrix.
Definition: x2cint.h:105
std::string basis_
The name of the basis set.
Definition: x2cint.h:69
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51
void project()
Basis set projection.
Definition: x2cint.cc:432