MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
tascf.hpp
1//
2// tascf.hpp
3//
4// Copyright (C) 2013 Drew Lewis
5//
6// Authors: Drew Lewis
7// Maintainer: Drew Lewis and Edward Valeev
8//
9// This file is part of the MPQC Toolkit.
10//
11// The MPQC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The MPQC Toolkit 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 Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the MPQC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _MPQC_CHEMISTRY_QC_SCF_TASCF_HPP_
29#define _MPQC_CHEMISTRY_QC_SCF_TASCF_HPP_
30
31#include <chemistry/qc/wfn/tawfn.hpp>
32#include <chemistry/qc/basis/integral.h>
33#include <chemistry/qc/basis/tbint.h>
34#include <elemental-lite.hpp>
35
36namespace mpqc{
37 namespace TA {
38
39 class SCF : public Wavefunction {
40 public:
41 typedef Wavefunction::TAMatrix TAMatrix;
42 typedef Wavefunction::TAVector TAVector;
43 //typedef Wavefunction::TAMatrixExpr TAMatrixExpr;
44 typedef elem::DistMatrix<double, elem::VR, elem::STAR> ElemVector;
45 typedef std::pair<ElemVector, TAMatrix> ElemTAEigenSystem;
46
51 virtual ~SCF();
52
54 virtual size_t nelectron() const override;
55
57 virtual size_t occupation() const {return occupation_;}
58
63 TAMatrix MO_eigenvectors(double);
64
69 TAMatrix
71 return MO_eigenvectors(MO_eigensystem_.desired_accuracy());
72 }
73
78 ElemVector
80
85 ElemVector
87 return MO_eigenvalues(MO_eigensystem_.desired_accuracy());
88 }
89
93 ElemTAEigenSystem
95
99 ElemTAEigenSystem
101 return MO_eigensystem(MO_eigensystem_.desired_accuracy());
102 }
103
105 TAMatrix& ao_fock(double);
106
108 TAMatrix& ao_fock(){return ao_fock(ao_fock_.desired_accuracy());}
109
114 //TAMatrixExpr ao_fock_expr(std::string);
115
117 virtual double scf_energy() = 0;
118
119 void print(std::ostream &os = sc::ExEnv::out0()) const;
120
121 protected:
122
126
127 virtual void compute_ao_fock(double) = 0;
128
129 // returns & to the current state of ao_fock_ used for computing.
130 virtual TAMatrix& scf_ao_fock_(){return ao_fock_.result_noupdate();}
131
132 unsigned int miniter() const {return miniter_; }
133 unsigned int maxiter() const {return maxiter_; }
134
135 void set_occupation(unsigned int i){occupation_ = i;}
136
137 private:
138 // default number of iterations to use
139 unsigned int maxiter_ = 100;
140 unsigned int miniter_ = 0;
141
142 // The ao_fock matrix
143 AccResultMatrix ao_fock_;
144 // Holds the eigensystem of the ao_fock matrix
145 AccResultEigenSystem MO_eigensystem_;
146
147 // Number of electrons
148 size_t occupation_ = 0;
149
150 static sc::ClassDesc class_desc_;
151
152 };
153 } // namespace mpqc::TA
154} //namespace mpqc
155
156
157#endif /* _MPQC_CHEMISTRY_QC_SCF_TASCF_HPP_ */
Definition tascf.hpp:39
virtual size_t occupation() const
Definition tascf.hpp:57
SCF(const sc::Ref< sc::KeyVal > &kval)
SCF KeyValue constructor.
void print(std::ostream &os=sc::ExEnv::out0()) const
Print information about the object.
ElemVector MO_eigenvalues(double)
TAMatrix MO_eigenvectors(double)
virtual size_t nelectron() const override
ElemVector MO_eigenvalues()
Definition tascf.hpp:86
ElemTAEigenSystem MO_eigensystem()
Definition tascf.hpp:100
TAMatrix & ao_fock()
Definition tascf.hpp:108
ElemTAEigenSystem MO_eigensystem(double)
TAMatrix MO_eigenvectors()
Definition tascf.hpp:70
virtual double scf_energy()=0
Returns an expression to ao_fock matrix.
TAMatrix & ao_fock(double)
Wavefunction represents an electronic wave function expressed in terms of a basis set of atomic orbit...
Definition tawfn.hpp:49
TiledArray::TArray2D TAMatrix
Matrix of reals.
Definition tawfn.hpp:54
TiledArray::TArray1D TAVector
Vector of reals.
Definition tawfn.hpp:53
This associates a result datum with an accuracy.
Definition comptmpl.h:88
This class is used to contain information about classes.
Definition class.h:147
static std::ostream & out0()
Return an ostream that writes from node 0.
A template class that maintains references counts.
Definition ref.h:361
Contains new MPQC code since version 3.
Definition integralenginepool.hpp:37

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.