-
Notifications
You must be signed in to change notification settings - Fork 142
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 handling of high l-momentum channels in ECP local potential #2920
Conversation
Can one of the admins verify this patch? |
I changed the title to make writing the human readable changelog easier. |
@@ -154,7 +154,7 @@ void ECPComponentBuilder::buildLocal(xmlNodePtr cur) | |||
{ | |||
if (grid_global == 0) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove {} for a single line. Please update all the places touched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -32,13 +32,13 @@ void ECPComponentBuilder::buildSemiLocalAndLocal(std::vector<xmlNodePtr>& semiPt | |||
if (grid_global == 0) | |||
{ | |||
app_error() << " Global grid needs to be defined." << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app_error() is more for printing from any rank which is unknown.
Since the error is uniform. Please
fuse
app_error() << " Global grid needs to be defined." << std::endl;
into myComm->barrier_and_abort
to print one copy only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
rmax = std::max(rmax, rc); | ||
if (angMon.find(lstr) == angMon.end()) | ||
{ | ||
app_error() << "requested angular momentum " << lstr << " not available.\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples
myComm->barrier_and_abort("basisset \"" + basisset_name + "\" cannot be found\n"); |
You may use ostringstream to buffer contents if it is long.
myComm->barrier_and_abort(err_msg.str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Okay to test |
Please review the developer documentation
on the wiki of this project that contains help and requirements.
Proposed changes
This PR closes issue #2917.
ECPComponentBuilder had a str,int map for allowed angular momentum, and only had up to "g".
Since the NonLocalECPComponent has implemented nonlocal channels up to lmax = 7 (j channel), I added to the angMon map up to lmax = 8 (k channel) since the k channel could be used as a local in that case.
Additionally, in ECPComponentBuidler::buildSemiLocalAndLocal I add a check to see if the requested angular momentum is actually in the angMon map. Otherwise it aborts
What type(s) of changes does this code introduce?
Delete the items that do not apply
Does this introduce a breaking change?
What systems has this change been tested on?
My workstation
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.