MPQC  3.0.0-alpha
ccr12.h
1 //
2 // ccr12.h -- base class for CC and CC-R12 classes
3 //
4 // Copyright (C) 2009 Toru Shiozaki
5 //
6 // Author: Toru Shiozaki <shiozaki.toru@gmail.com>
7 // Maintainer: TS & EFV
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC 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 SC 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 SC 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 _chemistry_qc_ccr12_ccr12_h
29 #define _chemistry_qc_ccr12_ccr12_h
30 
31 #include <string>
32 #include <util/group/memory.h>
33 #include <util/group/message.h>
34 #include <util/group/thread.h>
35 #include <chemistry/qc/scf/scf.h>
36 #include <chemistry/qc/mbptr12/r12wfnworld.h>
37 #include <chemistry/qc/mbptr12/r12int_eval.h>
38 #include <chemistry/qc/ccr12/tensor.h>
39 #include <chemistry/qc/ccr12/ccr12_info.h>
40 
41 namespace sc {
42 
44 class CCR12: public Wavefunction {
45  protected:
46  Ref<ThreadGrp> thrgrp_;
47  Ref<MessageGrp> msggrp_;
48  Ref<MemoryGrp> mem_;
49 
50  Ref<R12IntEval> r12eval_; // the R12 intermediates evaluator
51  Ref<R12WavefunctionWorld> r12world_; // parameters for r12eval_
52  Ref<SCF> reference_;
53 
54  CCR12_Info* ccr12_info_;
55  int nfzc_, nfzv_;
56  long worksize_;
57  long memorysize_;
58  bool rhf_;
59  int maxiter_;
60  int tilesize_forced_;
61  Ref<RegionTimer> timer_;
62  std::string theory_;
63  std::string perturbative_;
64  double ccthresh_;
65 
66  int ndiis_;
67  int diis_start_;
68 
69  public:
70  CCR12(StateIn&);
71  CCR12(const Ref<KeyVal>&);
72  ~CCR12();
73  CCR12_Info* info() const { return ccr12_info_;};
74 
75  const Ref<R12WavefunctionWorld>& r12world() const { return r12world_; }
76  const Ref<R12IntEval>& r12eval() const { return r12eval_; }
77  Ref<SCF> ref() { return reference_; }
78 
79  double magnetic_moment() const { return ccr12_info_->magnetic_moment(); };
80 
81  RefSymmSCMatrix density() { return 0; };
82  int nelectron() { return ccr12_info_->naoa()+ccr12_info_->naob(); };
83  void obsolete();
84  int value_implemented() const { return 1; };
85 
86  protected:
87  void compute();
88  static double ref_to_ccr12_acc() { return 100.0; }
89 
90  // print utilities
91  void print_theory();
92  void print_iteration_header(std::string);
93  void print_iteration_footer();
94  void print_iteration(int,double,double,double,double);
95  void print_iteration_header_short(std::string);
96  void print_iteration_footer_short();
97  void print_iteration_short(int,double,double,double);
98  void print_correction(double,double,std::string);
99  void print(std::ostream&) const;
100  void print_timing(double,std::string);
101 
102 };
103 
104 }
105 
106 #endif
sc::CCR12::compute
void compute()
Recompute at least the results that have compute true and are not already computed.
sc::CCR12::print
void print(std::ostream &) const
Print information about the object.
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
sc::CCR12::nelectron
int nelectron()
Returns the number of electrons.
Definition: ccr12.h:82
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::Wavefunction
A Wavefunction is a MolecularEnergy that utilizies a GaussianBasisSet.
Definition: wfn.h:52
sc::StateIn
Definition: statein.h:79
sc::CCR12::density
RefSymmSCMatrix density()
Returns the SO density.
Definition: ccr12.h:81
sc::CCR12
CCR12 is the base class for CC and CC-R12 methods.
Definition: ccr12.h:44
sc::CCR12::obsolete
void obsolete()
Marks all results as being out of date.
sc::CCR12::value_implemented
int value_implemented() const
Definition: ccr12.h:84
sc::CCR12::magnetic_moment
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
Definition: ccr12.h:79
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
sc::CCR12_Info
CCR12_Info is the compilation of members that are used in CC and CC-R12 methods.
Definition: ccr12_info.h:50

Generated at Sun Jan 26 2020 23:23:57 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.