Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Molden file generation for solid harmonic bases #345

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions include/libint2/lcao/molden.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,6 @@ class Export {

switch (contr.l) {
case 1:
if (contr.pure)
throw std::logic_error(
"molden::Export cannot handle solid harmonics p shells");
break;
case 2:
case 3:
case 4: {
Expand Down Expand Up @@ -300,19 +296,18 @@ class Export {
const auto pure = shell.contr[c].pure;
if (pure) {
int m;
FOR_SOLIDHARM_MOLDEN(l, m)
const auto ao_in_shell = libint2::INT_SOLIDHARMINDEX(l, m);
ao_map_[ao_molden] = ao + ao_in_shell;
++ao_molden;
END_FOR_SOLIDHARM_MOLDEN
ao += 2 * l + 1;
} else {
int i, j, k;
FOR_CART_MOLDEN(i, j, k, l)
const auto ao_in_shell = INT_CARTINDEX(l, i, j);
ao_map_[ao_molden] = ao + ao_in_shell;
++ao_molden;
END_FOR_CART_MOLDEN
if (l == 1) {
ao_map_[ao_molden] = ao + 2;
ao_map_[ao_molden + 1] = ao;
ao_map_[ao_molden + 2] = ao + 1;
ao_molden += 3;
} else {
FOR_SOLIDHARM_MOLDEN(l, m)
const auto ao_in_shell = libint2::INT_SOLIDHARMINDEX(l, m);
ao_map_[ao_molden] = ao + ao_in_shell;
++ao_molden;
END_FOR_SOLIDHARM_MOLDEN
}
ao += INT_NCART(l);
}
} // contraction loop
Expand Down
Loading