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

ShakeNBreak v3.4 #81

Merged
merged 70 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
361fc63
Unzip `OUTCAR.gz` if present (and warn), for checking relaxation outputs
kavanase Aug 23, 2024
b054a54
Extend tests to `python=3.12`
kavanase Sep 10, 2024
3aef77c
Merge branch 'main' into develop
kavanase Sep 10, 2024
da9da38
Clean up paper list
kavanase Sep 22, 2024
d3662e7
Refactor plotting functions to reduce redundancy, and group together …
kavanase Sep 24, 2024
9b5d8ec
Update tests
kavanase Sep 24, 2024
123cb4c
Update all `snb-xxx` functions to auto detect if running in a defect …
kavanase Sep 24, 2024
c1605cb
Minor updates
kavanase Sep 24, 2024
b7d2c36
Minor updates
kavanase Sep 24, 2024
d04dfbe
Update comments
kavanase Oct 8, 2024
4933776
Minor updates to make some functions more robust with custom use, and…
kavanase Oct 9, 2024
6254faa
Update paper list
kavanase Oct 11, 2024
dcd4f1a
Use caching with structure matching to boost efficiency (>2x) with la…
kavanase Oct 11, 2024
a607542
Use efficient Voronoi analyzer from `doped` and update IO functions
kavanase Oct 11, 2024
3303661
Don't warn about unconverged structure if High_Energy folder present
kavanase Oct 11, 2024
9fc1e58
Update tests
kavanase Oct 11, 2024
a750d1a
Allow medium-level verbosity with default `verbose=None` (then high/l…
kavanase Oct 11, 2024
72b718d
Use more doped efficiency functions for fast structure matching
kavanase Oct 13, 2024
c0eaf3b
Add notes on `phonopy` installation issues with old `gcc`
kavanase Oct 14, 2024
267330d
Add note for people to please check previous GH Issues before asking …
kavanase Oct 19, 2024
abb1ad9
Add paper to list
kavanase Oct 19, 2024
d88b00f
Refactor `SnB_input_files`
kavanase Oct 20, 2024
702efb4
Add note to `incar.yaml`
kavanase Oct 20, 2024
080989d
Minor `snb-run` touchup
kavanase Oct 30, 2024
e3cce49
Use `doped` structure matching (~2 order of magnitude speed increase)
kavanase Nov 2, 2024
22f5521
Format `snb-run` info messages
kavanase Nov 3, 2024
36acd8f
Add paper to list
kavanase Dec 11, 2024
f4837a6
Update paper list
kavanase Dec 31, 2024
7aeb2f6
Update paper list
kavanase Jan 6, 2025
8c870e5
add "Dimer" to default distortion grid for vacancies and update input…
ireaml Jan 14, 2025
fa6ce5e
add verbose option to `apply_dimer_distortion`
ireaml Jan 14, 2025
c82be60
update type annotations for Tuple to be compatible with breaking chan…
ireaml Jan 14, 2025
f2a5e10
ignore tuple rule for ruff linting
ireaml Jan 14, 2025
4e25df5
fix annoying python 3.9 changes
ireaml Jan 14, 2025
56e2200
ignore linting rule "UP035"
ireaml Jan 14, 2025
e8c4239
to avoid issue with rule UP036
ireaml Jan 14, 2025
191bd12
replace + concatenator with unpacking operator for efficiency (RUF005)
ireaml Jan 14, 2025
10e009f
Merge remote-tracking branch 'origin/develop' into develop
kavanase Jan 14, 2025
8507eb4
Fix small typo
kavanase Jan 14, 2025
435302e
Use base python `tuple` class for typing
kavanase Jan 14, 2025
1666828
Minor updates from `CodeRabbit` suggestions
kavanase Jan 14, 2025
76d8a62
Update Cp2k file tests for latest `pymatgen`
kavanase Jan 17, 2025
58fae1e
Update Cp2k output energies for latest `pymatgen`
kavanase Jan 17, 2025
4a48383
Update paper list
kavanase Jan 17, 2025
f5f7c97
Update tests for new Dimer default
kavanase Jan 17, 2025
f1882c5
Update paper list
kavanase Jan 19, 2025
10c8d00
Update tests for Dimer
kavanase Jan 23, 2025
a2faff9
CHANGELOG rst formatting
kavanase Jan 24, 2025
56aac6e
`pre-commit` formatting
kavanase Jan 24, 2025
4c80375
Bump version number and changelog for release
kavanase Jan 24, 2025
75a35cb
Remove python=3.9 from linux tests
kavanase Jan 26, 2025
34e8a6b
CodeRabbit suggestions
kavanase Jan 26, 2025
40c06a4
Linting
kavanase Jan 26, 2025
25c42f7
Revert `test_input` debugging changes
kavanase Jan 26, 2025
a38ae2a
Correct type check
kavanase Jan 27, 2025
1f3eb14
Update paper list
kavanase Jan 28, 2025
bb4d36b
Ensure deterministic choice of NNs to distort (in cases of distance d…
kavanase Jan 30, 2025
c4b6793
Ensure deterministic choice of NNs to distort (in cases of distance d…
kavanase Jan 30, 2025
565dc4a
Add `test_distort_degenerate_case`
kavanase Jan 30, 2025
13ab0be
Update distortions tests
kavanase Jan 30, 2025
f12a255
Update input and analysis tests
kavanase Jan 30, 2025
cb26dea
Update handling of multiple `distorted_element`s
kavanase Jan 30, 2025
df845b1
Update Changelog
kavanase Jan 30, 2025
a862387
Update `test_input`
kavanase Jan 30, 2025
bbbde28
API docs formatting
kavanase Jan 30, 2025
7f08428
Add `_compare_dist_dicts` to avoid sensitivity to tiny Linux/MacOS ro…
kavanase Jan 30, 2025
1822e4d
Update test cleanup
kavanase Jan 30, 2025
3a62c33
Sort sites in Dimer generation for deterministic behaviour (irrespect…
kavanase Jan 30, 2025
53e1f41
More docstring formatting
kavanase Jan 30, 2025
78e9997
More docstring formatting
kavanase Jan 30, 2025
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
Prev Previous commit
Next Next commit
Minor updates
kavanase committed Sep 24, 2024
commit c1605cbaa87486868c79675af46aa5374383a2a3
13 changes: 6 additions & 7 deletions shakenbreak/plotting.py
Original file line number Diff line number Diff line change
@@ -762,9 +762,9 @@ def _format_legend(
else:
unique_labels[label] += (handle,)

# set handlelength to max length of unique_labels value, divided by 2 (so enough spacing for all
# set handlelength to max length of unique_labels value, divided by 1.5 (so enough spacing for all
# handles that are included in the legend):
handlelength = max(max(len(handle) for handle in unique_labels.values()) / 2, 1)
handlelength = max(max(len(handle) for handle in unique_labels.values()) / 1.5, 1)

# Prepare the legend entries, creating a handler_map excluding 'legend_label'
handler_map = {}
@@ -939,6 +939,8 @@ def plot_all_defects(
f"Energy lowering distortion found for {defect} with "
f"charge {'+' if charge > 0 else ''}{charge}. Generating distortion plot..."
)
num_nearest_neighbours = None
neighbour_atom = None
if distortion_metadata and isinstance(distortion_metadata, list):
# try load directly from defect folder first:
with contextlib.suppress(FileNotFoundError):
@@ -962,9 +964,6 @@ def plot_all_defects(
num_nearest_neighbours, neighbour_atom = _parse_distortion_metadata(
distortion_metadata, defect, charge
)
elif distortion_metadata is None:
num_nearest_neighbours = None
neighbour_atom = None

defects_to_plot[defect_species] = {
"energies_dict": energies_dict,
@@ -1300,7 +1299,7 @@ def _get_color_from_colormap(disp, colormap=None, norm=None, default=colors[0]):
path_col = ax.scatter(
0.0,
energies_dict["distortions"][special_entry],
c=_get_color_from_colormap(disp_dict.get(special_entry, colors[0]), colormap, norm),
color=_get_color_from_colormap(disp_dict.get(special_entry, colors[0]), colormap, norm),
label=special_entry,
s=50,
marker=style_settings.get("marker", "s" if special_entry == "Dimer" else "o"),
@@ -1374,7 +1373,7 @@ def _get_color_from_colormap(disp, colormap=None, norm=None, default=colors[0]):
ax.scatter( # distortions from other charge states
np.array(keys)[i],
sorted_energies[sorted_i],
c=(colors * 100)[ # repeat colours in case many imported charge states
color=(colors * 100)[ # repeat colours in case many imported charge states
j + 1
], # different colors for different imported charge states, if only one dataset
edgecolors="k",
Binary file modified tests/data/remote_baseline_plots/as_2_O_on_I_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.