MPQC  3.0.0-alpha
shellpairs.h
1 //
2 // shellpairs.h
3 //
4 // Copyright (C) 2001 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.edu>
7 // Maintainer: EV
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_libint2_shellpairs_h
29 #define _chemistry_qc_libint2_shellpairs_h
30 
31 #include <util/ref/ref.h>
32 #include <chemistry/qc/basis/basis.h>
33 #include <chemistry/qc/libint2/primpairs.h>
34 
35 namespace sc {
36 
37 class ShellPairsLibint2;
38 
41  const PrimPairsLibint2& prim_pairs_;
42  unsigned int prim1_offset_;
43  unsigned int prim2_offset_;
44 
45  public:
46  ShellPairLibint2(const PrimPairsLibint2& pp) : prim_pairs_(pp) {}
47  ~ShellPairLibint2() {}
48 
50  void init(const unsigned int s1,
51  const unsigned int s2) {
52  prim1_offset_ = prim_pairs_.shell_to_prim1_[s1];
53  prim2_offset_ = prim_pairs_.shell_to_prim2_[s2];
54  }
55 
56  prim_pair_t* prim_pair(unsigned int p1, unsigned int p2) const { return prim_pairs_.prim_pair(p1+prim1_offset_,p2+prim2_offset_); };
57  double prim_pair_P(unsigned int p1, unsigned int p2, unsigned int xyz) const { return prim_pairs_.P(p1+prim1_offset_,p2+prim2_offset_,xyz); };
58  double prim_pair_gamma(unsigned int p1, unsigned int p2) const { return prim_pairs_.gamma(p1+prim1_offset_,p2+prim2_offset_); };
59  double prim_pair_ovlp(unsigned int p1, unsigned int p2) const { return prim_pairs_.ovlp(p1+prim1_offset_,p2+prim2_offset_); }
60 };
61 
62 
64 class ShellPairsLibint2: virtual public SavableState {
67  Ref<PrimPairsLibint2> prim_pairs_;
68  ShellPairLibint2* shell_pair_;
69 
70  public:
77  const Ref<GaussianBasisSet>& bs2);
85 
87 
89 
90  ShellPairLibint2* shell_pair(unsigned int si, unsigned int sj) const {
91  shell_pair_->init(si, sj);
92  return shell_pair_;
93  }
94 };
95 
96 }
97 
98 #endif
99 
100 // Local Variables:
101 // mode: c++
102 // c-file-style: "CLJ"
103 // End:
sc::ShellPairLibint2::init
void init(const unsigned int s1, const unsigned int s2)
after calling, this object refers to pair {s1,s2}
Definition: shellpairs.h:50
sc::ShellPairsLibint2::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::ShellPairLibint2
ShellPairLibint2 is an interface to PrimPairsLibint2.
Definition: shellpairs.h:40
sc::ShellPairsLibint2
ShellPairsLibint2 contains primitive pair data for all shell pairs formed from a pair of basis sets.
Definition: shellpairs.h:64
sc::StateIn
Definition: statein.h:79
sc::PrimPairsLibint2
PrimPairsLibint2 contains primitive pair data.
Definition: primpairs.h:45
sc::other
SpinCase1 other(SpinCase1 S)
given 1-spin return the other 1-spin
sc::StateOut
Definition: stateout.h:71
sc::prim_pair_t
Definition: primpairs.h:36
sc::ShellPairsLibint2::ShellPairsLibint2
ShellPairsLibint2(const Ref< GaussianBasisSet > &bs1, const Ref< GaussianBasisSet > &bs2)
Constructs shell pair data from a pair of basis sets.
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:45
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

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