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 mag_density to VASP output doc #65

Merged
merged 3 commits into from
Jan 31, 2022
Merged

Add mag_density to VASP output doc #65

merged 3 commits into from
Jan 31, 2022

Conversation

Andrew-S-Rosen
Copy link
Member

@Andrew-S-Rosen Andrew-S-Rosen commented Jan 30, 2022

This PR adds a mag_density attribute to the VASP CalculationOutput document. This can sometimes be more useful to query by than total_mag because the former is invariant to the # of unit cells.

@codecov-commenter
Copy link

Codecov Report

Merging #65 (4cc7448) into main (fe5d8a6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #65   +/-   ##
=======================================
  Coverage   70.39%   70.40%           
=======================================
  Files          45       45           
  Lines        3804     3811    +7     
  Branches      576      576           
=======================================
+ Hits         2678     2683    +5     
- Misses        979      981    +2     
  Partials      147      147           
Impacted Files Coverage Δ
src/atomate2/vasp/schemas/calculation.py 83.85% <100.00%> (+0.12%) ⬆️
src/atomate2/utils/path.py 88.23% <0.00%> (-11.77%) ⬇️
src/atomate2/vasp/flows/core.py 93.91% <0.00%> (+0.27%) ⬆️

@Andrew-S-Rosen
Copy link
Member Author

Andrew-S-Rosen commented Jan 30, 2022

I just need to point the test to atomate2/tests/test_data/vasp/magnetic_run/ so that I can read the proper vasprun.xml.gz and OUTCAR.gz. I'm not sure the ideal way to do that given the current way Atomate2 is set up.

@utf
Copy link
Member

utf commented Jan 31, 2022

You can just do:

def my_test(vasp_test_dir):
    dir_name = vasp_test_dir / "magnetic_run"

As vasp_test_dir is a pytest fixture which defines the root directory of the vasp test data.

@Andrew-S-Rosen
Copy link
Member Author

Thanks! That was easy!

@utf
Copy link
Member

utf commented Jan 31, 2022

Is this still a WIP?

@Andrew-S-Rosen Andrew-S-Rosen changed the title [WIP] Add mag_density to VASP output doc Add mag_density to VASP output doc Jan 31, 2022
@Andrew-S-Rosen
Copy link
Member Author

Thanks for asking! Nope. My bad!

@utf
Copy link
Member

utf commented Jan 31, 2022

Great thanks very much!

@utf utf merged commit eaa83e2 into materialsproject:main Jan 31, 2022
@Andrew-S-Rosen Andrew-S-Rosen deleted the rosen-outcar branch January 31, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants