MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
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
35namespace sc {
36
37class 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) {}
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
64class 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:
PrimPairsLibint2 contains primitive pair data.
Definition primpairs.h:45
A template class that maintains references counts.
Definition ref.h:361
Base class for objects that can save/restore state.
Definition state.h:45
ShellPairLibint2 is an interface to PrimPairsLibint2.
Definition shellpairs.h:40
void init(const unsigned int s1, const unsigned int s2)
after calling, this object refers to pair {s1,s2}
Definition shellpairs.h:50
ShellPairsLibint2 contains primitive pair data for all shell pairs formed from a pair of basis sets.
Definition shellpairs.h:64
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
ShellPairsLibint2(const Ref< GaussianBasisSet > &bs1, const Ref< GaussianBasisSet > &bs2)
Constructs shell pair data from a pair of basis sets.
ShellPairsLibint2(const ShellPairsLibint2 &other)
Constructs a "shallow" copy of other.
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
SpinCase1 other(SpinCase1 S)
given 1-spin return the other 1-spin
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
Definition primpairs.h:36

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