-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HubbardStructureData
: add compatibility for <3D structures
The `HubbardStructureData.append_hubbard_parameter()` method currently fails for structures that don't have 3-dimensional periodic boundary conditions. This is caused by a restriction in the StructureData.get_pymatgen_structure()` method, which raises a `ValueError` if the periodic boundary conditions are not (True, True, True). This has been fixed in a recent commit on `aiida-core`: aiidateam/aiida-core@adcce4b But this will take some time to be released and would restrict our compatibility to `aiida-core>=2.6.0`. Here we directly construct a list of `PeriodicSite` objects from the `sites` list of the object obtained from `StructureData.get_pymatgen()`, which can be both either a pymatgen `Structure` or `Molecule`, depending on the dimensionality of the structure. Co-authored-by: AndresOrtegaGuerrero <[email protected]>
- Loading branch information
1 parent
2aae0e6
commit 72741f6
Showing
6 changed files
with
55 additions
and
5 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
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
9 changes: 9 additions & 0 deletions
9
...data/test_hubbard_structure/test_append_hubbard_parameters_parameters0_2D_xy_arsenic_.yml
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,9 @@ | ||
- - 0 | ||
- 1s | ||
- 0 | ||
- 1s | ||
- 5.0 | ||
- - 0 | ||
- 0 | ||
- 0 | ||
- Ueff |
9 changes: 9 additions & 0 deletions
9
...data/test_hubbard_structure/test_append_hubbard_parameters_parameters1_2D_xy_arsenic_.yml
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,9 @@ | ||
- - 0 | ||
- 1s | ||
- 1 | ||
- 1s | ||
- 5.0 | ||
- - 0 | ||
- 0 | ||
- 0 | ||
- V |
9 changes: 9 additions & 0 deletions
9
...data/test_hubbard_structure/test_append_hubbard_parameters_parameters2_2D_xy_arsenic_.yml
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,9 @@ | ||
- - 0 | ||
- 1s | ||
- 0 | ||
- 1s | ||
- 5.0 | ||
- - 0 | ||
- 0 | ||
- 0 | ||
- Ueff |
18 changes: 18 additions & 0 deletions
18
...data/test_hubbard_structure/test_append_hubbard_parameters_parameters3_2D_xy_arsenic_.yml
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,18 @@ | ||
- - 0 | ||
- 1s | ||
- 0 | ||
- 1s | ||
- 5.0 | ||
- - 0 | ||
- 0 | ||
- 0 | ||
- Ueff | ||
- - 0 | ||
- 1s | ||
- 1 | ||
- 1s | ||
- 5.0 | ||
- - 0 | ||
- 1 | ||
- 0 | ||
- V |