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

Add support for PseudoDojo PAW pseudos (alternative) #42

Merged
merged 4 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
17 changes: 17 additions & 0 deletions aiida_pseudo/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,23 @@ def cmd_install_pseudo_dojo(version, functional, relativistic, protocol, pseudo_
msg = f'md5 of pseudo for element {element} does not match that of the metadata {md5}'
echo.echo_critical(msg)

adjusted_cutoff_elements = []
zooks97 marked this conversation as resolved.
Show resolved Hide resolved
zooks97 marked this conversation as resolved.
Show resolved Hide resolved
for stringency, str_cutoffs in cutoffs.items():
max_cutoff_wfc = max([str_cutoffs[element]['cutoff_wfc'] for element in str_cutoffs])
max_cutoff_rho = max([str_cutoffs[element]['cutoff_rho'] for element in str_cutoffs])
for element, cutoff in str_cutoffs.items():
if cutoff['cutoff_wfc'] <= 0:
cutoffs[stringency][element]['cutoff_wfc'] = max_cutoff_wfc * 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are already taking the maximum of the stringency set, should we really even double it? Can't find your comment anymore about what the PD team recommended about cutoffs for lanthanides. I have the feeling this is a bit excessive. If we give a warning that they are not officially tested, maybe just using the max itself should be fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They recommended 20 Ha as a rule of thumb, but they also mentioned that the density (PAW double grid) cutoff may need to be larger than what is generally required. As the elements that are missing are only the Lanthanides, it could make sense to do something "too strict" to be safe.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, but what is the max cutoff in the strict set? Is that more or less than 20 Ha. Because it if iis more, and we times two that, it will be a lot more than 20 Ha, so maybe a bit excessive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the max in the strict set is 25, so I agree that 2.0 would be a bit extreme. Perhaps a lower multiplier would be better.

adjusted_cutoff_elements.append(element)
if cutoff['cutoff_rho'] <= 0:
zooks97 marked this conversation as resolved.
Show resolved Hide resolved
cutoffs[stringency][element]['cutoff_rho'] = max_cutoff_rho * 2.0
adjusted_cutoff_elements.append(element)

for element in set(adjusted_cutoff_elements):
msg = f'element {element} had invalid cutoff(s) which were modified to two times the maximum cutoff ' \
'value of the same stringency'
echo.echo_warning(msg)
zooks97 marked this conversation as resolved.
Show resolved Hide resolved

family.description = description
family.set_cutoffs(cutoffs, default_stringency=default_stringency)

Expand Down
8 changes: 4 additions & 4 deletions aiida_pseudo/groups/family/pseudo_dojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ class PseudoDojoFamily(RecommendedCutoffMixin, PseudoPotentialFamily):
PseudoDojoConfiguration('0.4', 'PBE', 'FR', 'stringent', 'psml'),
PseudoDojoConfiguration('0.4', 'PBEsol', 'FR', 'standard', 'psml'),
PseudoDojoConfiguration('0.4', 'PBEsol', 'FR', 'stringent', 'psml'),
# PseudoDojoConfiguration('1.0', 'PBE', 'SR', 'standard', 'jthxml'), # paw families have placeholder cutoffs
# PseudoDojoConfiguration('1.0', 'PBE', 'SR', 'stringent', 'jthxml'),
# PseudoDojoConfiguration('1.0', 'LDA', 'SR', 'standard', 'jthxml'),
# PseudoDojoConfiguration('1.0', 'LDA', 'SR', 'stringent', 'jthxml')
PseudoDojoConfiguration('1.0', 'PBE', 'SR', 'standard', 'jthxml'),
PseudoDojoConfiguration('1.0', 'PBE', 'SR', 'stringent', 'jthxml'),
PseudoDojoConfiguration('1.0', 'LDA', 'SR', 'standard', 'jthxml'),
PseudoDojoConfiguration('1.0', 'LDA', 'SR', 'stringent', 'jthxml')
)
# yapf: enable

Expand Down