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

Allow prv_dir to be used more in defect wf #585

Merged
merged 11 commits into from
Nov 6, 2023

Conversation

jmmshn
Copy link
Contributor

@jmmshn jmmshn commented Oct 20, 2023

Completing Allow Previous Bulk Calculations Features

Old code:

  • The parsing of the locpot and entry data from an existing bulk SC calculation was not implemented
  • The parsing of locpot was not code-independent since the code to get it from the task document still assumes the Vasp format

This PR fixes those issues and adds testing for restarting from existing bulk SC calculation (which is the optimal way to run many defects based on the same bulk SC)

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Merging #585 (227721e) into main (7c2d2b1) will decrease coverage by 0.03%.
Report is 2 commits behind head on main.
The diff coverage is 71.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
- Coverage   75.53%   75.51%   -0.03%     
==========================================
  Files          83       83              
  Lines        6790     6792       +2     
  Branches     1002     1002              
==========================================
  Hits         5129     5129              
- Misses       1349     1352       +3     
+ Partials      312      311       -1     
Files Coverage Δ
src/atomate2/vasp/flows/defect.py 83.58% <85.71%> (+6.11%) ⬆️
src/atomate2/common/flows/defect.py 87.01% <60.00%> (+5.43%) ⬆️
src/atomate2/common/jobs/defect.py 81.67% <66.66%> (+0.72%) ⬆️

... and 1 file with indirect coverage changes

@@ -348,8 +350,8 @@ def make(
)

@abstractmethod
def structure_from_prv(self, previous_dir: str) -> Structure:
"""Copy the output structure from previous directory.
def sc_entry_and_locpot_from_prv(self, previous_dir: str) -> Structure:
Copy link
Contributor

@Zhuoying Zhuoying Oct 27, 2023

Choose a reason for hiding this comment

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

The returned object here should be ComputedStructureEntry and Locpot as docstring indicates, no longer Structure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct

@Zhuoying Zhuoying merged commit e6a58e9 into materialsproject:main Nov 6, 2023
6 of 7 checks passed
@utf utf added the enhancement Improvements to existing features label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants