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

Plotting of Multicenter COBIs #2926

Merged
merged 45 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e879ef9
implementation to plot multicenter cobis
JaGeo Mar 31, 2023
c0041f4
pre-commit auto-fixes
pre-commit-ci[bot] Mar 31, 2023
24c3089
Merge branch 'materialsproject:master' into multi_center_COBICAR
JaGeo Apr 3, 2023
5556995
Merge branch 'materialsproject:master' into multi_center_COBICAR
JaGeo May 8, 2023
367e8f8
merge
JaGeo May 8, 2023
3074686
Merge branch 'master' of github.com:JaGeo/pymatgen into multi_center_…
JaGeo May 8, 2023
482fa13
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo May 8, 2023
0803936
Fix
JaGeo May 16, 2023
4da048a
Fix merge conflict
JaGeo May 16, 2023
86c32f7
pre-commit auto-fixes
pre-commit-ci[bot] May 16, 2023
9565d7d
Fix merge conflicts
JaGeo Mar 13, 2024
e5c4970
pre-commit auto-fixes
pre-commit-ci[bot] Mar 13, 2024
82aa50f
Fix linting
JaGeo Mar 13, 2024
04fb855
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo Mar 13, 2024
7c87756
Fix linting
JaGeo Mar 13, 2024
180ee9a
Fix linting
JaGeo Mar 13, 2024
5f53eb4
Fix linting
JaGeo Mar 13, 2024
3c0a345
Fix bond labels
JaGeo Mar 14, 2024
ae69cb1
pre-commit auto-fixes
pre-commit-ci[bot] Mar 14, 2024
5453462
Update json file
JaGeo Mar 14, 2024
b9d94c2
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo Mar 14, 2024
fd0a324
pre-commit auto-fixes
pre-commit-ci[bot] Mar 14, 2024
e84b2b2
Remove spelling error
JaGeo Mar 14, 2024
7f20d58
Fix failing as_dict test
JaGeo Mar 14, 2024
ae8d801
pre-commit auto-fixes
pre-commit-ci[bot] Mar 14, 2024
2ed19c8
Add more tests
JaGeo Mar 14, 2024
cea22dc
pre-commit auto-fixes
pre-commit-ci[bot] Mar 14, 2024
ea176f0
add tests
JaGeo Mar 15, 2024
3c2f5db
add tests
JaGeo Mar 15, 2024
a8ccd22
fix merge
JaGeo Mar 15, 2024
aa0415f
pre-commit auto-fixes
pre-commit-ci[bot] Mar 15, 2024
f783569
fix merge conflicts
JaGeo Mar 16, 2024
f8a24e7
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo Mar 16, 2024
fab8b83
pre-commit auto-fixes
pre-commit-ci[bot] Mar 16, 2024
c1131cf
Fix and test average
JaGeo Mar 16, 2024
b793e7b
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo Mar 16, 2024
8ba38e6
clean up files
JaGeo Mar 16, 2024
6dacd90
pre-commit auto-fixes
pre-commit-ci[bot] Mar 16, 2024
641b4c1
fix plotter text
JaGeo Mar 16, 2024
a5914a3
Merge branch 'multi_center_COBICAR' of github.com:JaGeo/pymatgen into…
JaGeo Mar 16, 2024
883dac6
Merge branch 'master' into multi_center_COBICAR
JaGeo Mar 16, 2024
25c70bb
remove untested average
JaGeo Mar 16, 2024
b7fea94
fix VolumetricData init data type anno
janosh Mar 16, 2024
5fae051
rename multicenter_cobis to multi_center_cobis
janosh Mar 16, 2024
edc8dca
move IcohpCollection out of for loop
janosh Mar 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 143 additions & 56 deletions pymatgen/electronic_structure/cohp.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pymatgen/electronic_structure/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3593,7 +3593,7 @@ def __init__(self, zero_at_efermi=True, are_coops=False, are_cobis=False) -> Non
energy at the Fermi level. Defaults to True.
are_coops: Switch to indicate that these are COOPs, not COHPs.
Defaults to False for COHPs.
are_cobis: Switch to indicate that these are COBIs, not COHPs/COOPs.
are_cobis: Switch to indicate that these are COBIs or multi-center COBIs, not COHPs/COOPs.
Defaults to False for COHPs.
"""
self.zero_at_efermi = zero_at_efermi
Expand Down
11 changes: 7 additions & 4 deletions pymatgen/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ class VolumetricData(MSONable):
"""

def __init__(
self, structure: Structure, data: np.ndarray, distance_matrix: np.ndarray = None, data_aug: np.ndarray = None
self,
structure: Structure,
data: dict[str, np.ndarray],
distance_matrix: np.ndarray | None = None,
data_aug: np.ndarray | None = None,
) -> None:
"""
Typically, this constructor is not used directly and the static
Expand All @@ -43,8 +47,7 @@ def __init__(

Args:
structure (Structure): associated with the volumetric data
data (np.array): Actual volumetric data. If the data is provided as in list format,
it will be converted into an np.array automatically
data (dict[str, np.array]): Actual volumetric data.
distance_matrix (np.array): A pre-computed distance matrix if available.
Useful so pass distance_matrices between sums,
short-circuiting an otherwise expensive operation.
Expand All @@ -61,7 +64,7 @@ def __init__(
self.ngridpts = self.dim[0] * self.dim[1] * self.dim[2]
# lazy init the spin data since this is not always needed.
self._spin_data: dict[Spin, float] = {}
self._distance_matrix = distance_matrix if distance_matrix else {}
self._distance_matrix = distance_matrix or {}
self.xpoints = np.linspace(0.0, 1.0, num=self.dim[0])
self.ypoints = np.linspace(0.0, 1.0, num=self.dim[1])
self.zpoints = np.linspace(0.0, 1.0, num=self.dim[2])
Expand Down
Loading