ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
snap_cg.h
Go to the documentation of this file.
1#ifndef SNAP_CG_H
2#define SNAP_CG_H
3
4#include <map>
5#include <tuple>
6#include <vector>
7
8namespace ModuleMD
9{
10namespace SNAP
11{
12
20{
21 public:
22 explicit ClebschGordanTable(int twojmax);
23
24 double coefficient(
25 int j1,
26 int m1,
27 int j2,
28 int m2,
29 int j,
30 int m) const;
31
32 private:
33 struct Entry
34 {
35 int j1;
36 int m1;
37 int j2;
38 int m2;
39 int j;
40 int m;
41 double value;
42 };
43
44 static bool allowed(
45 int j1,
46 int m1,
47 int j2,
48 int m2,
49 int j,
50 int m);
51 static double coefficient_uncached(
52 int j1,
53 int m1,
54 int j2,
55 int m2,
56 int j,
57 int m);
58 static double factorial(int value);
59 const Entry *find(
60 int j1,
61 int m1,
62 int j2,
63 int m2,
64 int j,
65 int m) const;
66
67 int max_j_;
68 std::vector<Entry> entries_;
69 std::map<std::tuple<int, int, int, int, int, int>, std::size_t> entry_indices_;
70};
71
72} // namespace SNAP
73} // namespace ModuleMD
74
75#endif // SNAP_CG_H
double coefficient(int j1, int m1, int j2, int m2, int j, int m) const
Definition snap_cg.cpp:140
ClebschGordanTable(int twojmax)
Definition snap_cg.cpp:15
static double factorial(int value)
Definition snap_cg.cpp:51
static double coefficient_uncached(int j1, int m1, int j2, int m2, int j, int m)
Definition snap_cg.cpp:83
const Entry * find(int j1, int m1, int j2, int m2, int j, int m) const
Definition snap_cg.cpp:126
static bool allowed(int j1, int m1, int j2, int m2, int j, int m)
Definition snap_cg.cpp:60
std::vector< Entry > entries_
Definition snap_cg.h:68
int max_j_
Definition snap_cg.h:67
std::map< std::tuple< int, int, int, int, int, int >, std::size_t > entry_indices_
Definition snap_cg.h:69
Definition snap_calculator.cpp:8
Definition esolver_forcefields.h:9
double value
Definition snap_cg.h:41