85
85
nk_ = bk->nshell();
89
/////////////////////////////////////////////////////////////////////////////
91
GenPetite4::GenPetite4(const Ref<GaussianBasisSet> &b1,
92
const Ref<GaussianBasisSet> &b2,
93
const Ref<GaussianBasisSet> &b3,
94
const Ref<GaussianBasisSet> &b4)
102
ng_ = b1->molecule()->point_group()->char_table().order();
103
if (b2->molecule()->point_group()->char_table().order() != ng_
104
|| b3->molecule()->point_group()->char_table().order() != ng_
105
|| b4->molecule()->point_group()->char_table().order() != ng_) {
106
throw std::runtime_error("GPetite4: not all point groups are the same");
110
atom_map = compute_atom_map(b1);
111
shell_map_i_ = compute_shell_map(atom_map,b1);
112
delete_atom_map(atom_map,b1);
114
atom_map = compute_atom_map(b2);
115
shell_map_j_ = compute_shell_map(atom_map,b2);
116
delete_atom_map(atom_map,b2);
118
atom_map = compute_atom_map(b3);
119
shell_map_k_ = compute_shell_map(atom_map,b3);
120
delete_atom_map(atom_map,b3);
122
atom_map = compute_atom_map(b4);
123
shell_map_l_ = compute_shell_map(atom_map,b4);
124
delete_atom_map(atom_map,b4);
127
GenPetite4::~GenPetite4() {
128
delete_shell_map(shell_map_i_,b1_);
129
delete_shell_map(shell_map_j_,b2_);
130
delete_shell_map(shell_map_k_,b3_);
131
delete_shell_map(shell_map_l_,b4_);
134
/////////////////////////////////////////////////////////////////////////////
136
template <class C4> GPetite4<C4>::GPetite4(const Ref<GaussianBasisSet> &b1,
137
const Ref<GaussianBasisSet> &b2,
138
const Ref<GaussianBasisSet> &b3,
139
const Ref<GaussianBasisSet> &b4,
140
const C4& c): GenPetite4(b1,b2,b3,b4), c_(c)
144
template <class C4> GPetite4<C4>::~GPetite4()
148
/////////////////////////////////////////////////////////////////////////////
151
sc::construct_gpetite(const Ref<GaussianBasisSet> &b1,
152
const Ref<GaussianBasisSet> &b2,
153
const Ref<GaussianBasisSet> &b3,
154
const Ref<GaussianBasisSet> &b4)
156
if (b1 == b2 && b1 == b3 && b1 == b4) {
157
canonical_aaaa c4(b1,b2,b3,b4);
158
return new GPetite4<canonical_aaaa>(b1,b2,b3,b4,c4);
160
else if (b1 == b2 && b3 != b4) {
161
canonical_aabc c4(b1,b2,b3,b4);
162
return new GPetite4<canonical_aabc>(b1,b2,b3,b4,c4);
164
else if (b1 == b2 && b3 == b4) {
165
canonical_aabb c4(b1,b2,b3,b4);
166
return new GPetite4<canonical_aabb>(b1,b2,b3,b4,c4);
169
canonical_abcd c4(b1,b2,b3,b4);
170
return new GPetite4<canonical_abcd>(b1,b2,b3,b4,c4);
88
174
/////////////////////////////////////////////////////////////////////////////
90
176
// Local Variables: