Skip to content

Commit

Permalink
Merge pull request #2525 from jmmshn/main
Browse files Browse the repository at this point in the history
volumetric list -> array
  • Loading branch information
shyuep committed May 20, 2022
2 parents 1f1056c + c034c30 commit 30e36f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ v2022.5.17
----------
* PR #2518 from @JaGeo. Fixed wrong line in ICOHPLIST.lobster being read to assess whether orbitalwise interactions are included in these files.
* PR #2520 from @arosen93. Adds a new property to the `PointGroupAnalyzer`: the rotational symmetry number.
* PR #2522 from @jmmshn. Fixes PD JSON serialization.
* PR #2522 from @jmmshn. Fixes PD JSON serialization.
* PR #2514 from @qianchenqc. Replaced the IALGO tag with ALGO as recommended in the vasp documentation https://www.vasp.at/wiki/index.php/IALGO.
* PR #2404 from @nheinsdorf. Added a method that gets all the neighbors up a maximum distance for a Structure, and groups these 'bonds' according to their symmetry.
* PR #2404 from @nheinsdorf. Added a method that gets all the neighbors up a maximum distance for a Structure, and groups these 'bonds' according to their symmetry.
* PR #2509 from @jacksund Fix NMR Set.

v2022.4.26
Expand Down
8 changes: 5 additions & 3 deletions pymatgen/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3493,7 +3493,8 @@ def __init__(self, structure, data, distance_matrix=None, data_aug=None):
Args:
structure: Structure associated with the volumetric data
data: Actual volumetric data.
data: Actual volumetric data. If the data is provided as in list format,
it will be converted into an np.array automatically
data_aug: Any extra information associated with volumetric data
(typically augmentation charges)
distance_matrix: A pre-computed distance matrix if available.
Expand All @@ -3503,8 +3504,9 @@ def __init__(self, structure, data, distance_matrix=None, data_aug=None):
self.structure = structure
self.is_spin_polarized = len(data) >= 2
self.is_soc = len(data) >= 4
self.dim = data["total"].shape
self.data = data
# convert data to numpy arrays incase they were jsanitized as lists
self.data = {k: np.array(v) for k, v in data.items()}
self.dim = self.data["total"].shape
self.data_aug = data_aug if data_aug else {}
self.ngridpts = self.dim[0] * self.dim[1] * self.dim[2]
# lazy init the spin data since this is not always needed.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ beautifulsoup4==4.10.0
uncertainties==3.1.6
Cython==0.29.28
pybtex==0.24.0
tqdm==4.64.0
tqdm==4.64.0

0 comments on commit 30e36f6

Please sign in to comment.