ERKALE
ERKALE - DFT from Hel
 All Classes Functions Variables Friends Pages
atomtable.h
1 /*
2  * This source code is part of
3  *
4  * E R K A L E
5  * -
6  * HF/DFT from Hel
7  *
8  * Written by Susi Lehtola, 2010-2013
9  * Copyright (c) 2010-2013, Susi Lehtola
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  */
16 
17 #ifndef ATOMTABLE_H
18 #define ATOMTABLE_H
19 
20 #include "integrals.h"
21 
23 typedef struct {
25  size_t i;
27  size_t j;
28 } bfpair_t;
29 
30 class AtomTable {
32  size_t Nbf;
34  size_t idx(size_t i, size_t j, size_t k, size_t l) const;
36  std::vector<bfpair_t> pairs;
38  std::vector<double> ints;
39 
40  public:
42  AtomTable();
44  ~AtomTable();
45 
47  void fill(const std::vector<bf_t> & bas, bool verbose);
49  double getERI(size_t i, size_t j, size_t k, size_t l) const;
50 
52  arma::mat calcJ(const arma::mat & P) const;
54  arma::mat calcK(const arma::mat & P) const;
55 };
56 
57 #endif
Definition: atomtable.h:30
std::vector< bfpair_t > pairs
List of pairs.
Definition: atomtable.h:36
std::vector< double > ints
Table of integrals.
Definition: atomtable.h:38
size_t idx(size_t i, size_t j, size_t k, size_t l) const
Calculate index in integral table.
Definition: atomtable.cpp:25
void fill(const std::vector< bf_t > &bas, bool verbose)
Fill table.
Definition: atomtable.cpp:29
AtomTable()
Consructor.
Definition: atomtable.cpp:21
size_t j
Second basis function.
Definition: atomtable.h:27
size_t i
First basis function.
Definition: atomtable.h:25
arma::mat calcJ(const arma::mat &P) const
Form Coulomb matrix.
Definition: atomtable.cpp:90
double getERI(size_t i, size_t j, size_t k, size_t l) const
Get ERI from table.
Definition: atomtable.cpp:83
~AtomTable()
Destructor.
Definition: atomtable.cpp:87
arma::mat calcK(const arma::mat &P) const
Form exchange matrix.
Definition: atomtable.cpp:131
size_t Nbf
Amount of functions.
Definition: atomtable.h:32
Helper for parallellizing loops.
Definition: atomtable.h:23