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

Fix: If the number of NAOs for an angular momentum is 0, filter the NAOs in exx #5092

Closed
wants to merge 2 commits into from
Closed
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
11 changes: 11 additions & 0 deletions source/module_ri/exx_abfs-construct_orbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> Exx_Abfs::Construct_
}
}
}

for (int T = 0; T < orbs.size() ; T++)
{
for (int L=orbs[T].size()-1; L >= 0 ; L--)
{
if (orbs[T][L].size()>0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks confused to me, it looks only the L = orbs[T].size()-1 is used for the judgement, then break the loop or the orbs[T] will be resized in the L loop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If orbs[T] = 2s 2p 1d 0f 0g, it will transformed to 2s 2p 1d

break;
else
orbs[T].resize(L);
}
}
return orbs;
}

Expand Down
Loading