-
Notifications
You must be signed in to change notification settings - Fork 875
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add capability for Vasprun to read KPOINTS_OPT data (#3509)
* Add KPOINTS_OPT reading functionality to Vasprun Allow reading in KPOINTS_OPT data from vasprun.xml. Also get band structure from KPOINTS_OPT data, if requested. (May change that to the default behaviour.) I've tested it separately, but still need to test integration into the pymatgen code, once I get a working development build of pymatgen. * Update docstrings, fix names in Vasprun projected_magnetism_kpoints_opt -> projected_magnetisation_kpoints_opt * Test case for Vasprun kpoints_opt From issue #3455 , dataset supplied by Jeff-oakly #3455 (comment) Although, for some reason, even though LORBIT = 11, vasprun.xml doesn't have projected eigenvalues for kpoints_opt. Wierd. * Bandstructure test for kpoints_opt vasprun.xml * Ran my own calculation, so have projected data It was with VASP 6.4 rather than 6.3, if that makes a difference. And more CPUs so it snuck in more bands, which slightly changed some energy. * Unittest for projected kpoints_opt * Change use_kpoints_opt to be default behaviour if KPOINTS_OPT data is present. * Update borg test to account for new test documents * Rename new test file directory to kpoints_opt Prior name was not descriptive of the tests being done. * pre-commit auto-fixes * Code linting from ruff (whitespace, line length) * Support for KPOINTS_OPT in BSVasprun * as_dict now reads KPOINTS_OPT parameters in both Vasprun and BSVasprun * tweak Vasprun Attributes: doc str improve test err message on bad vbm/cbm kpoint labels * Replace vasprun.xml for kpoints_opt with smaller file * refactor get_band_structure tweak var names * Explanatory comment on parser restructure #3509 * Stick all KPOINTS_OPT properties in a container Now they're referenced as attributes of that container (kpoints_opt_properties) rather than being top-level quantities in Vasprun. * rename _ElectronicPropertiesContainer to KpointOptProps and turn into dataclass which have 1st class MSONable support * rename Vasprun.kpoints_opt_properties to kpoint_opt_props * fix typo kpoint_opt_props -> kpoints_opt_props * fix mypy --------- Signed-off-by: Bernard Field <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Janosh Riebesell <[email protected]>
- Loading branch information
1 parent
f6b8236
commit 53141c1
Showing
7 changed files
with
475 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ | |
|
||
__author__ = "Shyue Ping Ong" | ||
__copyright__ = "Copyright 2012, The Materials Project" | ||
__version__ = "0.1" | ||
__maintainer__ = "Shyue Ping Ong" | ||
__email__ = "[email protected]" | ||
__date__ = "Mar 18, 2012" | ||
|
||
|
||
|
@@ -22,7 +19,7 @@ def test_get_data(self): | |
drone = VaspToComputedEntryDrone() | ||
self.queen = BorgQueen(drone, TEST_FILES_DIR, 1) | ||
data = self.queen.get_data() | ||
assert len(data) == 15 | ||
assert len(data) == 16 | ||
|
||
def test_load_data(self): | ||
drone = VaspToComputedEntryDrone() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Fully automatic kpoint scheme | ||
0 | ||
Automatic | ||
25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Line_mode KPOINTS file | ||
10 | ||
Line_mode | ||
Reciprocal | ||
0.0 0.0 0.0 ! \Gamma | ||
0.5 0.0 0.5 ! X | ||
|
||
0.5 0.0 0.5 ! X | ||
0.5 0.25 0.75 ! W | ||
|
||
0.5 0.25 0.75 ! W | ||
0.375 0.375 0.75 ! K | ||
|
||
0.375 0.375 0.75 ! K | ||
0.0 0.0 0.0 ! \Gamma | ||
|
||
0.0 0.0 0.0 ! \Gamma | ||
0.5 0.5 0.5 ! L | ||
|
||
0.5 0.5 0.5 ! L | ||
0.625 0.25 0.625 ! U | ||
|
||
0.625 0.25 0.625 ! U | ||
0.5 0.25 0.75 ! W | ||
|
||
0.5 0.25 0.75 ! W | ||
0.5 0.5 0.5 ! L | ||
|
||
0.5 0.5 0.5 ! L | ||
0.375 0.375 0.75 ! K | ||
|
||
0.625 0.25 0.625 ! U | ||
0.5 0.0 0.5 ! X |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters