MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
tawfn.hpp
1//
2// tawfn.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_WFN_TAWFN_HPP_
29#define _MPQC_CHEMISTRY_WFN_TAWFN_HPP_
30
31#include <tiledarray_fwd.h>
32#include <util/madness/world.h>
33#include <chemistry/qc/basis/integral.h>
34#include <chemistry/qc/basis/tiledbasisset.hpp>
35#include <chemistry/molecule/energy.h>
36#include <chemistry/qc/wfn/spin.h>
37
38// will happen: namespace sc -> namespace mpqc
39
40namespace mpqc {
41 namespace TA {
42
45
50
51 public:
52
53 typedef TiledArray::TArray1D TAVector;
54 typedef TiledArray::TArray2D TAMatrix;
59 typedef TiledArray::TensorD TATensor;
60
61
66 //Wavefunction(sc::StateIn &s);
67 virtual ~Wavefunction();
68 //void save_data_state(sc::StateOut &s);
69
72 return tbs_;
73 }
76 return integral_;
77 }
78
81 return tbs_->molecule();
82 }
83
85 double total_charge() const{
86 return molecule()->total_charge() - nelectron();
87 }
88
90 virtual size_t nelectron() const = 0;
91
102 virtual double magnetic_moment() const;
105 return magnetic_moment() != 0.0;
106 }
107
109 virtual const TAMatrix& rdm1() = 0;
110
115 //virtual TAMatrixExpr rdm1_expr(std::string);
116
118 virtual const TAMatrix& rdm1(sc::SpinCase1 s) = 0;
120 virtual const TAMatrix& ao_overlap();
121
126 //virtual TAMatrixExpr ao_overlap_expr(std::string);
127
129 virtual const TAMatrix& ao_hcore();
130
135 //virtual TAMatrixExpr ao_hcore_expr(std::string);
136
138 unsigned debug() const {
139 return debug_;
140 }
141
142
144 void obsolete();
145
146 void print(std::ostream& os = sc::ExEnv::out0()) const;
147
148 // functions for internal access
149 protected:
150
151 const sc::Ref<mpqc::World> world() const {
152 return world_;
153 }
154
158 return rdm1_.result_noupdate();
159 }
160
161 ResultMatrix rdm1_; // Result density abreviated D
162 ResultMatrix rdm1_alpha_; // Result alpha density abreviated Da
163 ResultMatrix rdm1_beta_; // Result beta density abreviated Db
164
165 private:
166
169 sc::Ref<sc::Integral> integral_;
170 ResultMatrix overlap_; // Overlap Matrix abreviated S
171 ResultMatrix hcore_; // Hcore Matrix abreviated H
172
173 mutable double magnetic_moment_;
176 bool nonzero_efield_supported() const;
177
178 unsigned debug_;
179
180 private:
181 static sc::ClassDesc class_desc_;
182
183 };
184
186
187 }// namespace mpqc::TA
188} // namespace mpqc
189
190#endif /* CHEMISTRY_WFN_TAWFN_HPP */
Wavefunction represents an electronic wave function expressed in terms of a basis set of atomic orbit...
Definition tawfn.hpp:49
Wavefunction(const sc::Ref< sc::KeyVal > &kval)
The KeyVal constructor.
TiledArray::TArray2D TAMatrix
Matrix of reals.
Definition tawfn.hpp:54
virtual TAMatrix & ao_density()
Returns reference to rdm1_.result_noupdate(), but guarantees nothing about its computed status.
Definition tawfn.hpp:157
const sc::Ref< TiledBasisSet > & basis() const
Definition tawfn.hpp:71
TiledArray::TArray1D TAVector
Vector of reals.
Definition tawfn.hpp:53
virtual const TAMatrix & ao_overlap()
Returns the AO overlap.
const sc::Ref< sc::Integral > & integral() const
Definition tawfn.hpp:75
virtual const TAMatrix & rdm1(sc::SpinCase1 s)=0
Returns expression to the AO density matrix.
void print(std::ostream &os=sc::ExEnv::out0()) const
Print information about the object.
sc::Ref< sc::Molecule > molecule() const override
Definition tawfn.hpp:80
virtual const TAMatrix & rdm1()=0
Returns electron 1-body reduced density matrix (1-RDM) in AO basis.
unsigned debug() const
Returns expression to the AO hcore matrix.
Definition tawfn.hpp:138
double total_charge() const
Definition tawfn.hpp:85
void obsolete()
makes this object obsolete, next call to compute() will recompute
bool spin_polarized()
Definition tawfn.hpp:104
virtual double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
virtual size_t nelectron() const =0
virtual const TAMatrix & ao_hcore()
Returns expression to the AO overlap matrix.
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.
The MolecularEnergy abstract class inherits from the Function class.
Definition energy.h:54
double total_charge() const
Returns the total nuclear charge.
A template class that maintains references counts.
Definition ref.h:361
Result are members of Compute specializations that keep track of whether or not a particular result s...
Definition comptmpl.h:37
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.