url
stringlengths
63
66
repository_url
stringclasses
1 value
labels_url
stringlengths
77
80
comments_url
stringlengths
72
75
events_url
stringlengths
70
73
html_url
stringlengths
52
56
id
int64
3.39M
3.04B
node_id
stringlengths
18
32
number
int64
1
4.39k
title
stringlengths
3
367
user
dict
labels
listlengths
0
5
state
stringclasses
2 values
locked
bool
2 classes
assignee
dict
assignees
listlengths
0
2
milestone
null
comments
listlengths
0
30
created_at
timestamp[s]date
2012-02-26 12:10:46
2025-05-02 18:11:41
updated_at
timestamp[s]date
2012-02-26 14:52:41
2025-05-02 18:16:27
closed_at
stringlengths
0
20
author_association
stringclasses
3 values
type
stringclasses
1 value
active_lock_reason
stringclasses
2 values
sub_issues_summary
dict
body
stringlengths
0
119k
closed_by
dict
reactions
dict
timeline_url
stringlengths
72
75
performed_via_github_app
null
state_reason
stringclasses
4 values
is_pull_request
bool
2 classes
draft
bool
2 classes
pull_request
dict
https://api.github.com/repos/materialsproject/pymatgen/issues/4207
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4207/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4207/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4207/events
https://github.com/materialsproject/pymatgen/issues/4207
2,704,252,122
I_kwDOACgets6hL5za
4,207
`test_symmetry_ops` for `TestMagneticSpaceGroup` of `symmetry.maggroups` is failing
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-11-29T07:44:37
2025-01-28T17:41:19
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
After fixing `assert_str_content_equal` implementations in #4205, noticed the following test for `TestMagneticSpaceGroup` of `symmetry.maggroups` is failing. cc @mkhorton `>>> pytest tests/symmetry/test_maggroups.py::TestMagneticSpaceGroup::test_symmetry_ops` ``` E AssertionError: Strings are not equal (whitespaces ignored): E ===================== Actual ===================== E x, y, z, +1 E -x+3/4, -y+3/4, z, +1 E -x, -y, -z, +1 E x+1/4, y+1/4, -z, +1 E x, -y+3/4, -z+3/4, -1 E -x+3/4, y, -z+3/4, -1 E -x, y+1/4, z+1/4, -1 E x+1/4, -y, z+1/4, -1 E x, y+1/2, z+1/2, +1 E -x+3/4, -y+1/4, z+1/2, +1 E -x, -y+1/2, -z+1/2, +1 E x+1/4, y+3/4, -z+1/2, +1 E x, -y+1/4, -z+1/4, -1 E -x+3/4, y+1/2, -z+1/4, -1 E -x, y+3/4, z+3/4, -1 E x+1/4, -y+1/2, z+3/4, -1 E x+1/2, y, z+1/2, +1 E -x+1/4, -y+3/4, z+1/2, +1 E -x+1/2, -y, -z+1/2, +1 E x+3/4, y+1/4, -z+1/2, +1 E x+1/2, -y+3/4, -z+1/4, -1 E -x+1/4, y, -z+1/4, -1 E -x+1/2, y+1/4, z+3/4, -1 E x+3/4, -y, z+3/4, -1 E x+1/2, y+1/2, z, +1 E -x+1/4, -y+1/4, z, +1 E -x+1/2, -y+1/2, -z, +1 E x+3/4, y+3/4, -z, +1 E x+1/2, -y+1/4, -z+3/4, -1 E -x+1/4, y+1/2, -z+3/4, -1 E -x+1/2, y+3/4, z+1/4, -1 E x+3/4, -y+1/2, z+1/4, -1 E ==================== Expected ==================== E x, y, z, +1 E -x+3/4, -y+3/4, z, +1 E -x, -y, -z, +1 E x+1/4, y+1/4, -z, +1 E x, -y+3/4, -z+3/4, -1 E -x+3/4, y, -z+3/4, -1 E -x, y+1/4, z+1/4, -1 E x+1/4, -y, z+1/4, -1 E x, y+1/2, z+1/2, +1 E -x+3/4, -y+5/4, z+1/2, +1 E -x, -y+1/2, -z+1/2, +1 E x+1/4, y+3/4, -z+1/2, +1 E x, -y+5/4, -z+5/4, -1 E -x+3/4, y+1/2, -z+5/4, -1 E -x, y+3/4, z+3/4, -1 E x+1/4, -y+1/2, z+3/4, -1 E x+1/2, y, z+1/2, +1 E -x+5/4, -y+3/4, z+1/2, +1 E -x+1/2, -y, -z+1/2, +1 E x+3/4, y+1/4, -z+1/2, +1 E x+1/2, -y+3/4, -z+5/4, -1 E -x+5/4, y, -z+5/4, -1 E -x+1/2, y+1/4, z+3/4, -1 E x+3/4, -y, z+3/4, -1 E x+1/2, y+1/2, z, +1 E -x+5/4, -y+5/4, z, +1 E -x+1/2, -y+1/2, -z, +1 E x+3/4, y+3/4, -z, +1 E x+1/2, -y+5/4, -z+3/4, -1 E -x+5/4, y+1/2, -z+3/4, -1 E -x+1/2, y+3/4, z+1/4, -1 E x+3/4, -y+1/2, z+1/4, -1 ```
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4207/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4207/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4208
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4208/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4208/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4208/events
https://github.com/materialsproject/pymatgen/issues/4208
2,704,550,785
I_kwDOACgets6hNCuB
4,208
reduced_composition not on par with doc_string
{ "login": "msiron-entalpic", "id": 182507809, "node_id": "U_kgDOCuDZIQ", "avatar_url": "https://avatars.githubusercontent.com/u/182507809?v=4", "gravatar_id": "", "url": "https://api.github.com/users/msiron-entalpic", "html_url": "https://github.com/msiron-entalpic", "followers_url": "https://api.github.com/users/msiron-entalpic/followers", "following_url": "https://api.github.com/users/msiron-entalpic/following{/other_user}", "gists_url": "https://api.github.com/users/msiron-entalpic/gists{/gist_id}", "starred_url": "https://api.github.com/users/msiron-entalpic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/msiron-entalpic/subscriptions", "organizations_url": "https://api.github.com/users/msiron-entalpic/orgs", "repos_url": "https://api.github.com/users/msiron-entalpic/repos", "events_url": "https://api.github.com/users/msiron-entalpic/events{/privacy}", "received_events_url": "https://api.github.com/users/msiron-entalpic/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for reporting this and for providing the code snippet.\n\nI believe this is intended to \"not completely\" reduce some peroxides (Cs<sub>2</sub>O<sub>2</sub> in this case to CsO):\nhttps://github.com/materialsproject/pymatgen/blob/296a0ec856b22da847b2ccd0e55e146e071cb8fd/src/pymatgen/core/composition.py#L121-L135" ]
2024-11-29T09:38:27
2025-01-27T08:49:43
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.11 ### Pymatgen version '2024.11.13' ### Operating system version MacOSX ### Current behavior From the docstring for reduced_composition: ``` @property def reduced_composition(self) -> Self: """The reduced composition, i.e. amounts normalized by greatest common denominator. E.g. "Fe4 P4 O16".reduced_composition = "Fe P O4". """ ``` I would expect to do just that, but `Cs4 O4` turns into `Cs2 O2` rather than `Cs O`. Unsure if its because some single element, for example: `Composition("O").reduced_composition # O2` ### Expected Behavior I would expect that `Cs4 O4` turns into `Cs O` rather than `Cs2 O2`. Unsure if its because some single element, for example: `Composition("O").reduced_composition # O2` ### Minimal example ```Python from pymatgen.core import Composition comp = Composition('Cs4 O4') print(comp.reduced_composition) # prints out Cs2 O2, should be Cs O per doc string? ``` ### Relevant files to reproduce this bug _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4208/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4208/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4209
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4209/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4209/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4209/events
https://github.com/materialsproject/pymatgen/pull/4209
2,706,613,692
PR_kwDOACgets6DnaAx
4,209
Schedule `PymatgenTest` for migration from `unittest` to `pytest`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I would reopen this after #4212 is reviewed/merged as I opened too many PRs for me to track" ]
2024-11-30T04:31:44
2025-03-28T18:57:27
2024-12-01T12:44:56Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Avoid catching all warnings, add a message filter, and clean up [assert no warning tests](https://docs.pytest.org/en/stable/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests) with warnings filter ### Schedule `PymatgenTest` for migration after a grace period - [x] We cannot migrate `PymatgenTest` directly as it's public and [quite some external code use `PymatgenTest`](https://github.com/search?q=%22%28PymatgenTest%29%3A%22&type=code), added a grace period **until 2026-01-01** and let downstream code finish their migration first (**get rid of some unittest-specific functions**), as [`pytest` is not compatible with some `unittest` functions](https://docs.pytest.org/en/stable/how-to/unittest.html#pytest-features-in-unittest-testcase-subclasses) - [ ] **OR, do we want to deprecated `PymatgenTest` with a more general `MatSciTest` (or some other name) as it's intended to be used by other packages?** - [x] Issue migration warning, and test methods specific to `TestCase` such that we know potential side effect, also provide a migration guide (not really our job, but at least provide links to some resources), [`ruff` does have rules](https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt) (for example [PT009](https://docs.astral.sh/ruff/rules/pytest-unittest-assertion/)) but we cannot trust this as not every project enables `ruff` --- ### Super brief migration guide - Setup/teardown methods (`setUp`, `setUpClass`, `tearDown`, `tearDownClass`): 1. [Recommended by `pytest`: Use `fixtures`](https://docs.pytest.org/en/stable/reference/fixtures.html#fixture) OR 2. Use `pytest`'s [xUnit-style setup/teardown](https://docs.pytest.org/en/stable/how-to/xunit_setup.html): `[setup/teardown]_[class/method/function]`. - Assertion methods (`assertTrue`, `assertFalse`, `assertEqual`, etc.): Replace with direct Python `assert` statements.
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4209/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4209/timeline
null
true
true
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4209", "html_url": "https://github.com/materialsproject/pymatgen/pull/4209", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4209.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4209.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4210
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4210/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4210/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4210/events
https://github.com/materialsproject/pymatgen/pull/4210
2,707,298,890
PR_kwDOACgets6DoK6s
4,210
Fix `uv pip install` from binary distribution (wheels) usage
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-11-30T12:48:34
2024-12-11T02:30:02
2024-12-11T02:01:24Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix `uv pip install` from binary distribution (wheels) usage, https://github.com/astral-sh/uv/issues/8155#issuecomment-2506014815 - Use `uv` to build wheel, https://docs.astral.sh/uv/guides/integration/github/ - [**REVERTED**] Test `mcsqs` install in 3f63f4b341674e31d597506de4e6a64de4ed5ea3, it's way too slow ~90 s
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4210/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4210/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4210", "html_url": "https://github.com/materialsproject/pymatgen/pull/4210", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4210.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4210.patch", "merged_at": "2024-12-11T02:01:24Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4211
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4211/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4211/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4211/events
https://github.com/materialsproject/pymatgen/issues/4211
2,708,349,775
I_kwDOACgets6hbiNP
4,211
Monthly issue metrics report
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-01T02:39:14
2024-12-01T02:39:14
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
# Issue Metrics | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | | Time to first response | 5:27:04 | 3:28:18 | 11:47:08 | | Time to close | 4 days, 17:52:25 | 4 days, 17:52:25 | 6 days, 18:39:27 | | Time to answer | None | None | None | | Metric | Count | | --- | ---: | | Number of items that remain open | 18 | | Number of items closed | 2 | | Number of most active mentors | 0 | | Total number of items created | 20 | | Title | URL | Author | Time to first response | Time to close | Time to answer | | --- | --- | --- | --- | --- | --- | | reduced_composition not on par with doc_string | https://github.com/materialsproject/pymatgen/issues/4208 | [msiron-entalpic](https://github.com/msiron-entalpic) | None | None | None | | `test_symmetry_ops` for `TestMagneticSpaceGroup` of `symmetry.maggroups` is failing | https://github.com/materialsproject/pymatgen/issues/4207 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | `test_str` and `test_mul` for `TestStructureGraph` of `analysis.graphs` are failing | https://github.com/materialsproject/pymatgen/issues/4206 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | Bugs in Composition().__ge__() method | https://github.com/materialsproject/pymatgen/issues/4204 | [txy159](https://github.com/txy159) | 1:26:16 | None | None | | [Dev/Test] Migrate `PymatgenTest` from `unittest.TestCase` to `pytest` | https://github.com/materialsproject/pymatgen/issues/4202 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | Parsing Failure of vasprun.xml from MD Simulations Using MLFF | https://github.com/materialsproject/pymatgen/issues/4200 | [yutoml](https://github.com/yutoml) | None | None | None | | Structure.merge_sites fails when selective_dynamics is property present | https://github.com/materialsproject/pymatgen/issues/4197 | [yantar92](https://github.com/yantar92) | 1:45:10 | None | None | | Poscar.get_str() cartesian vs direct coords | https://github.com/materialsproject/pymatgen/issues/4188 | [Mikluki](https://github.com/Mikluki) | 0:36:25 | None | None | | CP2K input set creation (error with basis set/potential finding for given structure) | https://github.com/materialsproject/pymatgen/issues/4186 | [msiron-entalpic](https://github.com/msiron-entalpic) | None | None | None | | Timeout in MagneticStructureEnumerator (and EnumlibAdaptor) does not work | https://github.com/materialsproject/pymatgen/issues/4185 | [fraricci](https://github.com/fraricci) | None | None | None | | Default values replace the custom input ones in MagneticStructureEnumerator | https://github.com/materialsproject/pymatgen/issues/4184 | [fraricci](https://github.com/fraricci) | None | None | None | | The inappropriate warnning info for `update_user_incar_settings`. | https://github.com/materialsproject/pymatgen/issues/4179 | [hongyi-zhao](https://github.com/hongyi-zhao) | 8:49:24 | 2 days, 4:53:38 | None | | What's the correct way to use the `MAGMOM`'s value when using MP API data? | https://github.com/materialsproject/pymatgen/issues/4173 | [hongyi-zhao](https://github.com/hongyi-zhao) | None | None | None | | 10 tests error out because they fail to find some files | https://github.com/materialsproject/pymatgen/issues/4172 | [yurivict](https://github.com/yurivict) | 5:11:26 | None | None | | [BUG] Incorrect usage of `np.all() > tol` for element-wise value comparison | https://github.com/materialsproject/pymatgen/issues/4166 | [DanielYang59](https://github.com/DanielYang59) | 0:09:53 | 7 days, 6:51:12 | None | | [BUG] Missing `()` in `electronic_structure.boltztrap.BoltztrapAnalyzer.get_extreme.is_isotropic` | https://github.com/materialsproject/pymatgen/issues/4165 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | A few functions use unrounded `float` as `dict` keys | https://github.com/materialsproject/pymatgen/issues/4162 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | coordination_geometry int64 indices breaks on 32-bit systems | https://github.com/materialsproject/pymatgen/issues/4161 | [drew-parsons](https://github.com/drew-parsons) | 10:14:21 | None | None | | tests use equality to compare floating point numbers | https://github.com/materialsproject/pymatgen/issues/4158 | [drew-parsons](https://github.com/drew-parsons) | 15:23:36 | None | None | | Monthly issue metrics report | https://github.com/materialsproject/pymatgen/issues/4149 | [github-actions[bot]](https://github.com/github-actions[bot]) | None | None | None | _This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_ Search query used to find these items: `repo:materialsproject/pymatgen is:issue created:2024-11-01..2024-11-30 -reason:"not planned"`
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4211/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4211/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4212
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4212/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4212/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4212/events
https://github.com/materialsproject/pymatgen/pull/4212
2,709,115,796
PR_kwDOACgets6DqS9T
4,212
Deprecate `PymatgenTest`, migrate tests to `pytest` from `unittest`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "There seems to be conflicts that need to be adjusted.", "Fixed, thanks for reviewing. Looks like COD might be temporarily down thus the failure ", "@shyuep Can you maybe review this? Merge conflicts solved. Thanks.", "Thanks" ]
2024-12-01T12:32:05
2025-04-17T14:45:56
2025-04-17T14:43:53Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Migrate `pymatgen` tests to `pytest`, to close #4202 - [x] `conftest.py` doesn't seem to be used at all - [x] Add tests for legacy `PymatgenTest` to avoid accidental breakage > [!WARNING] > - [**NEED CONFIRM**] Deprecate `PymatgenTest` with `MatSciTest`, set **deadline at 2026-01-01** --- #### `setUp` -> `setup_method` even when not inheriting from `TestCase` Test classes that doesn't subclass `TestCase` and define `setUp` method would work in `pytest`, but [it's not a native support](https://docs.pytest.org/en/stable/deprecations.html), so I would still migrate them here: > One thing that might catch users by surprise is that plain setup and teardown methods are not pytest native, they are in fact part of the nose support. > Native pytest support uses setup_method and teardown_method (see [Method and function level setup/teardown](https://docs.pytest.org/en/stable/how-to/xunit_setup.html#xunit-method-setup)), so the above should be changed to:
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4212/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4212/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4212", "html_url": "https://github.com/materialsproject/pymatgen/pull/4212", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4212.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4212.patch", "merged_at": "2025-04-17T14:43:53Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4213
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4213/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4213/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4213/events
https://github.com/materialsproject/pymatgen/pull/4213
2,713,379,350
PR_kwDOACgets6DzgKr
4,213
pre-commit autoupdate
{ "login": "pre-commit-ci[bot]", "id": 66853113, "node_id": "MDM6Qm90NjY4NTMxMTM=", "avatar_url": "https://avatars.githubusercontent.com/in/68672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D", "html_url": "https://github.com/apps/pre-commit-ci", "followers_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/followers", "following_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/repos", "events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-02T21:02:07
2024-12-11T01:52:18
2024-12-11T01:52:16Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1) - [github.com/MarcoGorelli/cython-lint: v0.16.2 → v0.16.6](https://github.com/MarcoGorelli/cython-lint/compare/v0.16.2...v0.16.6) - [github.com/igorshubovych/markdownlint-cli: v0.42.0 → v0.43.0](https://github.com/igorshubovych/markdownlint-cli/compare/v0.42.0...v0.43.0) - [github.com/kynan/nbstripout: 0.8.0 → 0.8.1](https://github.com/kynan/nbstripout/compare/0.8.0...0.8.1) - [github.com/RobertCraigie/pyright-python: v1.1.387 → v1.1.389](https://github.com/RobertCraigie/pyright-python/compare/v1.1.387...v1.1.389) <!--pre-commit.ci end-->
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4213/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4213/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4213", "html_url": "https://github.com/materialsproject/pymatgen/pull/4213", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4213.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4213.patch", "merged_at": "2024-12-11T01:52:16Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4214
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4214/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4214/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4214/events
https://github.com/materialsproject/pymatgen/issues/4214
2,714,255,578
I_kwDOACgets6hyEDa
4,214
For band structure, how to correctly display the symbol of the \Gamma point
{ "login": "phyfang", "id": 130356228, "node_id": "U_kgDOB8UUBA", "avatar_url": "https://avatars.githubusercontent.com/u/130356228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/phyfang", "html_url": "https://github.com/phyfang", "followers_url": "https://api.github.com/users/phyfang/followers", "following_url": "https://api.github.com/users/phyfang/following{/other_user}", "gists_url": "https://api.github.com/users/phyfang/gists{/gist_id}", "starred_url": "https://api.github.com/users/phyfang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phyfang/subscriptions", "organizations_url": "https://api.github.com/users/phyfang/orgs", "repos_url": "https://api.github.com/users/phyfang/repos", "events_url": "https://api.github.com/users/phyfang/events{/privacy}", "received_events_url": "https://api.github.com/users/phyfang/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Dear @phyfang , could you further describe how you try to plot the bandstructure? \r\nDepending on what you do, it helps to put \\Gamma in backticks (``) like \\`\\Gamma\\` .", "I guess it's related to #4025 (looks like `Gamma` is not escaped properly somewhere). I might open a PR later and let's fix this together or you would fix this @QuantumChemist ?", "> I guess it's related to #4025 (looks like `Gamma` is not escaped properly somewhere). I might open a PR later and let's fix this together or you would fix this @QuantumChemist ?\r\n\r\nyeah, as you gave me access to your fork, let's fix this together. Or was that not intended? When it's just escaping the `Gamma` correctly, the PR shouldn't take long I guess.", "> as you gave me access to your fork, let's fix this together. Or was that not intended?\r\n\r\nIt was 100% intended, free feel to commit to my other/future PRs as well :)\r\n\r\n> When it's just escaping the Gamma correctly, the PR shouldn't take long I guess.\r\n\r\nYep, I guess it wouldn't be a hard fix, but I would need to fix some data (perhaps from current tests) to recreate this as I don't have data at hand right now.\r\n\r\n---\r\n\r\nUpdate: I just tried the BS plotter at https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/tests/electronic_structure/test_plotter.py#L163-L184\r\n\r\nAnd it seems to work as expected.\r\n![bsplot](https://github.com/user-attachments/assets/c88ac0d5-60b1-4a0c-8c0c-f263c8043ab2)\r\n\r\nAlso tried the BSDOS plotter at https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/tests/electronic_structure/test_plotter.py#L223-L233\r\n\r\nAnd worked as expected as well.\r\n<img width=\"972\" alt=\"image\" src=\"https://github.com/user-attachments/assets/90eafb96-e4da-4baa-a226-29bece924bfa\">\r\n\r\nAlso tried the ipynb at https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2017-09-03-Analyze%20and%20plot%20band%20structures.ipynb and not seeing any issue either (but the `MPRest` import seems broken, I would fix it)\r\n\r\n---\r\n~~I would have another try later back home with my Windows PC (not sure if this is a mpl backend issue in Windows or not)~~ Update, tested on Windows and didn't see any issue for above code\r\n\r\n@phyfang Yes it would really help us if you could provide the code snippet (and data if possible) to recreate this issue.\r\n", "> Dear @phyfang , could you further describe how you try to plot the bandstructure? Depending on what you do, it helps to put \\Gamma in backticks (``) like `\\Gamma` .\r\n\r\nThanks for your reply, I changed the 'GAMMA' in KPOINTS to '\\Gamma' and it solved.", "@phyfang If you don't mind, can you share the code you used to generate the plot? ", "> It was 100% intended, free feel to commit to my other/future PRs as well :)\r\n\r\nSure 🤗 let's see how and where I can help out.\r\n\r\n> Update: I just tried the BS plotter at\r\n\r\nI also remembered that I didn't have a problem with the BSplotter before (and there were no recent changes I guess), as you can see at the end of the following page: https://autoatml.github.io/autoplex/user/phonon/flows/flows.html\r\n\r\n", "> @phyfang If you don't mind, can you share the code you used to generate the plot?\r\n\r\nI'm not sure if phonopy uses the KPOINTS file, but probably in the KPOINTS file, instead of using the mesh, putting the kpoint path explicitly with labels for the critical points. ", "> @phyfang If you don't mind, can you share the code you used to generate the plot?\r\n\r\nok\r\n````\r\nimport matplotlib.pyplot as plt\r\nfrom pymatgen.io.vasp.outputs import Vasprun\r\nfrom pymatgen.electronic_structure.plotter import BSDOSPlotter\r\n\r\nband_structure = Vasprun(r\"vasprun.xml\", parse_projected_eigen=True)\r\nband_data = band_structure.get_band_structure(line_mode=True) \r\n\r\ndos_vasprun = Vasprun(r\"E:\\DFT\\dos\\vasprun.xml\" )\r\ndos_data = dos_vasprun.complete_dos\r\n\r\nbanddos_fig = BSDOSPlotter(bs_projection='elements', dos_projection='orbitals', vb_energy_range=0.5, fixed_cb_energy=False, cb_energy_range=0.5)\r\nbanddos_fig.get_plot(bs=band_data, dos=dos_data)\r\nplt.savefig('banddos.png')\r\n````\r\noriginal KPOINTS\r\n```\r\nK-Path Generated by VASPKIT.\r\n 40\r\nLine-Mode\r\nReciprocal\r\n 0.0000000000 0.0000000000 0.0000000000 Γ \r\n 0.5000000000 0.5000000000 0.0000000000 Y \r\n \r\n 0.5000000000 0.5000000000 0.0000000000 Y \r\n 0.5000000000 0.5000000000 0.5000000000 M \r\n \r\n 0.5000000000 0.5000000000 0.5000000000 M \r\n 0.0000000000 0.0000000000 0.5000000000 A \r\n \r\n 0.0000000000 0.0000000000 0.5000000000 A \r\n 0.0000000000 0.0000000000 0.0000000000 Γ \r\n \r\n 0.0000000000 0.5000000000 0.5000000000 L_2 \r\n 0.0000000000 0.0000000000 0.0000000000 Γ \r\n \r\n 0.0000000000 0.0000000000 0.0000000000 Γ \r\n 0.0000000000 0.5000000000 0.0000000000 V_2 \r\n```\r\n\r\nchanged\r\n```\r\nK-Path Generated by VASPKIT.\r\n 40\r\nLine-Mode\r\nReciprocal\r\n 0.0000000000 0.0000000000 0.0000000000 \\Gamma \r\n 0.5000000000 0.5000000000 0.0000000000 Y \r\n \r\n 0.5000000000 0.5000000000 0.0000000000 Y \r\n 0.5000000000 0.5000000000 0.5000000000 M \r\n \r\n 0.5000000000 0.5000000000 0.5000000000 M \r\n 0.0000000000 0.0000000000 0.5000000000 A \r\n \r\n 0.0000000000 0.0000000000 0.5000000000 A \r\n 0.0000000000 0.0000000000 0.0000000000 \\Gamma \r\n \r\n 0.0000000000 0.5000000000 0.5000000000 L_2 \r\n 0.0000000000 0.0000000000 0.0000000000 \\Gamma \r\n \r\n 0.0000000000 0.0000000000 0.0000000000 \\Gamma \r\n 0.0000000000 0.5000000000 0.0000000000 V_2\r\n```\r\n", "Thank you a lot for sharing your code @phyfang 😃 ", "I think we can safely close this issue as no PR is needed.", "Hi @QuantumChemist sorry for the delay but I don't think that really resolves the issue, as [VASP docs also use `Γ` for labeling Gamma point](https://www.vasp.at/wiki/index.php/KPOINTS) (as such we cannot ask users to overwrite all `Γ` with `\\Gamma`).\r\n\r\nAs far as I know, this is an encoding issue in Windows (i.e. the encoding is not explicitly set in `zopen`) when parsing KPOINTS from file (as text) (looks like @phyfang's system might be using `GB2312` which is the default encoding for Chinese): https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/io/vasp/inputs.py#L908-L909\r\n\r\nYou could check the encoding with `[System.Text.Encoding]::Default` from PowerShell on Windows BTW.\r\n\r\nI know you're working on Linux, and the default encoding on Windows is a bit complicated and [dependent on locale encoding](https://docs.python.org/3/library/locale.html#locale.getencoding):\r\n> On Unix, return the encoding of the current [LC_CTYPE](https://docs.python.org/3/library/locale.html#locale.LC_CTYPE) locale. Return \"utf-8\" if nl_langinfo(CODESET) returns an empty string: for example, if the current LC_CTYPE locale is not supported.\r\n\r\n> On Windows, return the ANSI code page.\r\n\r\nSo in a word, that issue is not specific to plotter but more general to file parsing where the user's default encoding is not \"UTF-8\" with non-ASCII char present, I guess we still need to fix it.\r\n\r\n---\r\n\r\nExplanation moved to #4218 for visibility \r\n", "Hi @DanielYang59 , oh I see where the issue arises from then.\r\nI have never seen `Γ` in a KPOINTS file before and myself always used \\Gamma, so I was not even aware that this is possible at all. 🫨 " ]
2024-12-03T07:52:19
2024-12-10T20:47:25
2024-12-04T14:42:18Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version python--3.12 ### Pymatgen version 2024.11.13 ### Operating system version Win-11 ### Current behavior When I was drawing the band structure, I found some problems that the gamma points were not displayed correctly. ![??](https://github.com/user-attachments/assets/72a2a8fa-a297-49ac-87c4-bd0af7210722) ### Expected Behavior How should I solve this problem? ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4214/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4214/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4215
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4215/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4215/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4215/events
https://github.com/materialsproject/pymatgen/issues/4215
2,717,068,871
I_kwDOACgets6h8y5H
4,215
Cannot init `Cohpcar` in `matgenb ` example notebook: `ValueError: setting an array element with a sequence.`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "There is a second notebook. This one is not needed and outdated", "Thanks for the quick response! This one `2019-01-11-How to plot and evaluate output files from Lobster.ipynb`? This [seems to be failing for the same reason](https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2019-01-11-How%20to%20plot%20and%20evaluate%20output%20files%20from%20Lobster.ipynb)", "@naik-aakash could you take a look? ", "In general, it would be great if the tutorials would be directly tested on a new pymatgen version. In the current way, we have a very hard time to update them. ", "I'm btw not very actively working on the LOBSTER stuff.", "Hi @JaGeo , @DanielYang59 , I can look into it 😄 ", "@naik-aakash Thanks a lot :)\r\n\r\n> I'm btw not very actively working on the LOBSTER stuff.\r\n\r\nSorry I didn't know that, but I would keep that in mind\r\n\r\n> In general, it would be great if the tutorials would be directly tested on a new pymatgen version. In the current way, we have a very hard time to update them.\r\n\r\nI believe everything would suffer if not checked/maintained regularly. I guess it's good to trigger the test workflow of `matgenb` when `pymatgen` has a new release, but it looks like [we might need a custom trigger for this](https://stackoverflow.com/questions/58465057/trigger-a-github-action-when-another-repository-creates-a-new-release) (i.e. GitHub may not provide native support for this). \r\n\r\nOr perhaps just make our life easier and trigger that every few months.\r\n\r\nI have collected this into my TODO list :)\r\n", "Hi @DanielYang59 , I had a chance to quickly look into this issue. Seems it not any bug in parser but the example file on the repository has for some reason got added an new line at last line causing this error. Simply removing this trailing line seemed to fix the issue. For both the example it is same problem.\r\n\r\nHere is an updated file that can be used instead (the only change is for the last line unexpected \"\\n\" is removed, this is usually not the case of files generated by LOBSTER)\r\n\r\n[Fixed: COHPCAR.lobster.txt](https://github.com/user-attachments/files/18221909/COHPCAR.lobster.txt)\r\n", "> Seems it not any bug in parser but the example file on the repository has for some reason got added an new line at last line causing this error. Simply removing this trailing line seemed to fix the issue. For both the example it is same problem.\r\n\r\nHi @naik-aakash wish everything is doing well. That is hugely appreciated. If that's really the case, then LOBSTER might be violating [the POSIX standard definition of \"line\"](https://pubs.opengroup.org/onlinepubs/9799919799/) IMO:\r\n> 3.185 Line\r\n> A sequence of zero or more non-<newline> characters **plus a terminating <newline> character.**\r\n\r\nAs per the above definition, every line (including the last) should end with a terminating \"newline\" char (which might look like an \"empty line at the end\" in a text editor but it's not). \r\n\r\nIn other words, a text file should always end as `b'somedata\\n'` (or other line ending char) instead of `b'somedata'`\r\n\r\nPerhaps it's good to reach out to LOBSTER team about this? Or at least we could enhance related parsers from our side to be insensitive of such terminating chars :)\r\n", "@naik-aakash maybe (after the Christmas break 👀), you can regenerate a cohpcar with the latest Lobster version. Then, we can check this in detail", "I just had a chance to generate a `COHPCAR.lobster` using [LOBSTER 5.1.1](http://www.cohp.de/), with the included VASP \"diamond\" example. As far as I can tell there's no line ending char to the last line.\n\n[COHPCAR.lobster.txt](https://github.com/user-attachments/files/18747676/COHPCAR.lobster.txt)" ]
2024-12-04T09:17:54
2025-02-11T09:25:19
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Two LOBSTER examples in `matgenb` seems to be failing: - https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2018-03-14-Plotting%20COHP%20from%20LOBSTER.ipynb - https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2019-01-11-How%20to%20plot%20and%20evaluate%20output%20files%20from%20Lobster.ipynb ```python from pymatgen.io.lobster import Cohpcar COHPCAR_path = "COHPCAR.lobster.txt" cohpcar = Cohpcar(filename=COHPCAR_path) ``` Gives: ``` Traceback (most recent call last): File "/home/yang/developer/pymatgen/debug/recreate_cohp.py", line 5, in <module> cohpcar = Cohpcar(filename=COHPCAR_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/yang/developer/pymatgen/src/pymatgen/io/lobster/outputs.py", line 138, in __init__ data = np.array([np.array(line.split(), dtype=float) for line in lines[num_bonds + 3 :]]).transpose() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (402,) + inhomogeneous part. ``` [COHPCAR.lobster.txt](https://github.com/user-attachments/files/18005481/COHPCAR.lobster.txt) cc @JaGeo @QuantumChemist @naik-aakash
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4215/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4215/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4216
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4216/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4216/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4216/events
https://github.com/materialsproject/pymatgen/issues/4216
2,717,711,734
I_kwDOACgets6h_P12
4,216
Consider 'LSORBIT = True', how to use pymatgen plot element-project-DOS?
{ "login": "phyfang", "id": 130356228, "node_id": "U_kgDOB8UUBA", "avatar_url": "https://avatars.githubusercontent.com/u/130356228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/phyfang", "html_url": "https://github.com/phyfang", "followers_url": "https://api.github.com/users/phyfang/followers", "following_url": "https://api.github.com/users/phyfang/following{/other_user}", "gists_url": "https://api.github.com/users/phyfang/gists{/gist_id}", "starred_url": "https://api.github.com/users/phyfang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phyfang/subscriptions", "organizations_url": "https://api.github.com/users/phyfang/orgs", "repos_url": "https://api.github.com/users/phyfang/repos", "events_url": "https://api.github.com/users/phyfang/events{/privacy}", "received_events_url": "https://api.github.com/users/phyfang/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi @phyfang, I think this is fixed by my recent PR here: https://github.com/materialsproject/pymatgen/pull/4239" ]
2024-12-04T13:16:59
2025-01-02T11:28:18
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version python--3.12 ### Pymatgen version 2024.11.13 ### Operating system version Win-11 ### Current behavior for **LSORBIT = F** and **LNONCOLLINEAR = F**,I can get element-project-DOS easily, but if **LSORBIT = T** and **LNONCOLLINEAR = T**,how can I use pymatgen to get element-project-DOS?If I use the same code as **LSORBIT = F**,I will get wrong results. ![?](https://github.com/user-attachments/assets/960396dc-0af1-49bb-8487-c8720d268ded) ### Expected Behavior I know this is not a BUG,so how can I use pymatgen to get element-project-DOS? ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4216/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4216/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4217
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4217/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4217/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4217/events
https://github.com/materialsproject/pymatgen/pull/4217
2,721,892,244
PR_kwDOACgets6EQ4rW
4,217
Increase warnings `stacklevel` to 2, un-ignore RUFF `B028`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-06T02:24:40
2024-12-11T02:30:58
2024-12-11T01:52:44Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Increase warnings `stacklevel` to 2, to point to the caller instead of `warnings.warn` - [x] Un-ignore [RUFF B028](https://docs.astral.sh/ruff/rules/no-explicit-stacklevel/#no-explicit-stacklevel-b028): Checks for warnings.warn calls without an explicit stacklevel keyword argument - [x] Replace explicit `stacklevel=1`, people might have misunderstood this. It's not "default stacklevel" that is bad, but "default stacklevel as 1" that is not informative - [x] Remove unnecessary [explicit `UserWarning` as it's default](https://docs.python.org/3/library/warnings.html#warnings.warn): > The category argument, if given, must be a [warning category class](https://docs.python.org/3/library/warnings.html#warning-categories); it defaults to [UserWarning](https://docs.python.org/3/library/exceptions.html#UserWarning). - Change `_MPResterLegacy` from default `UserWarning` to `FutureWarning` > https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/ext/matproj_legacy.py#L169 --- ### Example https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/ext/matproj_legacy.py#L184 **Stacklevel 1**: ``` UserWarning: Non-default endpoint used:xxxx warnings.warn(f"Non-default endpoint used: {self.preamble}", stacklevel=1) ``` **vs** **Stacklevel 2**: ``` UserWarning: Non-default endpoint used: xxxx mpr = _MPResterLegacy(MP_API_KEY) ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4217/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4217/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4217", "html_url": "https://github.com/materialsproject/pymatgen/pull/4217", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4217.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4217.patch", "merged_at": "2024-12-11T01:52:44Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4218
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4218/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4218/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4218/events
https://github.com/materialsproject/pymatgen/pull/4218
2,722,409,653
PR_kwDOACgets6ESrIF
4,218
Explicit UTF-8 encoding for VASP input files with `zopen`, and `open` for other text files
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "As you have started this already, let me know when I shall step in (if needed).", "Thanks for saying that I could handle this as there aren't too many to fix across the entire code base (~300) and unsafe fixes from `ruff` is available, should be able to fix them pretty fast (though need to double check the `ruff` fix as it's in preview)\r\n\r\n\r\n```bash\r\n>>> ruff check . --select PLW1514 --preview\r\n\r\nFound 282 errors.\r\nNo fixes available (282 hidden fixes can be enabled with the `--unsafe-fixes` option).\r\n```\r\n\r\nIf you could help me review changes (if you have time), that would be wonderful :)", "Yes, I have a bit of time to spare for a review 😎\r\nPing me when you are done ☺️", "@QuantumChemist I went through the changes myself and didn't see much issue (not trying to bias you), please help me review those changes if you have time, really appreciate that.\r\n\r\nAFAIK, if we don't give a `encoding` in binary mode for `open`, there shouldn't be any issue.\r\n\r\nI would separate the remaining change to `zopen` to a separate PR as this one is already huge, and I would need some investigation on the behaviour of `zopen` as it wraps around multiple `gzip/bz2/lzma` to make sure `encoding` arg works for them as well.\r\n\r\nThanks again!", "@DanielYang59 , sorry this weekend was big exhaustion time and today I also had a day off but now I have the time and energy for reviewing x)", "> sorry this weekend was big exhaustion time and today I also had a day off but now I have the time and energy for reviewing x)\r\n\r\nThat's totally alright, no one would expect you to work on weekends/holidays :) Thanks a lot!\r\n\r\n---\r\n\r\n> I can also test this implementation on Wednesday (will not be able to test it tomorrow) with a Γ in a KPOINTS file 👀\r\n\r\nIn fact I tested on my local machine, and of course additional test is always welcome (I should add a test in CI, in TODO list now). However a pitfall may be: your system could be using a default encoding where `Γ` is decoded correctly (apparently the default Chinese \"GB\" encoding is not one of them), so please make sure you could recreate the incorrect decoding error before testing the fix (otherwise you would get the correct result with and without this fix).\r\n\r\n---\r\n\r\n> I'm just wondering how we could make sure that no \"open ... \" line was missed out \r\n\r\nThanks for noticing this, I originally used the [ruff PLW1514 rule](https://docs.astral.sh/ruff/rules/unspecified-encoding/) to identify them, ~~and indeed it seems to miss some (understandably, as that rule is still in preview mode, I would report the missing ones to them).~~\r\n\r\n**Update:** looks like I was wrong here, upon a closer look I believe all `open` within code (some might be in comment 6a90d2d9fd858ddbec19c7e4330a462f6b584ff3) now has `encoding` in text mode.\r\n\r\nI believe this code shown with https://github.com/materialsproject/pymatgen/pull/4218#discussion_r1873344121 is at the time of comment and would not be updated automatically, i.e. the `open` in `update_pt_data.py` already has encoding.\r\n\r\n<details>\r\n\r\n<summary> Not really useful anymore </summary>\r\n\r\nWe might need regular expression for this, something like: `\\s+open\\((?!.*encoding=).*?\\)`\r\n\r\nHowever this is not \"perfect\" so I would still need to manually inspect its outcome (it's the best I could do within a rational time frame):\r\n- It would also report missing encoding for binary mode, this could be avoided by checking if \"b\" is in `mode` but I guess it's not worth the effort (`mode` could be positional so a complete rule is a bit hard to write I guess)\r\n- It makes the assumption that `encoding` is given as keyword arguments, something like `open(file, \"rt\", -1, \"utf-8\")` would be flagged (though I haven't seen much usage like this, it's totally unreadable)\r\n- It's greedy, meaning it may not handle multiple pairs of `()` correctly like `open(\"encoding=.txt\", ...)` (crazy and very unlikely edge case though)\r\n- It cannot search across lines, [recent VSCode support multi-line search](https://stackoverflow.com/a/53270908/24021108)\r\n\r\nAn `re` alternative might be running tests with the `PYTHONWARNDEFAULTENCODING` env var in [PEP 597](https://peps.python.org/pep-0597/) and apply a warning filter to flag `EncodingWarning` as error (add `error::EncodingWarning` to pytest ini_options): https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/pyproject.toml#L250 \r\n\r\n</details>", "> > sorry this weekend was big exhaustion time and today I also had a day off but now I have the time and energy for reviewing x)\r\n> \r\n> That's totally alright, no one would expect you to work on weekends/holidays :) Thanks a lot!\r\n> \r\nI know that nobody expects to work on weekends, I just thought I would have the time and energy but was not the case against my expectation. \r\n>\r\n> > I can also test this implementation on Wednesday (will not be able to test it tomorrow) with a Γ in a KPOINTS file 👀\r\n> \r\n> In fact I tested on my local machine, and of course additional test is always welcome (I should add a test in CI, in TODO list now). However a pitfall may be: your system could be using a default encoding where `Γ` is decoded correctly (apparently the default Chinese \"GB\" encoding is not one of them), so please make sure you could recreate the incorrect decoding error before testing the fix (otherwise you would get the correct result with and without this fix).\r\n> \r\n> > I'm just wondering how we could make sure that no \"open ... \" line was missed out\r\n> \r\n> Thanks for noticing this, I originally used the [ruff PLW1514 rule](https://docs.astral.sh/ruff/rules/unspecified-encoding/) to identify them, ~and indeed it seems to miss some (understandably, as that rule is still in preview mode, I would report the missing ones to them).~\r\n> \r\n> **Update:** looks like I was wrong here, upon a closer look I believe all `open` within code (some might be in comment [6a90d2d](https://github.com/materialsproject/pymatgen/commit/6a90d2d9fd858ddbec19c7e4330a462f6b584ff3)) now has `encoding` in text mode.\r\n> \r\n> I believe this code shown with [#4218 (comment)](https://github.com/materialsproject/pymatgen/pull/4218#discussion_r1873344121) is at the time of comment and would not be updated automatically, i.e. the `open` in `update_pt_data.py` already has encoding.\r\n> \r\n> Not really useful anymore\r\n\r\nAn `EncodingWarning` in the pyproject.toml sounds like the most solid option to me. \r\n\r\n", "> I know that nobody expects to work on weekends, I just thought I would have the time and energy but was not the case against my expectation.\r\n\r\nI guess there is always a gap between the ideal image of self and and real us :) You have already done so much BTW\r\n\r\n> An EncodingWarning in the pyproject.toml sounds like the most solid option to me.\r\n\r\nThanks for the comment, with the [unspecified-encoding (PLW1514)](https://docs.astral.sh/ruff/rules/unspecified-encoding/#unspecified-encoding-plw1514) rule enable `open` should have already been covered now, only thing left is `zopen` AFAIK so I might migrate this guard to #4222 otherwise test would fail from here (update: added in bbd53bfa8a008ea5c2e96d3f2096186a60081ea9 but need more tests to confirm it's really working).\r\n", "I wasn't aware that `EncodingWarning` is only available from Python 3.13 on, though, so maybe your current setup is more than good enough already.", "> I wasn't aware that EncodingWarning is only available from Python 3.13 on, though, so maybe your current setup is more than good enough already.\r\n\r\nI would see if I could get the warning filter to work in #4222 so let's discuss there maybe, apparently the filter I added in bbd53bfa8a008ea5c2e96d3f2096186a60081ea9 is not doing what I expected as no error is thrown after I intentionally removed some encoding in 2ccf30c72e7e16c95f3c8c0cd2aa216ab097c1eb\r\n\r\nThe `EncodingWarning` `zopen` issued is the following custom one but there must have been something wrong with [my warning filter syntax](https://docs.python.org/3/library/warnings.html#describing-warning-filters):\r\nhttps://github.com/materialsvirtuallab/monty/blob/26acf0b2900b5074143ed64ccd1bdea6ba9f6705/src/monty/io.py#L25", "@QuantumChemist Sorry there was a major typo, [the EncodingWarning was added in Python 3.10](https://peps.python.org/pep-0597/) not Python 3.13\r\n\r\nThe reason for the custom `EncodingWarning` in `monty.io.zopen`: `monty` only bumped min Python to Python 3.10 two days ago in https://github.com/materialsvirtuallab/monty/pull/709 and at the time `zopen` change was made Python 3.9 was still supported, so [the custom warning could be dropped now](https://github.com/materialsvirtuallab/monty/pull/732/commits/d54bde4c6fa03839e7c2716fa46d164d10ae0474) :) ", "> @QuantumChemist Sorry there was a major typo, [the EncodingWarning was added in Python 3.10](https://peps.python.org/pep-0597/) not Python 3.13\r\n> \r\n> The reason for the custom `EncodingWarning` in `monty.io.zopen`: `monty` only bumped min Python to Python 3.10 two days ago in [materialsvirtuallab/monty#709](https://github.com/materialsvirtuallab/monty/pull/709) and at the time `zopen` change was made Python 3.9 was still supported, so [the custom warning could be dropped now](https://github.com/materialsvirtuallab/monty/pull/732/commits/d54bde4c6fa03839e7c2716fa46d164d10ae0474) :)\r\n\r\nI see it was a typo xD\r\n\r\n> I would see if I could get the warning filter to work in https://github.com/materialsproject/pymatgen/pull/4222 so let's discuss there maybe\r\n\r\nyeah, I will have a closer look in the other PR too :)\r\n\r\n", "Is this ready to be merged?", "> Is this ready to be merged?\r\n\r\nYes as far as I'm aware, thank you!", "> Is this ready to be merged?\r\n\r\nyes, ready to be merged.", "Thanks @DanielYang59 and thanks for the review @QuantumChemist, I've set this to auto-merge" ]
2024-12-06T08:36:47
2025-01-10T02:28:01
2025-01-09T20:37:59Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Explicit UTF-8 encoding when reading/writing VASP input files with `zopen`, to fix #4214 - Explicit UTF-8 encoding for standard `open` - `pytest` ignore `UserWarning` only by default instead of all warnings - [x] Add test for non-ASCII char in Kpoints comment ### Rationale [PEP 597 – Add optional EncodingWarning](https://peps.python.org/pep-0597/): > [Using the default encoding is a common mistake](https://peps.python.org/pep-0597/#using-the-default-encoding-is-a-common-mistake) > Developers using macOS or Linux may forget that the default encoding is not always UTF-8. > For example, using long_description = open("README.md").read() in setup.py is a common mistake. Many Windows users cannot install such packages if there is at least one non-ASCII character (e.g. emoji, author names, copyright symbols, and the like) in their UTF-8-encoded README.md file. > Of the 4000 most downloaded packages from PyPI, 489 use non-ASCII characters in their README, and 82 fail to install from source on non-UTF-8 locales due to not specifying an encoding for a non-ASCII file. [[1]](https://peps.python.org/pep-0597/#id10) > Another example is logging.basicConfig(filename="log.txt"). Some users might expect it to use UTF-8 by default, but the locale encoding is actually what is used. [[2]](https://peps.python.org/pep-0597/#id11) Meanwhile [PEP 686 – Make UTF-8 mode default](https://peps.python.org/pep-0686/) should resolve this altogether but it wouldn't be in place until Python 3.15 Ruff rule: [unspecified-encoding (PLW1514)](https://docs.astral.sh/ruff/rules/unspecified-encoding/#unspecified-encoding-plw1514)
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4218/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4218/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4218", "html_url": "https://github.com/materialsproject/pymatgen/pull/4218", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4218.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4218.patch", "merged_at": "2025-01-09T20:37:59Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4219
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4219/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4219/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4219/events
https://github.com/materialsproject/pymatgen/pull/4219
2,724,541,290
PR_kwDOACgets6EZ9wX
4,219
`zopen`: explicit binary/text `mode` , and explicit `encoding` as UTF-8
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-07T11:08:55
2024-12-11T03:31:55
2024-12-11T01:51:58Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Explicit binary/text `mode` for `zopen`, I have opened a PR from `monty`'s side to prevent this https://github.com/materialsvirtuallab/monty/pull/730 - [x] Explicitly use UTF-8 `encoding` for `zopen` Detailed reasoning and example are given in https://github.com/materialsvirtuallab/monty/pull/730#issue-2724465284. In a word, not passing `b/t` in `mode` would cause different and unexpected behaviour when opening a text file (`file.txt`) versus a compressed file (`file.gz`), for the former we would get `TextIO` which gives string but `BinaryIO` for the latter which gives bytes. --- There're few cases where this wouldn't cause problem, for example [`json.load` accepts both binary and text IO](https://docs.python.org/3/library/json.html#json.load): > json.load(fp, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) > Deserialize fp (a .read()-supporting [text file](https://docs.python.org/3/glossary.html#term-text-file) or [binary file](https://docs.python.org/3/glossary.html#term-binary-file) containing a JSON document) to a Python object using this [conversion table](https://docs.python.org/3/library/json.html#json-to-py-table). For such cases, I tested with the [pdag3_complete_dos.json.gz](https://github.com/materialsproject/pymatgen/blob/master/tests/files/electronic_structure/dos/pdag3_complete_dos.json.gz) file, "text mode" seems slightly faster: ``` Binary mode: Loaded data (first 100 chars): {'@module': 'pymatgen.electronic_structure.dos', '@class': 'CompleteDos', 'efermi': -0.28973031, 'st... Time taken (binary mode): 0.3674 seconds Text mode: Loaded data (first 100 chars): {'@module': 'pymatgen.electronic_structure.dos', '@class': 'CompleteDos', 'efermi': -0.28973031, 'st... Time taken (text mode): 0.3450 seconds ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4219/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4219/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4219", "html_url": "https://github.com/materialsproject/pymatgen/pull/4219", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4219.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4219.patch", "merged_at": "2024-12-11T01:51:58Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4220
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4220/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4220/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4220/events
https://github.com/materialsproject/pymatgen/issues/4220
2,725,371,324
I_kwDOACgets6icd28
4,220
Specify equivalent sites included in different unit cells in `get_miller_index_from_site_indexes` of the `Structure` class
{ "login": "ShotaNamerikawa", "id": 80497238, "node_id": "MDQ6VXNlcjgwNDk3MjM4", "avatar_url": "https://avatars.githubusercontent.com/u/80497238?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ShotaNamerikawa", "html_url": "https://github.com/ShotaNamerikawa", "followers_url": "https://api.github.com/users/ShotaNamerikawa/followers", "following_url": "https://api.github.com/users/ShotaNamerikawa/following{/other_user}", "gists_url": "https://api.github.com/users/ShotaNamerikawa/gists{/gist_id}", "starred_url": "https://api.github.com/users/ShotaNamerikawa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShotaNamerikawa/subscriptions", "organizations_url": "https://api.github.com/users/ShotaNamerikawa/orgs", "repos_url": "https://api.github.com/users/ShotaNamerikawa/repos", "events_url": "https://api.github.com/users/ShotaNamerikawa/events{/privacy}", "received_events_url": "https://api.github.com/users/ShotaNamerikawa/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1427867026, "node_id": "MDU6TGFiZWwxNDI3ODY3MDI2", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/enhancement", "name": "enhancement", "color": "c5e06d", "default": true, "description": "A new feature or improvement to an existing one" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-08T16:35:15
2024-12-08T16:41:33
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Feature Requested Now, we can specify only the `site_ids` of atoms to define an atomic plane for which a miller index is derived in the `get_miller_index_from_site_indexes` method of the `Structure` class. But this is quite inconvenient because we cannot get the Miller indices of the planes passing through atoms located at equivalent intercell positions in different unit cells. ### Proposed Solution Therefore, I would like someone to make the method able to get arbitrary atomic planes by using a new argument indicating the unit cell positions of the atoms, an atomic plane overlaps. Sorry for the bad English. Best regards ### Relevant Information _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4220/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4220/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4221
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4221/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4221/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4221/events
https://github.com/materialsproject/pymatgen/pull/4221
2,731,650,249
PR_kwDOACgets6Eyc1O
4,221
Revert "`zopen`: explicit binary/text `mode` , and explicit `encoding` as UTF-8"
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Sure thing would look into this ", "@shyuep I would look into (and be responsible for) those test failure in current master branch as they're seemingly related to my PRs, sorry for the trouble", "AFAIK that is not related to #4219 but recent `monty` released `numpy<2` pin and `numpy` bumped to 2, while `netcdf4` doesn't support NP2 (they should have added NP<2 pin in their specs), **in any case I would be responsible for this and would try to fix ASAP**" ]
2024-12-11T02:21:15
2024-12-12T05:45:11
2024-12-11T02:21:23Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
Reverts materialsproject/pymatgen#4219. Tests fail because of this. @DanielYang59 Pls fix and resubmit PR.
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4221/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4221/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4221", "html_url": "https://github.com/materialsproject/pymatgen/pull/4221", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4221.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4221.patch", "merged_at": "2024-12-11T02:21:23Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4222
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4222/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4222/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4222/events
https://github.com/materialsproject/pymatgen/pull/4222
2,731,734,020
PR_kwDOACgets6EyvOu
4,222
Reapply `zopen` explicit UTF-8 encoding, enable optional `EncodingWarning` PEP 597 in tests
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-11T03:35:24
2025-01-10T02:27:09
2025-01-09T18:13:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
- Reapply #4219, in response to #4221 - [x] Enable `PYTHONWARNDEFAULTENCODING` PEP 597, mark `monty.io.zopen` encoding warning as error, confirmed to work by https://github.com/materialsproject/pymatgen/actions/runs/12297641499 - [ ] After `monty` dropped custom encoding warning, modify warning filter
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4222/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4222/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4222", "html_url": "https://github.com/materialsproject/pymatgen/pull/4222", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4222.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4222.patch", "merged_at": "2025-01-09T18:13:29Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4223
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4223/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4223/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4223/events
https://github.com/materialsproject/pymatgen/pull/4223
2,731,972,507
PR_kwDOACgets6EzjnF
4,223
Fix CI failure: bump `netcdf4`, replace `Namespace` with standard `dict` for `io.abinit.pseudos`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "@shyuep This should fix failure.\r\n\r\nRegarding the `Namespace` issue from `monty` I would fix it ASAP but I don't think it's relevant anymore, i.e. after we fixed that implementation it still cannot be used (intentionally) as `pop` would not be allowed which \"redefines the keys\".\r\n ", "Thanks!" ]
2024-12-11T06:44:27
2024-12-11T14:38:46
2024-12-11T14:03:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Fix CI failure, to fix #4221 TODOs: - [x] investigate netcdf4 compatibility with NP2 - [x] double check latest monty compatibility
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4223/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4223/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4223", "html_url": "https://github.com/materialsproject/pymatgen/pull/4223", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4223.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4223.patch", "merged_at": "2024-12-11T14:03:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4224
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4224/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4224/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4224/events
https://github.com/materialsproject/pymatgen/pull/4224
2,735,259,621
PR_kwDOACgets6E-93P
4,224
Skip another failing `Phonopy` test in Windows after NumPy bumped to 2 in CI
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-12T08:50:09
2024-12-13T01:23:17
2024-12-12T22:33:14Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Skip another failing `phonopy` test in Windows after NumPy bumped to 2 in CI - https://github.com/phonopy/phonopy/issues/476 I could recreate this in my Windows PC, all four tests failing for the same reason: ``` Python 3.10.0 phonopy==2.33.0 numpy==2.0.2 ``` ``` $ pytest tests/io/test_phonopy.py ....FFFF... [100%] =============================================================================== FAILURES =============================================================================== _______________________________________________________ TestGetDisplacedStructures.test_get_displaced_structures _______________________________________________________ self = <tests.io.test_phonopy.TestGetDisplacedStructures testMethod=test_get_displaced_structures> def test_get_displaced_structures(self): pmg_s = Structure.from_file(f"{TEST_DIR}/POSCAR-unitcell", primitive=False) supercell_matrix = np.diag((2, 1, 2)) > structures = get_displaced_structures(pmg_structure=pmg_s, atom_disp=0.01, supercell_matrix=supercell_matrix) D:\pymatgen\tests\io\test_phonopy.py:134: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\monty\dev.py:216: in decorated return _callable(*args, **kwargs) D:\pymatgen\src\pymatgen\io\phonopy.py:260: in get_displaced_structures phonon = Phonopy(unitcell=ph_structure, supercell_matrix=supercell_matrix) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:293: in __init__ self._build_primitive_cell() C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:4146: in _build_primitive_cell self._primitive = get_primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:886: in get_primitive return Primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:386: in __init__ self._run(supercell, positions_to_reorder=positions_to_reorder) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:554: in _run (self._smallest_vectors, self._multiplicity) = self._get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:650: in _get_smallest_vectors svecs, multi = get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1098: in get_smallest_vectors spairs = ShortestPairs( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1165: in __init__ svecs, multi = self._run_dense() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <phonopy.structure.cells.ShortestPairs object at 0x0000027AFBAD2B60> def _run_dense(self): """Find shortest atomic pair vectors. Returns ------- shortest_vectors : ndarray Shortest vectors in supercell coordinates. shape=(sum(multiplicities[:, :, 0], 3), dtype='double' multiplicities : ndarray Number of equidistance shortest vectors. The last dimension indicates [0] multipliticy at the pair of atoms in the supercell and primitive cell, and [1] integral of multiplicities to this pair, i.e., which indicates address used in `shortest_vectors`. shape=(size_super, size_prim, 2), dtype='int_' """ ( lattice_points, supercell_fracs, primitive_fracs, trans_mat_inv, reduced_bases, ) = self._transform_cell_basis("int_") # Phase1 : Set multiplicity. # shortest_vectors is a dummy array. shortest_vectors = np.zeros((1, 3), dtype="double", order="C") multiplicity = np.zeros( (len(supercell_fracs), len(primitive_fracs), 2), dtype="int_", order="C" ) import phonopy._phonopy as phonoc phonoc.gsv_set_smallest_vectors_dense( shortest_vectors, multiplicity, supercell_fracs, primitive_fracs, lattice_points, np.array(reduced_bases.T, dtype="double", order="C"), np.array(trans_mat_inv.T, dtype="int_", order="C"), 1, self._symprec, ) # Phase 2 : Set shortest_vectors. > shortest_vectors = np.zeros( (np.sum(multiplicity[:, :, 0]), 3), dtype="double", order="C" ) E numpy._core._exceptions._ArrayMemoryError: Unable to allocate 2.14 EiB for an array with shape (102803044411911591, 3) and data type float64 C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1239: MemoryError _________________________________________________ TestPhonopyFromForceConstants.test_get_phonon_band_structure_from_fc _________________________________________________ self = <tests.io.test_phonopy.TestPhonopyFromForceConstants testMethod=test_get_phonon_band_structure_from_fc> def test_get_phonon_band_structure_from_fc(self): > bs = get_phonon_band_structure_from_fc( self.structure, self.supercell_matrix, self.force_constants, mesh_density=10.0, ) tests\io\test_phonopy.py:187: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\monty\dev.py:216: in decorated return _callable(*args, **kwargs) src\pymatgen\io\phonopy.py:362: in get_phonon_band_structure_from_fc phonon = Phonopy(structure_phonopy, supercell_matrix=supercell_matrix, **kwargs) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:293: in __init__ self._build_primitive_cell() C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:4146: in _build_primitive_cell self._primitive = get_primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:886: in get_primitive return Primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:386: in __init__ self._run(supercell, positions_to_reorder=positions_to_reorder) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:554: in _run (self._smallest_vectors, self._multiplicity) = self._get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:650: in _get_smallest_vectors svecs, multi = get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1098: in get_smallest_vectors spairs = ShortestPairs( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1165: in __init__ svecs, multi = self._run_dense() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <phonopy.structure.cells.ShortestPairs object at 0x0000027AFC82BB20> def _run_dense(self): """Find shortest atomic pair vectors. Returns ------- shortest_vectors : ndarray Shortest vectors in supercell coordinates. shape=(sum(multiplicities[:, :, 0], 3), dtype='double' multiplicities : ndarray Number of equidistance shortest vectors. The last dimension indicates [0] multipliticy at the pair of atoms in the supercell and primitive cell, and [1] integral of multiplicities to this pair, i.e., which indicates address used in `shortest_vectors`. shape=(size_super, size_prim, 2), dtype='int_' """ ( lattice_points, supercell_fracs, primitive_fracs, trans_mat_inv, reduced_bases, ) = self._transform_cell_basis("int_") # Phase1 : Set multiplicity. # shortest_vectors is a dummy array. shortest_vectors = np.zeros((1, 3), dtype="double", order="C") multiplicity = np.zeros( (len(supercell_fracs), len(primitive_fracs), 2), dtype="int_", order="C" ) import phonopy._phonopy as phonoc phonoc.gsv_set_smallest_vectors_dense( shortest_vectors, multiplicity, supercell_fracs, primitive_fracs, lattice_points, np.array(reduced_bases.T, dtype="double", order="C"), np.array(trans_mat_inv.T, dtype="int_", order="C"), 1, self._symprec, ) # Phase 2 : Set shortest_vectors. > shortest_vectors = np.zeros( (np.sum(multiplicity[:, :, 0]), 3), dtype="double", order="C" ) E numpy._core._exceptions._ArrayMemoryError: Unable to allocate 45.7 PiB for an array with shape (2143661127108530, 3) and data type float64 C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1239: MemoryError ____________________________________________ TestPhonopyFromForceConstants.test_get_phonon_band_structure_symm_line_from_fc ____________________________________________ self = <tests.io.test_phonopy.TestPhonopyFromForceConstants testMethod=test_get_phonon_band_structure_symm_line_from_fc> def test_get_phonon_band_structure_symm_line_from_fc(self): > bs = get_phonon_band_structure_symm_line_from_fc( self.structure, self.supercell_matrix, self.force_constants, line_density=5.0, ) tests\io\test_phonopy.py:200: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\monty\dev.py:216: in decorated return _callable(*args, **kwargs) src\pymatgen\io\phonopy.py:396: in get_phonon_band_structure_symm_line_from_fc phonon = Phonopy(structure_phonopy, supercell_matrix=supercell_matrix, symprec=symprec, **kwargs) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:293: in __init__ self._build_primitive_cell() C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:4146: in _build_primitive_cell self._primitive = get_primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:886: in get_primitive return Primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:386: in __init__ self._run(supercell, positions_to_reorder=positions_to_reorder) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:554: in _run (self._smallest_vectors, self._multiplicity) = self._get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:650: in _get_smallest_vectors svecs, multi = get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1098: in get_smallest_vectors spairs = ShortestPairs( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1165: in __init__ svecs, multi = self._run_dense() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <phonopy.structure.cells.ShortestPairs object at 0x0000027AFA9AF4C0> def _run_dense(self): """Find shortest atomic pair vectors. Returns ------- shortest_vectors : ndarray Shortest vectors in supercell coordinates. shape=(sum(multiplicities[:, :, 0], 3), dtype='double' multiplicities : ndarray Number of equidistance shortest vectors. The last dimension indicates [0] multipliticy at the pair of atoms in the supercell and primitive cell, and [1] integral of multiplicities to this pair, i.e., which indicates address used in `shortest_vectors`. shape=(size_super, size_prim, 2), dtype='int_' """ ( lattice_points, supercell_fracs, primitive_fracs, trans_mat_inv, reduced_bases, ) = self._transform_cell_basis("int_") # Phase1 : Set multiplicity. # shortest_vectors is a dummy array. shortest_vectors = np.zeros((1, 3), dtype="double", order="C") multiplicity = np.zeros( (len(supercell_fracs), len(primitive_fracs), 2), dtype="int_", order="C" ) import phonopy._phonopy as phonoc phonoc.gsv_set_smallest_vectors_dense( shortest_vectors, multiplicity, supercell_fracs, primitive_fracs, lattice_points, np.array(reduced_bases.T, dtype="double", order="C"), np.array(trans_mat_inv.T, dtype="int_", order="C"), 1, self._symprec, ) # Phase 2 : Set shortest_vectors. > shortest_vectors = np.zeros( (np.sum(multiplicity[:, :, 0]), 3), dtype="double", order="C" ) E numpy._core._exceptions._ArrayMemoryError: Unable to allocate 45.7 PiB for an array with shape (2143661127108530, 3) and data type float64 C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1239: MemoryError ______________________________________________________ TestPhonopyFromForceConstants.test_get_phonon_dos_from_fc _______________________________________________________ self = <tests.io.test_phonopy.TestPhonopyFromForceConstants testMethod=test_get_phonon_dos_from_fc> def test_get_phonon_dos_from_fc(self): > dos = get_phonon_dos_from_fc( self.structure, self.supercell_matrix, self.force_constants, mesh_density=10.0, ) tests\io\test_phonopy.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\monty\dev.py:216: in decorated return _callable(*args, **kwargs) src\pymatgen\io\phonopy.py:315: in get_phonon_dos_from_fc phonon = Phonopy(structure_phonopy, supercell_matrix=supercell_matrix, **kwargs) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:293: in __init__ self._build_primitive_cell() C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\api_phonopy.py:4146: in _build_primitive_cell self._primitive = get_primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:886: in get_primitive return Primitive( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:386: in __init__ self._run(supercell, positions_to_reorder=positions_to_reorder) C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:554: in _run (self._smallest_vectors, self._multiplicity) = self._get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:650: in _get_smallest_vectors svecs, multi = get_smallest_vectors( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1098: in get_smallest_vectors spairs = ShortestPairs( C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1165: in __init__ svecs, multi = self._run_dense() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <phonopy.structure.cells.ShortestPairs object at 0x0000027AFBAD02E0> def _run_dense(self): """Find shortest atomic pair vectors. Returns ------- shortest_vectors : ndarray Shortest vectors in supercell coordinates. shape=(sum(multiplicities[:, :, 0], 3), dtype='double' multiplicities : ndarray Number of equidistance shortest vectors. The last dimension indicates [0] multipliticy at the pair of atoms in the supercell and primitive cell, and [1] integral of multiplicities to this pair, i.e., which indicates address used in `shortest_vectors`. shape=(size_super, size_prim, 2), dtype='int_' """ ( lattice_points, supercell_fracs, primitive_fracs, trans_mat_inv, reduced_bases, ) = self._transform_cell_basis("int_") # Phase1 : Set multiplicity. # shortest_vectors is a dummy array. shortest_vectors = np.zeros((1, 3), dtype="double", order="C") multiplicity = np.zeros( (len(supercell_fracs), len(primitive_fracs), 2), dtype="int_", order="C" ) import phonopy._phonopy as phonoc phonoc.gsv_set_smallest_vectors_dense( shortest_vectors, multiplicity, supercell_fracs, primitive_fracs, lattice_points, np.array(reduced_bases.T, dtype="double", order="C"), np.array(trans_mat_inv.T, dtype="int_", order="C"), 1, self._symprec, ) # Phase 2 : Set shortest_vectors. > shortest_vectors = np.zeros( (np.sum(multiplicity[:, :, 0]), 3), dtype="double", order="C" ) E numpy._core._exceptions._ArrayMemoryError: Unable to allocate 45.7 PiB for an array with shape (2143661127108530, 3) and data type float64 C:\Users\Yang\anaconda3\envs\py310\lib\site-packages\phonopy\structure\cells.py:1239: MemoryError ========================================================================= slowest 30 durations ========================================================================= 24.93s call tests/io/test_phonopy.py::TestGruneisen::test_gruneisen_parameter 8.58s call tests/io/test_phonopy.py::TestGruneisen::test_ph_bs_symm_line 4.29s call tests/io/test_phonopy.py::TestPhonopyParser::test_get_ph_bs 1.11s call tests/io/test_phonopy.py::TestThermalDisplacementMatrices::test_get_thermal_displacement_matrix 0.51s call tests/io/test_phonopy.py::TestGetDisplacedStructures::test_get_displaced_structures 0.12s call tests/io/test_phonopy.py::TestPhonopyParser::test_get_complete_dos 0.03s call tests/io/test_phonopy.py::TestPhonopyFromForceConstants::test_get_phonon_dos_from_fc 0.03s call tests/io/test_phonopy.py::TestPhonopyFromForceConstants::test_get_phonon_band_structure_symm_line_from_fc 0.03s call tests/io/test_phonopy.py::TestPhonopyFromForceConstants::test_get_phonon_band_structure_from_fc 0.01s call tests/io/test_phonopy.py::TestStructureConversion::test_structure_conversion 0.01s setup tests/io/test_phonopy.py::TestPhonopyParser::test_get_ph_bs (19 durations < 0.005s hidden. Use -vv to show these durations.) 4 failed, 7 passed in 42.69s ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4224/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4224/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4224", "html_url": "https://github.com/materialsproject/pymatgen/pull/4224", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4224.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4224.patch", "merged_at": "2024-12-12T22:33:14Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4226
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4226/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4226/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4226/events
https://github.com/materialsproject/pymatgen/pull/4226
2,741,152,122
PR_kwDOACgets6FSj1r
4,226
Fix file existence check in ChargemolAnalysis to verify directory instead.
{ "login": "lllangWV", "id": 120115419, "node_id": "U_kgDOByjQ2w", "avatar_url": "https://avatars.githubusercontent.com/u/120115419?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lllangWV", "html_url": "https://github.com/lllangWV", "followers_url": "https://api.github.com/users/lllangWV/followers", "following_url": "https://api.github.com/users/lllangWV/following{/other_user}", "gists_url": "https://api.github.com/users/lllangWV/gists{/gist_id}", "starred_url": "https://api.github.com/users/lllangWV/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lllangWV/subscriptions", "organizations_url": "https://api.github.com/users/lllangWV/orgs", "repos_url": "https://api.github.com/users/lllangWV/repos", "events_url": "https://api.github.com/users/lllangWV/events{/privacy}", "received_events_url": "https://api.github.com/users/lllangWV/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for flagging this @lllangWV \r\n\r\nTagging @mhsiron @Andrew-S-Rosen for this one, I haven't used the Chargemol functionality myself. Not clear how this worked previously if it is an error?", "Almost certainly this is the correct patch, although I must admit that I don't think I've used this function in a long time (likely before any refactoring). ", "> Not clear how this worked previously if it is an error?\r\n\r\nI guess this is an oversight from (very likely done by batch regular expression replacement or similar, as this part is not covered by unit test):\r\n- https://github.com/materialsproject/pymatgen/pull/3690\r\n", "Thanks." ]
2024-12-16T02:20:41
2025-04-20T19:39:28
2025-04-20T19:39:20Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
atomic_densities dir for chargemol is a dir not a file. I am working with chargemol in a high throughput context with Atomate2. When trying to perform chargemol calculations I could not get past `if not os.path.isfile(atomic_densities_path):`. I believe this is because if you provide a directory, which is what `atomic_densities_path` should be, this will always trigger preventing the operation. Unless I am wrong with the functioning of `os.path.isfile`. ## Summary Major changes: - feature 1: Changed isfile to isdir - fix 1: Changed isfile to isdir
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4226/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4226/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4226", "html_url": "https://github.com/materialsproject/pymatgen/pull/4226", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4226.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4226.patch", "merged_at": "2025-04-20T19:39:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4227
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4227/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4227/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4227/events
https://github.com/materialsproject/pymatgen/pull/4227
2,743,937,449
PR_kwDOACgets6FcK8Y
4,227
Bump `phonopy` to apply fix for NumPy 2 in Windows
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-17T05:01:01
2025-01-01T02:23:27
2024-12-31T22:18:28Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
- Bump `phonopy` to apply fix for NumPy 2 in Windows: - https://github.com/phonopy/phonopy/issues/476 - Drop Python < 3.10 check
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4227/reactions", "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4227/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4227", "html_url": "https://github.com/materialsproject/pymatgen/pull/4227", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4227.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4227.patch", "merged_at": "2024-12-31T22:18:28Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4228
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4228/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4228/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4228/events
https://github.com/materialsproject/pymatgen/pull/4228
2,744,246,475
PR_kwDOACgets6FdOxU
4,228
Replace some deprecated API
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks @DanielYang59!" ]
2024-12-17T08:25:40
2025-01-01T02:23:19
2024-12-31T22:18:09Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary Replace some deprecated API: - `spglib` dict interface - [x] Revert deprecation warning as error
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4228/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4228/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4228", "html_url": "https://github.com/materialsproject/pymatgen/pull/4228", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4228.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4228.patch", "merged_at": "2024-12-31T22:18:09Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4229
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4229/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4229/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4229/events
https://github.com/materialsproject/pymatgen/pull/4229
2,744,353,284
PR_kwDOACgets6FdmKf
4,229
AseAtomsAdaptor: Support arbitrary selective dynamics constraints
{ "login": "yantar92", "id": 10819266, "node_id": "MDQ6VXNlcjEwODE5MjY2", "avatar_url": "https://avatars.githubusercontent.com/u/10819266?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yantar92", "html_url": "https://github.com/yantar92", "followers_url": "https://api.github.com/users/yantar92/followers", "following_url": "https://api.github.com/users/yantar92/following{/other_user}", "gists_url": "https://api.github.com/users/yantar92/gists{/gist_id}", "starred_url": "https://api.github.com/users/yantar92/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yantar92/subscriptions", "organizations_url": "https://api.github.com/users/yantar92/orgs", "repos_url": "https://api.github.com/users/yantar92/repos", "events_url": "https://api.github.com/users/yantar92/events{/privacy}", "received_events_url": "https://api.github.com/users/yantar92/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi @yantar92, \r\n\r\n> I need directions to add tests.\r\n\r\nYou can use this example here:\r\nhttps://github.com/materialsproject/pymatgen/blob/da607e86f9ce8aec942067c6c1a4fda6e04915dd/tests/io/test_ase.py#L186-L203\r\n\r\nAlso can you detail how this is different than the existing `set_constraint` method? It looks like some ase classes being used there changed, does this change require an update to the ASE version?", "> Also can you detail how this is different than the existing `set_constraint` method? It looks like some ase classes being used there changed, does this change require an update to the ASE version?\r\n\r\nI replaced `FixAtoms` ASE constraint with `FixCartesian`. `FixCartesian` allows fixing individual coordinates while `FixAtoms` fixes everything.\r\n\r\n`FixCartesian`: https://gitlab.com/ase/ase/-/blob/master/ase/constraints.py?ref_type=heads#L835\r\n`FixAtoms`: https://gitlab.com/ase/ase/-/blob/master/ase/constraints.py?ref_type=heads#L208\r\n\r\n`FixCartesian` thus provides everything needed to implement \"selective dynamics\" from VASP. It is a strict superset of `FixAtoms`.\r\n\r\n`FixCartesian` is available in ASE since forever (introduced in e2e1799d5, 16 years ago). There should be no issues with compatibility.", "I added new tests now.", "Thanks." ]
2024-12-17T09:13:37
2025-01-09T16:44:24
2025-01-09T16:44:20Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - Implement full selective_dynamics support when converting to/from ASE atoms. ## Todos If this is work in progress, what else needs to be done? - I need directions to add tests. ## Checklist - [X] Google format doc strings added. Check with `ruff`. - [X] Type annotations included. Check with `mypy`. - [X] Tests added for new features/fixes. - [X] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4229/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4229/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4229", "html_url": "https://github.com/materialsproject/pymatgen/pull/4229", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4229.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4229.patch", "merged_at": "2025-01-09T16:44:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4230
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4230/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4230/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4230/events
https://github.com/materialsproject/pymatgen/issues/4230
2,753,173,248
I_kwDOACgets6kGhcA
4,230
Incorrect Default Symmetry Operation in P1 Space Group Returns Three Projection Operations Instead of Identity
{ "login": "ztn9709", "id": 96524963, "node_id": "U_kgDOBcDaow", "avatar_url": "https://avatars.githubusercontent.com/u/96524963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ztn9709", "html_url": "https://github.com/ztn9709", "followers_url": "https://api.github.com/users/ztn9709/followers", "following_url": "https://api.github.com/users/ztn9709/following{/other_user}", "gists_url": "https://api.github.com/users/ztn9709/gists{/gist_id}", "starred_url": "https://api.github.com/users/ztn9709/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ztn9709/subscriptions", "organizations_url": "https://api.github.com/users/ztn9709/orgs", "repos_url": "https://api.github.com/users/ztn9709/repos", "events_url": "https://api.github.com/users/ztn9709/events{/privacy}", "received_events_url": "https://api.github.com/users/ztn9709/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2024-12-20T17:33:28
2025-02-10T03:50:29
2025-02-10T03:50:29Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12 ### Pymatgen version 2024.10.29 ### Operating system version _No response_ ### Current behavior When a structure does not contain any _symmetry_equiv_pos_as_xyz keys and pymatgen defaults to the P1 space group, the code currently generates three symmetry operations based on ("x", "y", "z"). This results in three separate projection operations along each axis rather than a single identity operation, which P1 space group should have. in class `pymatgen.io.cif.CifParser`, method `get_symops` `if not sym_ops: msg = "No _symmetry_equiv_pos_as_xyz type key found. Defaulting to P1." warnings.warn(msg) self.warnings.append(msg) sym_ops = [SymmOp.from_xyz_str(s) for s in ("x", "y", "z")] ` ### Expected Behavior It should be: `sym_ops = [SymmOp.from_xyz_str(s) for s in ["x,y,z"]]` to get correct result. ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4230/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4230/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4231
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4231/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4231/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4231/events
https://github.com/materialsproject/pymatgen/issues/4231
2,753,545,773
I_kwDOACgets6kH8Yt
4,231
Mistake in regex string of ion_or_solid_comp_object leads to example string formula "Na[+]" failing
{ "login": "IsaacGentle", "id": 37002161, "node_id": "MDQ6VXNlcjM3MDAyMTYx", "avatar_url": "https://avatars.githubusercontent.com/u/37002161?v=4", "gravatar_id": "", "url": "https://api.github.com/users/IsaacGentle", "html_url": "https://github.com/IsaacGentle", "followers_url": "https://api.github.com/users/IsaacGentle/followers", "following_url": "https://api.github.com/users/IsaacGentle/following{/other_user}", "gists_url": "https://api.github.com/users/IsaacGentle/gists{/gist_id}", "starred_url": "https://api.github.com/users/IsaacGentle/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/IsaacGentle/subscriptions", "organizations_url": "https://api.github.com/users/IsaacGentle/orgs", "repos_url": "https://api.github.com/users/IsaacGentle/repos", "events_url": "https://api.github.com/users/IsaacGentle/events{/privacy}", "received_events_url": "https://api.github.com/users/IsaacGentle/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi @IsaacGentle thanks for reporting and I could confirm this issue. For a quick guide on making contributions to a project, you could checkout [the guide here](https://github.com/materialsproject/pymatgen/blob/master/docs/contributing.md).\r\n\r\nI could confirm your fix indeed work, but things looks more complex that this as some other formulas still don't work (for example `Cl[-]`).\r\n\r\nAlso the unit test for this helper method seems missing, so I might take over from here and fix this :) Thanks again for reporting and investigating.\r\n\r\n---\r\n\r\nA small tip, to share a code block, you could use the [permalink](https://stackoverflow.com/a/31282559/24021108) instead of copying the code block.\r\n\r\nAnother small tip, to show differences in code, you could [add `diff`](https://stackoverflow.com/a/40883538/24021108), which would look like:\r\n```diff\r\n- if re.match(r\"\\[([^\\[\\]]+)\\]|\\(aq\\)\", formula):\r\n+ if re.match(r\".*\\[([^\\[\\]]+)\\]|\\(aq\\)\", formula):\r\n```\r\n\r\n---\r\n\r\nUpdate: looks like [`ion_or_solid_comp_object` is not used across the code base at all](https://github.com/search?q=repo%3Amaterialsproject%2Fpymatgen%20ion_or_solid_comp_object&type=code), not sure about its use case, and it looks like a private helper method to me\r\n", "Hi @DanielYang59, thanks a lot for your comprehensive reply and helpful tips! Interesting that [ion_or_solid_comp_object](https://github.com/search?q=repo%3Amaterialsproject%2Fpymatgen%20ion_or_solid_comp_object&type=code) is not used across the code base. To add extra information about how I discovered this minor bug, I was use the pymatgen scripts to generate Pourbaix diagrams, but I was manually adding some of the ionic species using [ion_or_solid_comp_object](https://github.com/search?q=repo%3Amaterialsproject%2Fpymatgen%20ion_or_solid_comp_object&type=code).", "No problem at all. Thanks for sharing the context (though it still looks more like a private function to me, but I wouldn't rename it to private for now as I'm not super familiar with `pourbaix_diagram` module)\r\n\r\nHappy coding in the new year!\r\n" ]
2024-12-20T22:07:59
2025-01-09T16:45:23
2025-01-09T16:45:23Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.3 ### Pymatgen version 2024.11.13 ### Operating system version Windows 10 ### Current behavior The following code leads to an error (ValueError: + is an invalid formula!) ``` from pymatgen.analysis.pourbaix_diagram import ion_or_solid_comp_object fails = ion_or_solid_comp_object('Na[+]') ``` Even though the definition of ion_or_solid_comp_object states that the argument string should be formatted as 'Na[+]' ``` def ion_or_solid_comp_object(formula): """Get an Ion or Composition object given a formula. Args: formula: String formula. Eg. of ion: NaOH(aq), Na[+]; Eg. of solid: Fe2O3(s), Fe(s), Na2O Returns: Composition/Ion object """ if re.match(r"\[([^\[\]]+)\]|\(aq\)", formula): comp_obj = Ion.from_formula(formula) elif re.search(r"\(s\)", formula): comp_obj = Composition(formula[:-3]) else: comp_obj = Composition(formula) return comp_obj ``` In it's current form, the string needs to be '[+]Na' in order for it to work: ``` from pymatgen.analysis.pourbaix_diagram import ion_or_solid_comp_object works = ion_or_solid_comp_object('[+]Na') ``` ### Expected Behavior If 'Na[+]' is the desired string format, the definition of ion_or_solid_comp_object should be modified L398 of pourbaix_diagram.py is currently: ``` if re.match(r"\[([^\[\]]+)\]|\(aq\)", formula): ``` https://github.com/materialsproject/pymatgen/blob/da607e86f9ce8aec942067c6c1a4fda6e04915dd/src/pymatgen/analysis/pourbaix_diagram.py#L398C18-L398C19 I suggest replacement with ``` if re.match(r".*\[([^\[\]]+)\]|\(aq\)", formula): ``` I am not super familiar with git workflows and pull requests so I have sent this as an issue. Please advise if you think this is something that should be fixed and if you wish me to do a pull request :) ### Minimal example ```Python from pymatgen.analysis.pourbaix_diagram import ion_or_solid_comp_object works = ion_or_solid_comp_object('[+]Na') fails = ion_or_solid_comp_object('Na[+]') ``` ### Relevant files to reproduce this bug _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4231/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4231/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4232
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4232/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4232/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4232/events
https://github.com/materialsproject/pymatgen/issues/4232
2,755,644,686
I_kwDOACgets6kP80O
4,232
Wrong mapping of dielectric tasks in the mp-api
{ "login": "Nokimann", "id": 31014779, "node_id": "MDQ6VXNlcjMxMDE0Nzc5", "avatar_url": "https://avatars.githubusercontent.com/u/31014779?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Nokimann", "html_url": "https://github.com/Nokimann", "followers_url": "https://api.github.com/users/Nokimann/followers", "following_url": "https://api.github.com/users/Nokimann/following{/other_user}", "gists_url": "https://api.github.com/users/Nokimann/gists{/gist_id}", "starred_url": "https://api.github.com/users/Nokimann/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Nokimann/subscriptions", "organizations_url": "https://api.github.com/users/Nokimann/orgs", "repos_url": "https://api.github.com/users/Nokimann/repos", "events_url": "https://api.github.com/users/Nokimann/events{/privacy}", "received_events_url": "https://api.github.com/users/Nokimann/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "@Nokimann Hi thanks for reporting, this sounds like a MP API issue, if that's the case, could you please open this issue on the [API repo](https://github.com/materialsproject/api)?\r\n\r\n@tschaume Not sure if you could transfer the issue?", "@DanielYang59\r\n\r\nI opened this problem on [MP API](https://github.com/materialsproject/api/issues/960), so I'll close it.\r\n", "Thanks for reporting and sorry for the trouble, I don't have access to transfer the issue for you :)" ]
2024-12-23T09:47:19
2025-01-07T20:29:56
2025-01-07T20:29:56Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.2 ### Pymatgen version 2024.11.13 ### MP-API version mp-api 0.44.0 ### Operating system version Ubuntu 20.04.6 LTS ### Current behavior ``` with MPRester(api_key) as mpr: docs = mpr.materials.summary.search(material_ids='mp-16236') docs[0].origins ``` ``` [PropertyOrigin(name='structure', task_id=MPID(mp-2037117), last_updated=datetime.datetime(2021, 3, 13, 17, 36, 55, 731000)), PropertyOrigin(name='energy', task_id=MPID(mp-2037117), last_updated=datetime.datetime(2024, 12, 17, 0, 3, 31, 298000)), PropertyOrigin(name='magnetism', task_id=MPID(mp-2037117), last_updated=datetime.datetime(2021, 3, 13, 17, 36, 55, 731000)), PropertyOrigin(name='dielectric', task_id=MPID(mp-2420761), last_updated=datetime.datetime(2018, 12, 19, 22, 10, 16, 902000)), PropertyOrigin(name='absorption', task_id=MPID(mp-2420761), last_updated=datetime.datetime(2024, 11, 22, 6, 29, 0, 785000))] ``` When we see the dielectric task above, it shows `MPID(mp-2420761)` and `datetime.datetime(2021, 3, 13, 17, 36, 55, 731000))`. However, when we see the [Calculations](https://next-gen.materialsproject.org/materials/mp-16236/tasks?e_ionic_max=100&e_ionic_min=1&e_static_max=100&e_static_min=0&e_total_max=100&e_total_min=0&material_ids=mp-16236), it doesn't belong to the GGA DFPT Dielectric, i.e., `mp-1141549` with `Last Updated | December 19, 2018`, but to the GGA Deformation, i.e., `mp-2420761` with `Last Updated | October 07, 2023`. Thus, we also have slightly different structures. This example represents just one case, leading me to suspect that all of the dielectric task ID mappings may be wrong. ### Expected Behavior ``` [... PropertyOrigin(name='dielectric', task_id=MPID(mp-1141549), last_updated=datetime.datetime(2018, 12, 19, 22, 10, 16, 902000)), ...] ``` ### Minimal example ```Python with MPRester(api_key) as mpr: docs = mpr.materials.summary.search(material_ids='mp-16236') docs[0].origins ``` ### Relevant files to reproduce this bug _No response_
{ "login": "tschaume", "id": 1404564, "node_id": "MDQ6VXNlcjE0MDQ1NjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1404564?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tschaume", "html_url": "https://github.com/tschaume", "followers_url": "https://api.github.com/users/tschaume/followers", "following_url": "https://api.github.com/users/tschaume/following{/other_user}", "gists_url": "https://api.github.com/users/tschaume/gists{/gist_id}", "starred_url": "https://api.github.com/users/tschaume/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tschaume/subscriptions", "organizations_url": "https://api.github.com/users/tschaume/orgs", "repos_url": "https://api.github.com/users/tschaume/repos", "events_url": "https://api.github.com/users/tschaume/events{/privacy}", "received_events_url": "https://api.github.com/users/tschaume/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4232/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4232/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4233
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4233/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4233/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4233/events
https://github.com/materialsproject/pymatgen/pull/4233
2,756,264,573
PR_kwDOACgets6GF7EP
4,233
Fix ion formula check in `ion_or_solid_comp_object` of `analysis.pourbaix_diagram`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks.", "@DanielYang59 Removing `ELEMENTS_HO` in https://github.com/DanielYang59/pymatgen/commit/9551b5a14227be7ed295c0f2d020709f4f16bb66 was a breaking change, and needed to be mentioned in https://github.com/materialsproject/pymatgen/blob/master/docs/compatibility.md\r\n\r\nThis kind of change is not recommended since it can unnecessarily break downstream codes without a benefit in terms of bug fix or new functionality.\r\n\r\nThank you for fixing the regex!", "@mkhorton thanks for letting me know and sorry for the breakage, which I was already aware of in https://github.com/materialsproject/pymatgen/pull/4233#discussion_r1929392743\r\n\r\n> Removing ELEMENTS_HO in https://github.com/DanielYang59/pymatgen/commit/9551b5a14227be7ed295c0f2d020709f4f16bb66 was a breaking change\r\n\r\nYep I was aware it could potentially be breaking (thought it would unlikely be used from outside, and not covered by test as a public interface) and therefore **mentioned this in https://github.com/materialsproject/pymatgen/pull/4233#discussion_r1896587008, looks like I should be more explicit about this potential**\r\n\r\n> needed to be mentioned in https://github.com/materialsproject/pymatgen/blob/master/docs/compatibility.md\r\n\r\nThanks for the reminder, looks like this doc has been slipping my mind for previous breaking/deprecation changes. Would certainly keep this in mind.\r\n\r\n> This kind of change is not recommended since it can unnecessarily break downstream codes without a benefit in terms of bug fix or new functionality.\r\n\r\nWell received! I thought it was a misplaced class variable as it's quite weird for `analysis.pourbaix_diagram` to provide a definition of a set of two elements \r\n\r\nApologize again and would certainly be more careful about (potentially) breaking change" ]
2024-12-23T15:17:18
2025-01-27T09:03:31
2025-01-09T16:45:22Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix ion formula in `ion_or_solid_comp_object` of `analysis.pourbaix_diagram`, to fix #4231 - [x] Add tests - [x] Add type annotations
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4233/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4233/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4233", "html_url": "https://github.com/materialsproject/pymatgen/pull/4233", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4233.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4233.patch", "merged_at": "2025-01-09T16:45:22Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4234
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4234/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4234/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4234/events
https://github.com/materialsproject/pymatgen/pull/4234
2,757,681,998
PR_kwDOACgets6GKfeL
4,234
Drop GULP libs from code base
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks. This is an old file because we used to actually test the gulp functionality. This is now more or less defunct.", "No problem at all, yep we dropped the GULP binary but I forgot about these libs. \r\n\r\nAnd happy new year of course :)" ]
2024-12-24T12:03:13
2025-01-01T02:25:34
2024-12-31T22:16:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Drop GULP libs from code base and refactored `gulp_caller` to take potential file as arg, rationale: - `pymatgen` just provides an interface to other packages, but we don't need to carry the dependencies/libs for them?
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4234/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4234/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4234", "html_url": "https://github.com/materialsproject/pymatgen/pull/4234", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4234.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4234.patch", "merged_at": "2024-12-31T22:16:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4235
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4235/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4235/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4235/events
https://github.com/materialsproject/pymatgen/issues/4235
2,757,710,424
I_kwDOACgets6kX1JY
4,235
[Dev] Auto-merge is not working anymore, bad branch protection rules?
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "This should be fixed now. Though I generally do not use auto-merge much.", "Great to know. Thanks for fixing that :)" ]
2024-12-24T12:25:35
2025-01-18T02:48:43
2025-01-17T16:53:47Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
At some point [auto-merge is not working across `pymatgen`](https://github.com/materialsproject/pymatgen/pull/4102), according to @ab5424: > I think that the branch protection rules require a check under the name test (ubuntu-latest, >3.10, lowest-direct, ci,optional) to pass (hence the "Required" tag at the end of the line) but since that doesn't exist anymore so it can't report its status. Can you help check the settings please? @shyuep @mkhorton
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4235/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4235/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4236
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4236/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4236/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4236/events
https://github.com/materialsproject/pymatgen/pull/4236
2,759,857,671
PR_kwDOACgets6GQqDn
4,236
[Feature] Added Pure Random Algo to `OrderDisorderedStructureTransformation`
{ "login": "jmmshn", "id": 14003693, "node_id": "MDQ6VXNlcjE0MDAzNjkz", "avatar_url": "https://avatars.githubusercontent.com/u/14003693?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jmmshn", "html_url": "https://github.com/jmmshn", "followers_url": "https://api.github.com/users/jmmshn/followers", "following_url": "https://api.github.com/users/jmmshn/following{/other_user}", "gists_url": "https://api.github.com/users/jmmshn/gists{/gist_id}", "starred_url": "https://api.github.com/users/jmmshn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmmshn/subscriptions", "organizations_url": "https://api.github.com/users/jmmshn/orgs", "repos_url": "https://api.github.com/users/jmmshn/repos", "events_url": "https://api.github.com/users/jmmshn/events{/privacy}", "received_events_url": "https://api.github.com/users/jmmshn/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for the contribution." ]
2024-12-26T14:52:47
2024-12-31T22:16:29
2024-12-31T22:16:23Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Added Pure Random Algo to `OrderDisorderedStructureTransformation` The current implementation assume some oxidation and tries to evaluate and Ewald energy to get the ordered representation with the lowest energy. https://github.com/materialsproject/pymatgen/blob/da607e86f9ce8aec942067c6c1a4fda6e04915dd/src/pymatgen/transformations/standard_transformations.py#L558-L559 For large cells this has some disadvantages: ```python matrix = EwaldSummation(struct).total_energy_matrix # <<- This can run out of memory for cells with ~2000 atoms ewald_m = EwaldMinimizer(matrix, manipulations, n_to_return, self.algo) # <<- This takes hours for cells with ~200 atoms ``` We need some way to indiscriminately generate random structures without Ewald evaluation. Since for larger cells the value proposition of explicitly enumerating all the ordered representations and ranking them is dubious. This PR adds a purely random sampling method that will sample all allowed structures with equal probability. Major changes: - Added `ALGO_RANDOM=-1` for purely random sampling - Allows user to define the occupation tolerance `occ_tol` for if a ordered structure is valid representation of a disordered structure ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4236/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4236/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4236", "html_url": "https://github.com/materialsproject/pymatgen/pull/4236", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4236.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4236.patch", "merged_at": "2024-12-31T22:16:23Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4237
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4237/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4237/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4237/events
https://github.com/materialsproject/pymatgen/issues/4237
2,761,395,229
I_kwDOACgets6kl4wd
4,237
Issue #4033 appears again: outcar unable to parse magnetization
{ "login": "qchempku2017", "id": 28149881, "node_id": "MDQ6VXNlcjI4MTQ5ODgx", "avatar_url": "https://avatars.githubusercontent.com/u/28149881?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qchempku2017", "html_url": "https://github.com/qchempku2017", "followers_url": "https://api.github.com/users/qchempku2017/followers", "following_url": "https://api.github.com/users/qchempku2017/following{/other_user}", "gists_url": "https://api.github.com/users/qchempku2017/gists{/gist_id}", "starred_url": "https://api.github.com/users/qchempku2017/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qchempku2017/subscriptions", "organizations_url": "https://api.github.com/users/qchempku2017/orgs", "repos_url": "https://api.github.com/users/qchempku2017/repos", "events_url": "https://api.github.com/users/qchempku2017/events{/privacy}", "received_events_url": "https://api.github.com/users/qchempku2017/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I'm able to parse the magnetization with `pymatgen==2024.11.13`, can you try parsing on a non-windows machine to see if that's the issue?", "> I'm able to parse the magnetization with `pymatgen==2024.11.13`, can you try parsing on a non-windows machine to see if that's the issue?\r\n\r\nYes, the code can be parsed with Linux or on Bohrium's linux image nodes. I guess this issue is windows-specific again.", "@qchempku2017 Hi thanks for opening the issue\r\n\r\nThe patch https://github.com/materialsvirtuallab/monty/pull/712 should fix this issue for windows but it's not included in the `monty` v2024.12.10 release, and that's the reason #4068 is still marked as draft (and #4033 is not yet resolved). \r\n\r\nFeel free to ping me if that issue persists after #4068 is merged", "> @qchempku2017 Hi thanks for opening the issue\r\n> \r\n> The patch [materialsvirtuallab/monty#712](https://github.com/materialsvirtuallab/monty/pull/712) should fix this issue for windows but it's not included in the `monty` v2024.12.10 release, and that's the reason #4068 is still marked as draft (and #4033 is not yet resolved).\r\n> \r\n> Feel free to ping me if that issue persists after #4068 is merged\r\n\r\nThank you @DanielYang59. I'm looking forward to the release!", "@qchempku2017 [`monty 2025.1.3`](https://pypi.org/project/monty/) is out now and I believe this should resolve this issue. Let me know if otherwise.\r\n\r\nHappy coding :)", "> @qchempku2017 [`monty 2025.1.3`](https://pypi.org/project/monty/) is out now and I believe this should resolve this issue. Let me know if otherwise.\r\n> \r\n> Happy coding :)\r\n\r\nAll issues gone! Thank you very much!", "Great to know, and enjoy :)" ]
2024-12-28T02:05:09
2025-01-06T01:48:23
2025-01-05T07:26:22Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version python 3.11.0 and python 3.10.0 ### Pymatgen version 2024.11.13 ### Operating system version Windows 11 24H2 26100.2605 ### Current behavior Hi pymatgen developers, recently I am experiencing OUTCAR parsing issues again. After I performed a series of VASP calculations on Bohrium platform and downloaded the results to my local windows 11 laptop, I was unable to parse magnetization using pymatgen.vasp.io.outputs Outcar class through jupyter lab. Both python 3.10.0 and 3.11.0 did not work. `ocar = Outcar("./lfp-init-vasp-results/lfp-init-vasp-x-0.000-0/14017527/16068048/OUTCAR")` threw a few warnings: `C:\Users\66422\miniconda3\envs\matsci\lib\site-packages\pymatgen\io\vasp\outputs.py:2114: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686 with zopen(filename, mode="rt") as file: C:\Users\66422\miniconda3\envs\matsci\lib\site-packages\pymatgen\io\vasp\outputs.py:2365: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686 with zopen(self.filename, mode="rt") as file:` then calling ocar.magmetization gave me: `()` However, my Outcar file looks fine when opened with text editor: <img width="281" alt="image" src="https://github.com/user-attachments/assets/1464d45b-ab90-4d8d-b65f-3aed57bbff60" /> python version 3.11.0 and 3.10.0; pymatgen version 2024.11.13; monty version 2024.12.10, installed with pip in a conda environment, using Tsinghua University TUNA source. Even though this issue should in principle have been fixed after resolving #4033 with #4034 and #4068, it appeared again in my case. ### Expected Behavior I was expecting ocar.magentization call to yield something like: `({'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.023, 'p': 0.031, 'd': 4.302, 'tot': 4.357}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.004, 'p': 0.013, 'd': 0.0, 'tot': 0.016}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.011, 'p': 0.127, 'd': 0.0, 'tot': 0.138}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.008, 'p': 0.1, 'd': 0.0, 'tot': 0.108}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}, {'s': 0.007, 'p': 0.097, 'd': 0.0, 'tot': 0.104}) ` i.e., the same result I obtained when using Bohrium notebook. ### Minimal example _No response_ ### Relevant files to reproduce this bug [OUTCAR.zip](https://github.com/user-attachments/files/18264690/OUTCAR.zip) Please uncompress.
{ "login": "qchempku2017", "id": 28149881, "node_id": "MDQ6VXNlcjI4MTQ5ODgx", "avatar_url": "https://avatars.githubusercontent.com/u/28149881?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qchempku2017", "html_url": "https://github.com/qchempku2017", "followers_url": "https://api.github.com/users/qchempku2017/followers", "following_url": "https://api.github.com/users/qchempku2017/following{/other_user}", "gists_url": "https://api.github.com/users/qchempku2017/gists{/gist_id}", "starred_url": "https://api.github.com/users/qchempku2017/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qchempku2017/subscriptions", "organizations_url": "https://api.github.com/users/qchempku2017/orgs", "repos_url": "https://api.github.com/users/qchempku2017/repos", "events_url": "https://api.github.com/users/qchempku2017/events{/privacy}", "received_events_url": "https://api.github.com/users/qchempku2017/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4237/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4237/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4239
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4239/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4239/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4239/events
https://github.com/materialsproject/pymatgen/pull/4239
2,762,233,247
PR_kwDOACgets6GYiGO
4,239
Fix DOS parsing for SOC calculations
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Just to show it now in action, only `Spin.up` arrays present as desired:\r\n<img width=\"790\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5c1d7d58-ea2a-469b-b669-97d064856967\" />\r\n", "Many thanks for fixing this." ]
2024-12-29T12:34:53
2024-12-31T22:15:18
2024-12-31T22:15:11Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Currently, `pymatgen` does not correctly parse the density of states (DOS) from VASP SOC calculations. This issue was alluded to in https://github.com/materialsproject/pymatgen/issues/1540 & https://github.com/materialsproject/pymatgen/issues/1600. The `tdos`, `idos`, `complete_dos`, and `pdos` attributes of `Vasprun` give arrays for both `Spin.up` and `Spin.down`, but only `Spin.up` should be present for SOC calculations. Looking at the code, this is found to be the result of `pymatgen`'s `Vasprun` parser (in `_parse_dos()`) assuming that spin arrays other than `"spin 1"` are `Spin.down`, which is true for non-SOC calculations but in SOC calculations "spins" 2-4 are the x/y/z spin projections of the SOC DOS (see https://www.vasp.at/wiki/index.php/LSORBIT): https://github.com/materialsproject/pymatgen/blob/aab23ff5764ff88057f643f7eca40a5bf81f5aac/src/pymatgen/io/vasp/outputs.py#L1621-L1626 This is fixed here by first checking if it is a SOC calculation (by checking the number of `"spin X"` arrays), and only parsing the first, `Spin.up`, array if it is a SOC calculation, for both `tdos`/`idos` and `pdos`s. This also has the benefit of making `Vasprun` parsing about 10% faster for SOC calculations from my testing. I also added a test for this fixed parsing (note there was no other SOC `vasprun.xml` parsing test in the `pymatgen` tests prior to this). https://github.com/materialsproject/pymatgen/blob/f67bf28f011506545b31141e48e9445600cf551a/src/pymatgen/io/vasp/outputs.py#L1634-L1642 ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [x] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4239/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4239/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4239", "html_url": "https://github.com/materialsproject/pymatgen/pull/4239", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4239.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4239.patch", "merged_at": "2024-12-31T22:15:11Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4240
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4240/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4240/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4240/events
https://github.com/materialsproject/pymatgen/pull/4240
2,762,263,629
PR_kwDOACgets6GYoQP
4,240
Minor update to make `FermiDos` more robust
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 4704350623, "node_id": "LA_kwDOACgets8AAAABGGaxnw", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/awaiting%20user", "name": "awaiting user", "color": "b60205", "default": false, "description": "Needs more information from OP." } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks. Can you add a unittest for the functionality pls?", "Done! Didn't add one at first as it _should_ be a relatively rare case where this actually matters (e.g. Dirac cone systems or toy test cases), but added now!\r\nSome tests seem to be failing for unrelated reasons", "Are you sure they're unrelated? I see e.g.\r\n\r\n```\r\n def test_get_gap(self):\r\n> assert self.dos.get_gap() == approx(2.0589, abs=1e-4)\r\nE assert np.float64(2.3163) == 2.0589 � 1.0e-04\r\nE \r\nE comparison failed\r\nE Obtained: 2.3163\r\nE Expected: 2.0589 � 1.0e-04\r\n```\r\n\r\nThanks for the PR!", "@mkhorton ah yes sorry! I just looked at one failing test and it seemed to be something different.\r\n\r\nI've fixed that one now, and it's a nice validation as it now gives a `Dos.get_gap()` value which better matches the `eigenvalue_band_properties` result (which is typically the most reliable).", "Hi @kavanase and @shyuep - was this change intended to only impact `FermiDos`? The changes are made to the parent classes and are now changing parsed bandgaps in the Materials Project (noticed this from failing CI in `emmet`) which **don't** use `FermiDos`\r\n\r\nMaybe this scheme is more accurate and I need to investigate if that's the case - either way, if the intention was not to impact other classes besides `FermiDos`, I'd ilke to get this fixed quickly\r\n\r\nJust to add onto this, I don't get the sense that the new scheme is particularly more accurate. Looking at actual DOSes and seeing where the old and new CBM / VBM identification places them, the older scheme tends to do better:\r\n[mp-149_dos.pdf](https://github.com/user-attachments/files/18592242/mp-149_dos.pdf)\r\n[mp-19419_dos.pdf](https://github.com/user-attachments/files/18592243/mp-19419_dos.pdf)\r\n", "Hi @esoteric-ephemera,\r\nThe change was intended to affect all `Dos` objects, to be more accurate for gap determination. For the tests in `pymatgen` and other test cases in [`doped`](https://doped.readthedocs.io/en/latest/), the updated code seemed to be more accurate, but yes from the plots you attach the legacy scheme is def better...\r\n\r\nSome of the additional commits on top of the base ones may have adversely affected things. I can investigate and do some more testing; would you be able to link the failing CI and/or share the code you're using to generate those DOS plots?\r\nApologies for this!\r\nThanks!", "Thanks for the quick reply! In general, the issue is the coarseness of the DOS grid. Good practice would be adjusting EMIN, EMAX, and NEDOS to place the Fermi level on a point on the DOS grid with a finer DOS spacing. But for coarser DOS calcs, probably best to do averaging to get a \"more-accurate\" CBM and VBM position\r\n\r\nHere's the [failing CI](https://github.com/materialsproject/emmet/actions/runs/13021746454/job/36323663986) link, and the code I used (the `legacy` kwarg switches between the previous behavior and the one you implemented):\r\n```python\r\nfrom mp_api.client import MPRester\r\nimport matplotlib.pyplot as plt\r\n\r\nwith MPRester() as mpr:\r\n mp_dos = {\r\n f\"mp-{mpid}\": mpr.get_dos_by_material_id(f\"mp-{mpid}\")\r\n for mpid in (149, 19419,)\r\n }\r\n\r\ndef plot_dos(mpid, dos):\r\n plt.cla()\r\n plt.clf()\r\n plt.close()\r\n _, ax = plt.subplots(figsize=(6,4))\r\n\r\n gap = max(\r\n sum((-1)**i * v for i, v in enumerate(dos.get_cbm_vbm(legacy=legacy)))\r\n for legacy in (True,False)\r\n )\r\n xbds = (- 0.75, gap + 0.75)\r\n\r\n ybds = [float(\"inf\"),-float(\"inf\")]\r\n for spin, sr_dos in dos.densities.items():\r\n if spin.name == \"up\":\r\n c = \"tab:blue\"\r\n ls = \"-\"\r\n else:\r\n c = \"tab:orange\"\r\n ls = \"--\"\r\n ax.plot(dos.energies - dos.efermi, sr_dos, label = f\"Spin-{spin.name} DOS\", color =c, linestyle=ls)\r\n msk = (xbds[0] <= dos.energies - dos.efermi ) & (dos.energies - dos.efermi <= xbds[1])\r\n ybds[0] = min(ybds[0],sr_dos[msk].min())\r\n ybds[1] = max(ybds[0],sr_dos[msk].max())\r\n\r\n ax.set_xlim(*xbds)\r\n ybds = tuple(1.1*v for v in ybds)\r\n ax.set_ylim(*ybds)\r\n\r\n for i, legacy in enumerate([True,False]):\r\n cbm, vbm = dos.get_cbm_vbm(legacy=legacy)\r\n ax.vlines([cbm - dos.efermi, vbm - dos.efermi], *ybds, color=\"k\" if i == 0 else \"tab:green\",label = \"Legacy scheme\" if i == 0 else \"New scheme\",linestyle=\":\")\r\n\r\n ax.legend(fontsize=10,frameon=False,loc=\"upper center\",title=f\"{mpid} ({dos.structure.formula})\")\r\n ax.set_xlabel(\"Energy - $\\\\varepsilon_\\\\mathrm{F}$ (eV)\", fontsize=12)\r\n ax.set_ylabel(\"DOS (eV$^{-1}$)\",fontsize=12)\r\n plt.savefig(f\"{mpid}_dos.pdf\")\r\n\r\nfor mpid, dos in mp_dos.items():\r\n plot_dos(mpid, dos)\r\n```", "@esoteric-ephemera sorry I was pulled away by other commitments and this ended up getting pushed down the list.\r\n\r\nI've had a chance to properly look at this now -- thank you very much for sharing that code, made it much quicker to see what was going on! I agree with what you say, the fundamental issue (and only case where these minor changes really matter) is dealing with a coarse DOS grid, and extracting a reasonable choice of VBM/CBM from this.\r\n\r\nThe difference between the legacy/new code is essentially that the legacy code lowest/highest zero-DOS points (below `tol`) in the gap as the VBM/CBM, while the new code takes the first non-zero-DOS points (above `tol`) as the VBM/CBM -- this difference is made clear by adding plot markers to your DOS plots:\r\n\r\n<img width=\"989\" alt=\"image\" src=\"https://github.com/user-attachments/assets/024273fb-0f35-4187-8888-eb478247a6b9\" />\r\n\r\n<img width=\"962\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0f24faf8-a162-4bc5-aad0-09a2eb5e7a43\" />\r\n\r\n<img width=\"983\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c0514b8e-9c8a-4e94-9373-d68ce8aaf4ea\" />\r\n\r\nIn the cases I had tested and seen, the latter was the better/more accurate choice, but this clearly depends on the case. As you say, some sort of averaging presumably gives the more accurate guess (either averaging over these two choices, or smarter by taking the linear interpolation and picking the point at which the interpolated DOS hits the `tol` value). An issue with this, is then that the returned VBM/CBM eigenvalues don't directly correspond to a specific index in the DOS... but I think this is ok, as from what I can see the `Dos` code doesn't rely on this, and when `FermiDos` gets the VBM/CBM indices for doping calculations, it doesn't rely on the VBM/CBM eigenvalue directly corresponding to an index (instead just gets the closest index to it):\r\nhttps://github.com/materialsproject/pymatgen/blob/master/src/pymatgen/electronic_structure/dos.py#L483-L486\r\n\r\n [mp-19419_dos_zoomed.pdf](https://github.com/user-attachments/files/18757163/mp-19419_dos_zoomed.pdf)\r\n[mp-149_dos_zoomed.pdf](https://github.com/user-attachments/files/18757164/mp-149_dos_zoomed.pdf)\r\n[mp-19419_dos.pdf](https://github.com/user-attachments/files/18757165/mp-19419_dos.pdf)\r\n[mp-149_dos.pdf](https://github.com/user-attachments/files/18757166/mp-149_dos.pdf)\r\n", "I will try quickly implementing the interpolation-approach mentioned, if we agree that's the best option then?", "Implementing this new interpolated scheme gives basically the same results as the legacy scheme here, because the DOS is going from ~0.1 to 0, and the default `tol` is 1e-4, so interpolating across this gives a point basically right beside the 0-point\r\n\r\n<img width=\"968\" alt=\"image\" src=\"https://github.com/user-attachments/assets/dde7ce15-2c6e-4994-ad86-f25dac50c56c\" />\r\n<img width=\"981\" alt=\"image\" src=\"https://github.com/user-attachments/assets/23892beb-2acc-4b5f-bb99-856aae79ab74\" />\r\n", "@esoteric-ephemera I believe the issues you noted before should all now be sorted with the latest versions of `pymatgen` (from https://github.com/materialsproject/pymatgen/pull/4288, https://github.com/materialsproject/pymatgen/pull/4299), so the `pymatgen` version pin in `emmet-core` (https://github.com/materialsproject/emmet/commit/afc7495858c140da61d79bc82079100b545015a0) can be removed?", "Hey @kavanase, thanks for the fixes! Yes we [just released](https://github.com/materialsproject/emmet/pull/1206) the version pin on `pymatgen` in `emmet-core`. Since we're planning a release of new data, I think we'll wait to update how electronic structure is parsed, but from what I can tell, the differences introduced by this change are pretty small and sensible (e.g., in materials with zero gap, the CBM and VBM are correctly identical now)", "Ok cool!" ]
2024-12-29T13:59:35
2025-04-02T00:14:10
2025-01-17T17:36:40Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
This is a minor fix to the `get_doping` method in `FermiDos` to make it a little more robust, so that it can handle rare cases where there is only either 0 or 1 energy increments between the VBM and CBM indices (e.g. Dirac cone systems or toy test cases). This is done by starting the CB integral (for electron concentrations) from either the mid-gap index or, if mid-gap index is the VBM, from VBM+1 (= CBM index), and vice versa for the VB integral for hole concentrations.
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4240/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4240/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4240", "html_url": "https://github.com/materialsproject/pymatgen/pull/4240", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4240.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4240.patch", "merged_at": "2025-01-17T17:36:39Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4241
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4241/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4241/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4241/events
https://github.com/materialsproject/pymatgen/issues/4241
2,764,801,071
I_kwDOACgets6ky4Qv
4,241
Monthly issue metrics report
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-01T02:53:14
2025-01-17T16:46:52
2025-01-17T16:46:52Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
# Issue Metrics | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | | Time to first response | 17:18:02 | 4:51:09 | 1 day, 20:53:25 | | Time to close | 1 day, 6:49:59 | 1 day, 6:49:59 | 1 day, 6:49:59 | | Time to answer | None | None | None | | Metric | Count | | --- | ---: | | Number of items that remain open | 9 | | Number of items closed | 1 | | Number of most active mentors | 0 | | Total number of items created | 10 | | Title | URL | Author | Time to first response | Time to close | Time to answer | | --- | --- | --- | --- | --- | --- | | Issue #4033 appears again: outcar unable to parse magnetization | https://github.com/materialsproject/pymatgen/issues/4237 | [qchempku2017](https://github.com/qchempku2017) | 14:49:44 | None | None | | [Dev] Auto-merge is not working anymore, bad branch protection rules? | https://github.com/materialsproject/pymatgen/issues/4235 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | Wrong mapping of dielectric tasks in the mp-api | https://github.com/materialsproject/pymatgen/issues/4232 | [Nokimann](https://github.com/Nokimann) | 4:51:09 | None | None | | Mistake in regex string of ion_or_solid_comp_object leads to example string formula "Na[+]" failing | https://github.com/materialsproject/pymatgen/issues/4231 | [IsaacGentle](https://github.com/IsaacGentle) | 2 days, 16:55:53 | None | None | | Incorrect Default Symmetry Operation in P1 Space Group Returns Three Projection Operations Instead of Identity | https://github.com/materialsproject/pymatgen/issues/4230 | [ztn9709](https://github.com/ztn9709) | None | None | None | | Specify equivalent sites included in different unit cells in `get_miller_index_from_site_indexes` of the `Structure` class | https://github.com/materialsproject/pymatgen/issues/4220 | [ShotaNamerikawa](https://github.com/ShotaNamerikawa) | None | None | None | | Consider 'LSORBIT = True', how to use pymatgen plot element-project-DOS? | https://github.com/materialsproject/pymatgen/issues/4216 | [phyfang](https://github.com/phyfang) | None | None | None | | Cannot init `Cohpcar` in `matgenb ` example notebook: `ValueError: setting an array element with a sequence.` | https://github.com/materialsproject/pymatgen/issues/4215 | [DanielYang59](https://github.com/DanielYang59) | 0:06:44 | None | None | | For band structure, how to correctly display the symbol of the \Gamma point | https://github.com/materialsproject/pymatgen/issues/4214 | [phyfang](https://github.com/phyfang) | 1:46:41 | 1 day, 6:49:59 | None | | Monthly issue metrics report | https://github.com/materialsproject/pymatgen/issues/4211 | [github-actions[bot]](https://github.com/github-actions[bot]) | None | None | None | _This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_ Search query used to find these items: `repo:materialsproject/pymatgen is:issue created:2024-12-01..2024-12-31 -reason:"not planned"`
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4241/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4241/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4242
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4242/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4242/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4242/events
https://github.com/materialsproject/pymatgen/pull/4242
2,765,841,062
PR_kwDOACgets6Gkf0g
4,242
Remove `is_rare_earth_metal` from `ElementBase` (periodic_table.py)
{ "login": "jdewasseigeosium", "id": 165780039, "node_id": "U_kgDOCeGaRw", "avatar_url": "https://avatars.githubusercontent.com/u/165780039?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jdewasseigeosium", "html_url": "https://github.com/jdewasseigeosium", "followers_url": "https://api.github.com/users/jdewasseigeosium/followers", "following_url": "https://api.github.com/users/jdewasseigeosium/following{/other_user}", "gists_url": "https://api.github.com/users/jdewasseigeosium/gists{/gist_id}", "starred_url": "https://api.github.com/users/jdewasseigeosium/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdewasseigeosium/subscriptions", "organizations_url": "https://api.github.com/users/jdewasseigeosium/orgs", "repos_url": "https://api.github.com/users/jdewasseigeosium/repos", "events_url": "https://api.github.com/users/jdewasseigeosium/events{/privacy}", "received_events_url": "https://api.github.com/users/jdewasseigeosium/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "this will close #4243 ", "It would be great if this could be merged. Currently, all our imports from pymatgen where composition is used lead to failures. Additionally, a new release would be very helpful.\r\n\r\nThank you!" ]
2025-01-02T11:08:48
2025-01-07T21:47:25
2025-01-07T21:47:25Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Remove deprecated `is_rare_earth_metal` from `ElementBase` in periodic_table.py. This function was deprecated [here](https://github.com/materialsproject/pymatgen/blob/1abc45936f839369854399369bc966732f85bf08/docs/CHANGES.md?plain=1#L342) since end of May 2024. Confirming it’s not used anymore elsewhere in the code & I removed it from the docs as well. I just removed one line from docs/pymatgen.md but it seems like git interpreted it as more. Major changes: - fix 1: remove deprecated function `is_rare_earth_metal` from `ElementBase` ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [x] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4242/reactions", "total_count": 5, "+1": 5, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4242/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4242", "html_url": "https://github.com/materialsproject/pymatgen/pull/4242", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4242.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4242.patch", "merged_at": "2025-01-07T21:47:25Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4243
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4243/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4243/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4243/events
https://github.com/materialsproject/pymatgen/issues/4243
2,766,264,871
I_kwDOACgets6k4don
4,243
Remove `is_rare_earth_metal`
{ "login": "jevandezande", "id": 1891336, "node_id": "MDQ6VXNlcjE4OTEzMzY=", "avatar_url": "https://avatars.githubusercontent.com/u/1891336?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jevandezande", "html_url": "https://github.com/jevandezande", "followers_url": "https://api.github.com/users/jevandezande/followers", "following_url": "https://api.github.com/users/jevandezande/following{/other_user}", "gists_url": "https://api.github.com/users/jevandezande/gists{/gist_id}", "starred_url": "https://api.github.com/users/jevandezande/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jevandezande/subscriptions", "organizations_url": "https://api.github.com/users/jevandezande/orgs", "repos_url": "https://api.github.com/users/jevandezande/repos", "events_url": "https://api.github.com/users/jevandezande/events{/privacy}", "received_events_url": "https://api.github.com/users/jevandezande/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "CI failing on downstream packages \r\n\r\nhttps://github.com/JaGeo/LobsterPy/pull/357", "Happy new year and sorry guys for the first bug of 2025, looks like [the repo checking mechanism in `monty.dev.deprecated` is not doing what I expected it to do](https://github.com/materialsvirtuallab/monty/blob/26acf0b2900b5074143ed64ccd1bdea6ba9f6705/src/monty/dev.py#L54-L74)\r\n\r\nIt should only raise the warning as error in the code owner's repo (in this case it should only error out in `pymatgen`'s CI not forks) but apparently it's also triggered elsewhere, would fix this from `monty`'s side ASAP ", "Came here to report this, surely it should not \"raise\" a `DeprecationWarning` at all, but warn? This way the pymatgen CI can still error on it, but it allows downstream providers to configure it to be ignored. Having something time limited like this is also really unpleasant for dependencies -- especially since it triggers on import rather than use -- as using older versions of this package that may have been operating completely fine will now error out.", "Hi @ml-evs happy new year, thanks for the comment :)\r\n\r\n> surely it should not \"raise\" a DeprecationWarning at all, but warn? This way the pymatgen CI can still error on it, but it allows downstream providers to configure it to be ignored.\r\n\r\nI believe this was intended to be raised such that it would error out in the code owner's repo as a reminder for action (though apparently it's not doing what we wanted). \r\n\r\nHowever I just realized in https://github.com/materialsvirtuallab/monty/pull/735 that this may not be (easily) possible as a downstream package could use a deprecated upstream function/class and still get this warning/error in its `upstream` CI (unless we check the call stack depth but this sounds a bit fragile). \r\n\r\nAlso even as a warning, `downstream` would have to filter out such warning, it still could be annoying because:\r\n- This warning is not helpful/actionable for downstream package (they cannot remove a deprecated upstream function/class) \r\n- I wish to limit this to the code owner and minimize actions needed by downstream packages (including adding such filters), it was intended as a reminder for the specific package\r\n\r\nBut I cannot think of a way to resolve this at this moment. So perhaps let's drop this `deadline` warning/error altogether for now (still keep the deadline in the decorator and msg as a reminder) until someone has a way around this? \r\n", "Agree this needs to be fixed at the monty level (and ideally urgently), as right now it renders every old pymatgen version unusable. I don't understand the rationale for raising, most packages should run their tests with warnings as errors and maintain a list of allowed warnings for deprecations (this should be a conscious choice). I guess pymatgen doesn't currently do this in its CI given the mulititude of warnings that arise; instead you could add something like \r\n\r\n```\r\n[tool.pytest.ini_options]\r\nfilterwarnings = [\r\n \"ignore\", # essentially the current behaviour\r\n \"error:.*This function should have been removed.*:DeprecationWarning\"\r\n]\r\n```\r\nto mimic the current behaviour without breaking downstream packages.\r\n\r\nI understand the motivation behind the deadline but it really should be a choice whether it is obeyed -- I would also much prefer monty to not poke around with my git settings or make system calls when checking this. I wouldn't be against it warning in every scenario though, though preferably this decorator should only trigger when the function is called, rather than imported.", "> I don't understand the rationale for raising, most packages should run their tests with warnings as errors and maintain a list of allowed warnings for deprecations (this should be a conscious choice). \r\n\r\nI agree that was a bad decision, warn would be much gentle\r\n\r\n> I guess pymatgen doesn't currently do this in its CI given the mulititude of warnings that arise; instead you could add something like\r\n\r\nThanks for the input, pymatgen does have this filter but we could/should have been more careful about that `monty` decision in the first place, apologize again: https://github.com/materialsproject/pymatgen/blob/1abc45936f839369854399369bc966732f85bf08/pyproject.toml#L246-L257\r\n\r\n> I understand the motivation behind the deadline but it really should be a choice whether it is obeyed -- I would also much prefer monty to not poke around with my git settings or make system calls when checking this. I wouldn't be against it warning in every scenario though\r\n\r\nI believe such config checking was intended to minimize impact to repos other than the code owner's (apparently I failed to achieve this goal) because other than that we didn't come up with a solution to decide the code owner. \r\n\r\nPerhaps let's drop this warning altogether for now (as a hot fix) and implement better solutions later if there's any. I personally would prefer not be broadcast such a warning at all if I cannot find a way to confine such warning to its desired audience (and do a manual check of \"overdue\" deprecation from time to time maybe).\r\n", "> Perhaps let's drop this warning altogether for now (as a hot fix) and implement better solutions later if there's any. I personally would prefer not be broadcast such a warning at all if I cannot find a way to confine such warning to its desired audience (and do a manual check of \"overdue\" deprecation from time to time maybe).\r\n\r\nThat's fair enough, its a tricky balance and I appreciate the aim of all of this was a noble one! \r\n", "For anyone who might have been impacted by this oversight (@JaGeo @chiang-yuan and perhaps more), my apologize again.\r\n\r\nA new `monty` release is out ([v2025.1.3](https://github.com/materialsvirtuallab/monty/releases/tag/v2025.1.3)) and this issue should be gone now (unless some other dependency resolution strategy is used, otherwise I believe a latest compatible dependency would be selected at least for `pip`).\r\n\r\nHappy coding in the new year :)\r\n", "> For anyone who might have been impacted by this oversight (@JaGeo @chiang-yuan and perhaps more), my apologize again.\r\n> \r\n> A new `monty` release is out ([v2025.1.3](https://github.com/materialsvirtuallab/monty/releases/tag/v2025.1.3)) and this issue should be gone now (unless some other dependency resolution strategy is used, otherwise I believe a latest compatible dependency would be selected at least for `pip`).\r\n> \r\n> Happy coding in the new year :)\r\n\r\nThanks of the quick fix, @DanielYang59!\r\n\r\nIs there any chance the changes to `monty`, or changes to `pymatgen` resolving this issue, could be backported to a combination of versions that still supports Python 3.9? The software I work on hasn't quite dropped support yet (and `pymatgen`/`monty` are only even sub-dependencies currently), so we still depend on `monty` 2024.10.21 and `pymatgen` 2024.8.9.\r\n\r\nWe do intend to drop support relatively soon, but I'd rather not be rushed into the decision.", "No problem @ElliottKasoar \r\n\r\n> Is there any chance the changes to monty, or changes to pymatgen resolving this issue, could be backported to a combination of versions that still supports Python 3.9? The software I work on hasn't quite dropped support yet (and pymatgen/monty are only even sub-dependencies currently), so we still depend on monty 2024.10.21 and pymatgen 2024.8.9.\r\n\r\nI'm not a maintainer of either package and thus unfortunately this decision is not really mine sorry. `pymatgen` now follows the NumPy Python support scheme which means we intend not to support Python <= 3.9. \r\n\r\nWould the other workaround be possible for you to temporarily remove the `CI` environment variable (as the deprecation check only runs when `CI` is detected). If this doesn't work for your case, I would think about another way around if possible : \r\n```python\r\nif (\r\n _deadline is not None\r\n and os.getenv(\"CI\") is not None\r\n and datetime.now() > _deadline\r\n and _is_in_owner_repo()\r\n):\r\n```\r\n", "@ElliottKasoar I think it is best if you continue to use an older version of pymatgen and numpy that supports Py3.9. 3.9 is VERY old. We cannot keep supporting it. For most functionality, there isn't going to be a difference between the latest version of pymatgen and something from a year ago.", "> I'm not a maintainer of either package and thus unfortunately this decision is not really mine sorry. `pymatgen` now follows the NumPy Python support scheme which means we intend not to support Python <= 3.9.\r\n> \r\n> Would the other workaround be possible for you to temporarily remove the `CI` environment variable (as the deprecation check only runs when `CI` is detected). If this doesn't work for your case, I would think about another way around if possible :\r\n> \r\n> ```python\r\n> if (\r\n> _deadline is not None\r\n> and os.getenv(\"CI\") is not None\r\n> and datetime.now() > _deadline\r\n> and _is_in_owner_repo()\r\n> ):\r\n> ```\r\n\r\nNo problem at all, thanks for the suggestion, @DanielYang59! I was hoping to avoid changing environment variables, which may have knock-on effects, but it's probably the best temporary solution.\r\n\r\nEdit: Just a note on this for reference, from the [GitHub Actions docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables:):\r\n\r\n> You can't overwrite the value of the default environment variables named GITHUB_* and RUNNER_*. Currently you can overwrite the value of the CI variable. However, it's not guaranteed that this will always be possible.\r\n\r\nso (not intended as a criticism of the suggestion!) some fixes along these lines may not remain as viable solutions.\r\n\r\n> @ElliottKasoar I think it is best if you continue to use an older version of pymatgen and numpy that supports Py3.9. 3.9 is VERY old. We cannot keep supporting it. For most functionality, there isn't going to be a difference between the latest version of pymatgen and something from a year ago.\r\n\r\n@shyuep, as I mentioned, we have still been using `pymatgen` 2024.8.9 (as a sub-dependency) without issues. I completely understand the decision to drop support for 3.9 for releases since then, following NEP29.\r\n\r\nI was asking whether an exception might be made in this case, as this issue permanently breaks the CI for anyone using a `pymatgen` release ~5 months old, and a version of Python that isn't yet end-of-life, but it's ok if not.\r\n\r\nLess importantly, and unrelated to whether or not fixes are backported, but can I also ask, what is the intent behind the deprecation warning for `is_rare_earth_metal`? It may not be a CI-breaking issue since the `monty` fix, but surely this (GitHub) issue is relevant until the property is removed, or the due date updated?", "> Less importantly, and unrelated to whether or not fixes are backported, but can I also ask, what is the intent behind the deprecation warning for is_rare_earth_metal?\r\n\r\nIf I understand your question correct, this was referring to the reason to replace `is_rare_earth_metal` with `is_rare_earth`? You could checkout the PR for full discussion here: \r\n- https://github.com/materialsproject/pymatgen/pull/3817\r\n\r\nBasically the original `is_rare_earth_metal` property doesn't consider Y and Sc as rare earth metal, which doesn't agree with standard bodies like IUPAC\r\n\r\n", "It seems to me that the error is thrown on Python 3.9 just when pymatgen is imported.\r\n\r\n```\r\n from pymatgen.io.vasp.inputs import Incar\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/io/vasp/__init__.py\", line 10, in <module>\r\n from .inputs import Incar, Kpoints, Poscar, Potcar, PotcarSingle, VaspInput\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/io/vasp/inputs.py\", line 35, in <module>\r\n from pymatgen.core import SETTINGS, Element, Lattice, Structure, get_el_sp\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/core/__init__.py\", line 12, in <module>\r\n from pymatgen.core.composition import Composition\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/core/composition.py\", line 22, in <module>\r\n from pymatgen.core.periodic_table import DummySpecies, Element, ElementType, Species, get_el_sp\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py\", line 63, in <module>\r\n class ElementBase(Enum):\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py\", line 755, in ElementBase\r\n @deprecated(is_rare_earth, message=\"is_rare_earth is corrected to include Y and Sc.\", deadline=(2025, 1, 1))\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/monty/dev.py\", line 157, in deprecated\r\n raise_deadline_warning()\r\n File \"/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/monty/dev.py\", line 86, in raise_deadline_warning\r\n raise DeprecationWarning(\r\nDeprecationWarning: This function should have been removed on 2025-01-01.\r\n```", "> temporarily remove the `CI` environment variable\r\n\r\nIt doesn't work for me.", "@njzjz Hi thanks for the feedback. Can you double check the way you \"unset\" environment variable? Looks like in https://github.com/deepmodeling/dpgen/pull/1704/files you set it to `\"\"` (empty string) which doesn't \"unset it\".\r\n\r\nAFAIK, you might need to do an explicit unset with `unset CI` ~~or set it to `null` in yaml (instead of some other \"falsy\" string)~~. Let me know it this doesn't work.\r\n\r\nSorry for the trouble again\r\n", "> you set it to `\"\"` (empty string) which doesn't \"unset it\".\r\n\r\nOh I got your meaning.\r\n\r\n----\r\n\r\nThanks, it now works.", "> > Less importantly, and unrelated to whether or not fixes are backported, but can I also ask, what is the intent behind the deprecation warning for is_rare_earth_metal?\r\n> \r\n> If I understand your question correct, this was referring to the reason to replace `is_rare_earth_metal` with `is_rare_earth`? You could checkout the PR for full discussion here:\r\n> \r\n> * [[Deprecation] Replace `Element` property `is_rare_earth_metal` with `is_rare_earth` to include Y and Sc  #3817](https://github.com/materialsproject/pymatgen/pull/3817)\r\n> \r\n> Basically the original `is_rare_earth_metal` property doesn't consider Y and Sc as rare earth metal, which doesn't agree with standard bodies like IUPAC\r\n\r\nApologies, I didn't mean to ask about the reasons for the deprecation (although the context is useful, thanks), but rather, why there doesn't seem to be an intention to remove the deprecated code, now that the warning date has passed.\r\n\r\nI think this partly depends on how you interpret the date. I had assumed, given how far into the future it was originally set, that it was intended as roughly when the deprecated property would be removed, but in function, you could consider now to be the start of the warning period, as previously, warnings would not have been raised.\r\n\r\nEither way, the warning text (`scheduled for removal`) suggests there is an intention to remove the property at some point, which would fit this issue in name, although perhaps not quite in spirit.", "> why there doesn't seem to be an intention to remove the deprecated code, now that the warning date has passed.\r\n\r\nI believe this should be removed (hopefully soon enough) by: \r\n- https://github.com/materialsproject/pymatgen/pull/4242", "@ElliottKasoar @njzjz @unkcpz @rabbull A new `monty` release is out which we **recovered Python 3.9 support**, in this case you could safely drop the `CI` temporary patch.\n\nUnless your dependency resolving strategy is configured to install a specific version other than the latest, in which case you might need to manually bump `monty` version, otherwise no action should be needed AFAIK.\n" ]
2025-01-02T15:55:51
2025-01-31T09:13:11
2025-01-06T15:19:12Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version All ### Pymatgen version Master ### Current behavior Throws deprecation warning in CI ### Expected Behavior Removal Deadline to remove 2025-01-01 https://github.com/materialsproject/pymatgen/blob/1abc45936f839369854399369bc966732f85bf08/src/pymatgen/core/periodic_table.py#L757-L768
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4243/reactions", "total_count": 4, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 2 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4243/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4244
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4244/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4244/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4244/events
https://github.com/materialsproject/pymatgen/pull/4244
2,768,456,238
PR_kwDOACgets6GtXRb
4,244
Fix CI failure for `io.exciting.inputs` owing to `scipy` constant update
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-04T05:33:44
2025-01-08T02:02:13
2025-01-07T21:46:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix CI failure for `io.exciting.inputs` owing to `scipy` constant update https://github.com/scipy/scipy/pull/21605 https://github.com/materialsproject/pymatgen/blob/1abc45936f839369854399369bc966732f85bf08/src/pymatgen/io/exciting/inputs.py#L61-L62 - Add types
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4244/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4244/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4244", "html_url": "https://github.com/materialsproject/pymatgen/pull/4244", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4244.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4244.patch", "merged_at": "2025-01-07T21:46:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4245
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4245/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4245/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4245/events
https://github.com/materialsproject/pymatgen/pull/4245
2,771,465,482
PR_kwDOACgets6G3Z9H
4,245
pre-commit autoupdate
{ "login": "pre-commit-ci[bot]", "id": 66853113, "node_id": "MDM6Qm90NjY4NTMxMTM=", "avatar_url": "https://avatars.githubusercontent.com/in/68672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D", "html_url": "https://github.com/apps/pre-commit-ci", "followers_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/followers", "following_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/repos", "events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-06T21:19:53
2025-01-07T21:46:43
2025-01-07T21:46:41Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.1...v0.8.6) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1) - [github.com/RobertCraigie/pyright-python: v1.1.389 → v1.1.391](https://github.com/RobertCraigie/pyright-python/compare/v1.1.389...v1.1.391) <!--pre-commit.ci end-->
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4245/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4245/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4245", "html_url": "https://github.com/materialsproject/pymatgen/pull/4245", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4245.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4245.patch", "merged_at": "2025-01-07T21:46:41Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4246
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4246/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4246/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4246/events
https://github.com/materialsproject/pymatgen/pull/4246
2,773,670,800
PR_kwDOACgets6G-41-
4,246
Jdftx coords
{ "login": "cote3804", "id": 101949243, "node_id": "U_kgDOBhOfOw", "avatar_url": "https://avatars.githubusercontent.com/u/101949243?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cote3804", "html_url": "https://github.com/cote3804", "followers_url": "https://api.github.com/users/cote3804/followers", "following_url": "https://api.github.com/users/cote3804/following{/other_user}", "gists_url": "https://api.github.com/users/cote3804/gists{/gist_id}", "starred_url": "https://api.github.com/users/cote3804/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cote3804/subscriptions", "organizations_url": "https://api.github.com/users/cote3804/orgs", "repos_url": "https://api.github.com/users/cote3804/repos", "events_url": "https://api.github.com/users/cote3804/events{/privacy}", "received_events_url": "https://api.github.com/users/cote3804/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I'm sorry I keep merging to the wrong fork!" ]
2025-01-07T20:24:05
2025-01-07T20:24:44
2025-01-07T20:24:43Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
Actually made coordinates change. Last PR didn't have any file changes.
{ "login": "cote3804", "id": 101949243, "node_id": "U_kgDOBhOfOw", "avatar_url": "https://avatars.githubusercontent.com/u/101949243?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cote3804", "html_url": "https://github.com/cote3804", "followers_url": "https://api.github.com/users/cote3804/followers", "following_url": "https://api.github.com/users/cote3804/following{/other_user}", "gists_url": "https://api.github.com/users/cote3804/gists{/gist_id}", "starred_url": "https://api.github.com/users/cote3804/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cote3804/subscriptions", "organizations_url": "https://api.github.com/users/cote3804/orgs", "repos_url": "https://api.github.com/users/cote3804/repos", "events_url": "https://api.github.com/users/cote3804/events{/privacy}", "received_events_url": "https://api.github.com/users/cote3804/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4246/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4246/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4246", "html_url": "https://github.com/materialsproject/pymatgen/pull/4246", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4246.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4246.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4247
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4247/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4247/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4247/events
https://github.com/materialsproject/pymatgen/issues/4247
2,773,802,884
I_kwDOACgets6lVN-E
4,247
port MPSurfaceSet from atomate(1) to pymatgen
{ "login": "rkingsbury", "id": 1908695, "node_id": "MDQ6VXNlcjE5MDg2OTU=", "avatar_url": "https://avatars.githubusercontent.com/u/1908695?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rkingsbury", "html_url": "https://github.com/rkingsbury", "followers_url": "https://api.github.com/users/rkingsbury/followers", "following_url": "https://api.github.com/users/rkingsbury/following{/other_user}", "gists_url": "https://api.github.com/users/rkingsbury/gists{/gist_id}", "starred_url": "https://api.github.com/users/rkingsbury/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rkingsbury/subscriptions", "organizations_url": "https://api.github.com/users/rkingsbury/orgs", "repos_url": "https://api.github.com/users/rkingsbury/repos", "events_url": "https://api.github.com/users/rkingsbury/events{/privacy}", "received_events_url": "https://api.github.com/users/rkingsbury/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1427867026, "node_id": "MDU6TGFiZWwxNDI3ODY3MDI2", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/enhancement", "name": "enhancement", "color": "c5e06d", "default": true, "description": "A new feature or improvement to an existing one" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "@abhardwaj73 from my group is using this in his research and has agreed to tackle this", "Please post this issue on the atomate Issues?", "Ok thanks.," ]
2025-01-07T21:45:19
2025-01-07T21:47:56
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Feature Requested The `atomate` repository contains an input set for surface calculations - [`MPSurfaceSet`](https://github.com/hackingmaterials/atomate/blob/2e541f297165254ac054b50e8132adaa282a01e0/atomate/vasp/workflows/base/adsorption.py#L370) - whose parameters differ slightly from `MVLSlabSet` and appears to have been used in the adsorption workflows. The `InputSet` was intended to be moved to pymatgen, but it has not yet happened. ### Proposed Solution Add `MPSurfaceSet` to `pymatgen.io.vasp.sets.py`. Update the API if needed for compatibility with recent changes to `VaspInputSet` ### Relevant Information _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4247/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4247/timeline
null
reopened
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4248
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4248/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4248/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4248/events
https://github.com/materialsproject/pymatgen/issues/4248
2,776,159,636
I_kwDOACgets6leNWU
4,248
Can we get a new release with scheduled deprecations removed
{ "login": "lbluque", "id": 9788715, "node_id": "MDQ6VXNlcjk3ODg3MTU=", "avatar_url": "https://avatars.githubusercontent.com/u/9788715?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lbluque", "html_url": "https://github.com/lbluque", "followers_url": "https://api.github.com/users/lbluque/followers", "following_url": "https://api.github.com/users/lbluque/following{/other_user}", "gists_url": "https://api.github.com/users/lbluque/gists{/gist_id}", "starred_url": "https://api.github.com/users/lbluque/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lbluque/subscriptions", "organizations_url": "https://api.github.com/users/lbluque/orgs", "repos_url": "https://api.github.com/users/lbluque/repos", "events_url": "https://api.github.com/users/lbluque/events{/privacy}", "received_events_url": "https://api.github.com/users/lbluque/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi @lbluque happy new year.\r\n\r\nLooks like you might be using Python 3.9, and unfortunately both `pymatgen` and ~~`monty`~~ have dropped Python 3.9 support.\r\n\r\n~~If you have to use Python 3.9, you might need to temporarily remove the `CI` environment variable to disable the deprecation check for now, https://github.com/materialsproject/pymatgen/issues/4243#issuecomment-2574680379~~\r\n\r\nIf you're happy to move to Python 3.10 and onwards, the latest `monty 2025.1.3` has fixed this issue so you wouldn't get that deprecation exception anymore\r\n\r\n---\r\n\r\nUpdate: I have opened a PR to revert Python 3.9 support for `monty`, if this got accepted, no workaround might be needed:\r\n- https://github.com/materialsvirtuallab/monty/pull/739\r\n", "@lbluque A new release of `monty` (which supports Python 3.9) is out, and a `pymatgen` release too. ", "Thanks a lot @DanielYang59 for the timely response and release!", "No problem, I'm not a maintainer so the credit goes to Shyue.\r\n\r\nI learned a lot from your nearest neighbor code BTW :)" ]
2025-01-08T19:28:51
2025-01-10T10:10:01
2025-01-10T05:13:00Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12 ### Pymatgen version v2024.11.13 ### Operating system version _No response_ ### Current behavior The latest release v2024.11.13 does not have deprecated functions past their deadlines removed: ```python-traceback /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/io/ase.py:16: in <module> from pymatgen.core.structure import Molecule, Structure /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/__init__.py:12: in <module> from pymatgen.core.composition import Composition /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/composition.py:22: in <module> from pymatgen.core.periodic_table import DummySpecies, Element, ElementType, Species, get_el_sp /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py:63: in <module> class ElementBase(Enum): /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/pymatgen/core/periodic_table.py:7[55](https://github.com/FAIR-Chem/fairchem/actions/runs/12676568814/job/35330031581?pr=963#step:7:56): in ElementBase @deprecated(is_rare_earth, message="is_rare_earth is corrected to include Y and Sc.", deadline=(2025, 1, 1)) /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/monty/dev.py:1[57](https://github.com/FAIR-Chem/fairchem/actions/runs/12676568814/job/35330031581?pr=963#step:7:58): in deprecated raise_deadline_warning() /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/monty/dev.py:86: in raise_deadline_warning raise DeprecationWarning( E DeprecationWarning: This function should have been removed on 2025-01-01. ``` ### Expected Behavior A new release with the deprecated functions removed. ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "login": "lbluque", "id": 9788715, "node_id": "MDQ6VXNlcjk3ODg3MTU=", "avatar_url": "https://avatars.githubusercontent.com/u/9788715?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lbluque", "html_url": "https://github.com/lbluque", "followers_url": "https://api.github.com/users/lbluque/followers", "following_url": "https://api.github.com/users/lbluque/following{/other_user}", "gists_url": "https://api.github.com/users/lbluque/gists{/gist_id}", "starred_url": "https://api.github.com/users/lbluque/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lbluque/subscriptions", "organizations_url": "https://api.github.com/users/lbluque/orgs", "repos_url": "https://api.github.com/users/lbluque/repos", "events_url": "https://api.github.com/users/lbluque/events{/privacy}", "received_events_url": "https://api.github.com/users/lbluque/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4248/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4248/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4249
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4249/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4249/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4249/events
https://github.com/materialsproject/pymatgen/issues/4249
2,780,043,196
I_kwDOACgets6ltBe8
4,249
ug: SlabGenerator modifies x-y dimensions for (001) slab in triclinic system
{ "login": "lufern11", "id": 194496304, "node_id": "U_kgDOC5fHMA", "avatar_url": "https://avatars.githubusercontent.com/u/194496304?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lufern11", "html_url": "https://github.com/lufern11", "followers_url": "https://api.github.com/users/lufern11/followers", "following_url": "https://api.github.com/users/lufern11/following{/other_user}", "gists_url": "https://api.github.com/users/lufern11/gists{/gist_id}", "starred_url": "https://api.github.com/users/lufern11/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lufern11/subscriptions", "organizations_url": "https://api.github.com/users/lufern11/orgs", "repos_url": "https://api.github.com/users/lufern11/repos", "events_url": "https://api.github.com/users/lufern11/events{/privacy}", "received_events_url": "https://api.github.com/users/lufern11/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "This is not a bug. The code tries to find the most orthogonal set of parameters to craete the slab. You can disable this by turning this off." ]
2025-01-10T12:11:34
2025-01-10T16:29:26
2025-01-10T16:29:25Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.9 ### Pymatgen version Pymatgen 2024.8.9 ### Operating system version ubuntu 24 ### Current behavior The slab generator significantly modifies the x and y dimensions of the cell. While the oriented_unit_cell maintains the original parameters, the final slab has completely different x-y dimensions. ### Initial structure (triclinic) Lattice vectors: ```python [[ 8.5733 0. 0. ] [ 0.45873343 12.92936464 0. ] [-3.15639389 0.04527661 6.47944318]] ### Code slabgen = SlabGenerator( structure, miller_index=(0, 0, 1), min_slab_size=15, min_vacuum_size=10, center_slab=True, ) slabs = slabgen.get_slabs() slab = slabs[0] ###Final structure Lattice vectors: ```python [[ 7.63137515 0. -0.12561235] [-3.07924845 7.25599357 -0.23518215] [ 0. 0. 32.42673378]] ### Expected Behavior When creating a (001) slab, the x and y dimensions of the original cell should be preserved, with only the z-dimension being modified to accommodate the vacuum region. The oriented_unit_cell property of SlabGenerator shows the correct dimensions, but these are not preserved in the final slab structure (as shown using the example code). ### Minimal example ```Python from pymatgen.core.operations import SymmOp import numpy as np from pymatgen.transformations.standard_transformations import RotationTransformation # Print original cell parameters print("Original cell parameters:") print("Lattice vectors:") print(structure.lattice.matrix) print("\nCell dimensions:") print(f"x: {structure.lattice.a:.6f}") print(f"y: {structure.lattice.b:.6f}") print(f"z: {structure.lattice.c:.6f}") # Create the slab slabgen = SlabGenerator( structure, miller_index=(0, 0, 1), min_slab_size=15, min_vacuum_size=10, center_slab=True, ) # Before getting slabs, let's examine what SlabGenerator did to the structure print("\nSlabGenerator initial transformation:") print(slabgen.oriented_unit_cell.lattice.matrix) slabs = slabgen.get_slabs() slab = slabs[0] # Print parameters after slab generation print("\nFinal slab parameters:") print("Lattice vectors:") print(slab.lattice.matrix) print("\nCell dimensions:") print(f"x: {slab.lattice.a:.6f}") print(f"y: {slab.lattice.b:.6f}") print(f"z: {slab.lattice.c:.6f}") # Also let's check the oriented unit cell that SlabGenerator creates internally print("\nOriented unit cell parameters:") oriented_cell = slabgen.oriented_unit_cell print(oriented_cell.lattice.matrix) ``` ### Relevant files to reproduce this bug _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4249/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4249/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4250
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4250/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4250/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4250/events
https://github.com/materialsproject/pymatgen/issues/4250
2,782,438,462
I_kwDOACgets6l2KQ-
4,250
Mismatch between CifParser parsed coordinates and coordinates in the CIF file
{ "login": "JuJueTanWan", "id": 144351215, "node_id": "U_kgDOCJqf7w", "avatar_url": "https://avatars.githubusercontent.com/u/144351215?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JuJueTanWan", "html_url": "https://github.com/JuJueTanWan", "followers_url": "https://api.github.com/users/JuJueTanWan/followers", "following_url": "https://api.github.com/users/JuJueTanWan/following{/other_user}", "gists_url": "https://api.github.com/users/JuJueTanWan/gists{/gist_id}", "starred_url": "https://api.github.com/users/JuJueTanWan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JuJueTanWan/subscriptions", "organizations_url": "https://api.github.com/users/JuJueTanWan/orgs", "repos_url": "https://api.github.com/users/JuJueTanWan/repos", "events_url": "https://api.github.com/users/JuJueTanWan/events{/privacy}", "received_events_url": "https://api.github.com/users/JuJueTanWan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "@JuJueTanWan Hi thanks for reporting this issue. While I'm happy to look into this issue, is it possible for you to provide the complete CIF file (looks like the provided is a snippet of it) for me to recreate this issue (GitHub doesn't support uploading cif files directly, but you could add a `.txt` extension as it's a text file anyway)? ", "Hi,\r\n\r\nThank you for your prompt response and for your willingness to look into this issue. I've renamed the CIF file and processing script with a .txt extension as you suggested. Please find the updated files attached.\r\n\r\nThanks again for your help, and I look forward to your feedback!\r\n\r\n[c2db-2832-WSe2-_shixc2db-2696-MoS2-_shi_0.txt](https://github.com/user-attachments/files/18392641/c2db-2832-WSe2-_shixc2db-2696-MoS2-_shi_0.txt)\r\n[insert_atom_M_TM_X.txt](https://github.com/user-attachments/files/18392642/insert_atom_M_TM_X.txt)\r\n", "Hi,\nThank you for your prompt response and for your willingness to look into this issue. I've renamed the CIF file and processing script with a .txt extension as you suggested. Please find the updated files attached.\nThanks again for your help, and I look forward to your feedback!\nxudonghuichem97\n***@***.***\n---- Replied Message ----\nFromHaoyu (Daniel) ***@***.***>Date1/13/2025 ***@***.***>***@***.***>,\n***@***.***>SubjectRe: [materialsproject/pymatgen] Mismatch between CifParser parsed coordinates and coordinates in the CIF file (Issue #4250)\n@JuJueTanWan Hi thanks for reporting this issue. While I'm happy to look into this issue, is it possible for you to provide the complete CIF file (looks like the provided is a snippet of it) for me to recreate this issue (GitHub doesn't support uploading cif files directly, but you could add a .txt extension as it's a text file anyway)?\n—\nReply to this email directly, view it on GitHub, or unsubscribe.\nYou are receiving this because you were mentioned.Message ID: ***@***.***>\n# generated using pymatgen\r\ndata_MoW(SeS)2\r\n_symmetry_space_group_name_H-M 'P 1'\r\n_cell_length_a 3.33061866\r\n_cell_length_b 3.33061866\r\n_cell_length_c 29.90433353\r\n_cell_angle_alpha 90.00000000\r\n_cell_angle_beta 90.00000000\r\n_cell_angle_gamma 120.00000000\r\n_symmetry_Int_Tables_number 1\r\n_chemical_formula_structural MoW(SeS)2\r\n_chemical_formula_sum 'Mo1 W1 Se2 S2'\r\n_cell_volume 287.28607864\r\n_cell_formula_units_Z 1\r\nloop_\r\n _symmetry_equiv_pos_site_id\r\n _symmetry_equiv_pos_as_xyz\r\n 1 'x, y, z'\r\nloop_\r\n _atom_site_type_symbol\r\n _atom_site_label\r\n _atom_site_symmetry_multiplicity\r\n _atom_site_fract_x\r\n _atom_site_fract_y\r\n _atom_site_fract_z\r\n _atom_site_occupancy\r\n W W0 1 0.66666667 0.33333333 0.31812705 1\r\n Se Se1 1 0.33333333 0.66666667 0.26186394 1\r\n Se Se2 1 0.33333333 0.66666667 0.37439016 1\r\n Mo Mo3 1 1.00000000 1.00000000 0.55060730 1\r\n S S4 1 0.66666666 1.33333334 0.49811805 1\r\n S S5 1 0.66666666 1.33333334 0.60309655 1\r\n\n#!/usr/bin/env python3\n\nimport os\nimport shutil\nimport warnings\nfrom pymatgen.io.vasp import Poscar\nfrom pymatgen.io.cif import CifParser, CifWriter\nfrom pymatgen.core.structure import Structure\n\nwarnings.filterwarnings(\"ignore\", category=FutureWarning)\nwarnings.filterwarnings(\"ignore\", category=UserWarning)\n\ndef insert_atom_M_TM_X(cif_file, atom_type, output_file, suppress_warnings=True):\n \"\"\"\n The file's comments are the same as insert_atom_X_TM_V.py,\n which you can refer to if necessary! \n \"\"\"\n\n parser = CifParser(cif_file)\n structure = parser.parse_structures(primitive=True)[0]\n\n sulfur_atoms = []\n metal_atoms = []\n for site in structure:\n if site.species_string in [\"S\", \"Se\", \"Te\"]:\n sulfur_atoms.append(site)\n else:\n metal_atoms.append(site)\n\n z_coords_metal = []\n for site in metal_atoms:\n z_coords_metal.append(site.frac_coords[2])\n\n z_min_metal = min(z_coords_metal)\n z_max_metal = max(z_coords_metal)\n z_middle = (z_min_metal + z_max_metal) / 2.0\n\n top_layer_metal = []\n for site in metal_atoms:\n if site.frac_coords[2] > z_middle:\n top_layer_metal.append(site)\n\n if not top_layer_metal:\n raise ValueError(f\"Cannot distinguish the top metal atoms, please check the input structure.\")\n\n selected_site = top_layer_metal[0]\n x = selected_site.frac_coords[0]\n y = selected_site.frac_coords[1]\n\n structure.append(atom_type, [x, y, z_middle])\n\n writer = CifWriter(structure)\n writer.write_file(output_file)\n\nif __name__ == \"__main__\":\n\n input_cif = \"c2db-2832-WSe2-_shixc2db-2696-MoS2-_shi_0\"\n metals = [\"Cu\"]\n\n for metal in metals:\n insert_atom_M_TM_X(input_cif, metal, f\"{metal}.cif\")\n\n", "@JuJueTanWan Thanks for sending through the file and code snippet. However I cannot recreate the issue (I didn't look into the custom `insert_atom_M_TM_X` code but I'm not seeing any issue with the `CifParser`).\r\n\r\n---\r\n\r\n```python\r\nfrom pymatgen.io.cif import CifParser\r\n\r\n\r\ncif_file = \"test_cif.cif\"\r\nparser = CifParser(cif_file)\r\nstructure = parser.parse_structures(primitive=False)[0]\r\n\r\nfor site in structure.sites:\r\n print(f\"{site.specie}: {site.frac_coords}\")\r\n```\r\n\r\nI got:\r\n```\r\nMo: [0. 0. 0.5506073]\r\nW: [0.66666667 0.33333333 0.31812705]\r\nSe: [0.33333333 0.66666667 0.26186394]\r\nSe: [0.33333333 0.66666667 0.37439016]\r\nS: [0.66666667 0.33333334 0.49811805]\r\nS: [0.66666667 0.33333334 0.60309655]\r\n```\r\n\r\nThe cif file:\r\n```\r\n W W0 1 0.66666667 0.33333333 0.31812705 1\r\n Se Se1 1 0.33333333 0.66666667 0.26186394 1\r\n Se Se2 1 0.33333333 0.66666667 0.37439016 1\r\n Mo Mo3 1 1.00000000 1.00000000 0.55060730 1\r\n S S4 1 0.66666666 1.33333334 0.49811805 1\r\n S S5 1 0.66666666 1.33333334 0.60309655 1\r\n```\r\n", "It seems to me that the cell's space group allows for different definitions/orientations in space, and therefore, the parser changes the coordinates. The cells might be equal, just facing another direction. ", "By default, CifParser performs a primitive cell reduction since this is generally desired for calculations. If you prefer not to, you can always specify `primitive=False` as an arg to `get_structures`. Otherwise, users generally should use `Structure.from_file`, which works more in the way that the data is returned unmodified." ]
2025-01-12T11:34:52
2025-01-17T16:46:37
2025-01-17T16:46:36Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.9.21 ### Pymatgen version 2024.8.9 ### Operating system version CentOS 7.9 ### Current behavior Hello, I encountered an issue when using pymatgen's CifParser to parse a .cif file. Specifically, I noticed that the fractional coordinates of some atoms (X and Y) parsed by CifParser do not match the original fractional coordinates in the CIF file. Below are the details of my observation. Here is the content of the c2db-2832-WSe2-_shixc2db-2696-MoS2-_shi_1.cif file I am using: W W0 1 0.66666667 0.33333333 0.31812705 1 Se Se1 1 0.33333333 0.66666667 0.26186394 1 Se Se2 1 0.33333333 0.66666667 0.37439016 1 Mo Mo3 1 1.00000000 1.00000000 0.55060730 1 S S4 1 0.66666666 1.33333334 0.49811805 1 S S5 1 0.66666666 1.33333334 0.60309655 1 Here is the code I used to parse the CIF file: from pymatgen.io.cif import CifParser cif_file = "c2db-2832-WSe2-_shixc2db-2696-MoS2-_shi_1.cif " parser = CifParser(cif_file) structure = parser.get_structures(primitive=False)[0] for site in structure.sites: specie = site.specie original_frac_coords = site._frac_coords print(f"{specie}: {original_frac_coords}") The output from the code is as follows: Mo: [0.33333334 0.66666667 0.5506073 ] W: [0.66666667 0.33333333 0.31812705] Se: [0.33333333 0.66666667 0.26186394] Se: [0.33333333 0.66666667 0.37439016] S: [0. 0. 0.49811805] S: [0. 0. 0.60309655] The Z coordinates for all atoms are correct. The X and Y coordinates for W and Se atoms match the values in the CIF file, but the X and Y coordinates for Mo and S atoms are incorrect: Mo's original fractional coordinates in the CIF file are [1.00000000, 1.00000000, 0.55060730], but CifParser outputs [0.33333334, 0.66666667, 0.55060730]. S's original fractional coordinates in the CIF file are [0.66666666, 1.33333334, 0.49811805], but CifParser outputs [0.0, 0.0, 0.49811805]. ### Expected Behavior Why does CifParser parse some fractional coordinates (X and Y) as values that do not match the original CIF file? Is there a way to avoid this normalization or mapping behavior and directly retrieve the fractional coordinates as they are in the CIF file? Any clarification or guidance on this behavior would be greatly appreciated. Thank you! ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4250/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4250/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4251
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4251/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4251/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4251/events
https://github.com/materialsproject/pymatgen/issues/4251
2,785,038,162
I_kwDOACgets6mAE9S
4,251
Some OUTCARs cannot be parsed
{ "login": "yantar92", "id": 10819266, "node_id": "MDQ6VXNlcjEwODE5MjY2", "avatar_url": "https://avatars.githubusercontent.com/u/10819266?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yantar92", "html_url": "https://github.com/yantar92", "followers_url": "https://api.github.com/users/yantar92/followers", "following_url": "https://api.github.com/users/yantar92/following{/other_user}", "gists_url": "https://api.github.com/users/yantar92/gists{/gist_id}", "starred_url": "https://api.github.com/users/yantar92/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yantar92/subscriptions", "organizations_url": "https://api.github.com/users/yantar92/orgs", "repos_url": "https://api.github.com/users/yantar92/repos", "events_url": "https://api.github.com/users/yantar92/events{/privacy}", "received_events_url": "https://api.github.com/users/yantar92/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for opening this. I will look into this ASAP, link to #4195\r\n\r\n---\r\n\r\nUpdate: I cannot reproduce this on MacOS 15.2, Python 3.12.8\r\n\r\n```python\r\nfrom pymatgen.io.vasp.outputs import Outcar\r\n\r\n\r\noutcar = Outcar('OUTCAR.txt')\r\n\r\nprint(outcar.data[\"nbands\"]) # 24 (seems to work fine)\r\n```", "Oops. Sorry, attached a wrong OUTCAR file. Try this one\r\n[OUTCAR.txt](https://github.com/user-attachments/files/18409488/OUTCAR.txt)\r\n", "Thanks this seems to recreate that issue now. \r\n\r\nHowever this VASP job seem to fail owing to a bad KPOINTS file, so perhaps this should not be handled by `pymatgen` (I would expect a properly started VASP job to always have the NBANDS tag)?\r\n```\r\nAutomatic generation of k-mesh.\r\n -----------------------------------------------------------------------------\r\n| |\r\n| EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR ### ### ### |\r\n| E R R R R O O R R ### ### ### |\r\n| E R R R R O O R R ### ### ### |\r\n| EEEEE RRRRRR RRRRRR O O RRRRRR # # # |\r\n| E R R R R O O R R |\r\n| E R R R R O O R R ### ### ### |\r\n| EEEEEEE R R R R OOOOOOO R R ### ### ### |\r\n| |\r\n| Error reading KPOINTS file. |\r\n| The error occurred at line: 4. |\r\n| |\r\n| ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- |\r\n| |\r\n -----------------------------------------------------------------------------\r\n\r\n```\r\n\r\n~~But yes I would be happy to check if it makes sense to add a better default value in such cases instead of throwing an `IndexError`~~\r\n\r\nIf you comment out the NBANDS parsing part, yet another error would be thrown:\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/yang/developer/pymatgen/test_read_outcar.py\", line 4, in <module>\r\n outcar = Outcar('OUTCAR.txt')\r\n ^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/io/vasp/outputs.py\", line 2169, in __init__\r\n self.data[\"nplwv\"] = [[int(self.data[\"nplwv\"][0][0])]]\r\n ~~~~~~~~~~~~~~~~~~^^^\r\nIndexError: list index out of range\r\n```\r\n\r\nSo perhaps it's better to provide a correctly started VASP job?\r\n", "Hmm. You are right. My confusion is probably originating from that fact that pymatgen can actually read OUTCAR from failed jobs *most of the time*. It is just that in this particular case the job failed especially early.\r\n\r\nIt would be nice to throw a more readable exception (and document this fact) in the scenarios like in my example, when pymatgen cannot extract any kind of useful data from the OUTCAR.", "> It would be nice to throw a more readable exception (and document this fact) in the scenarios like in my example, when pymatgen cannot extract any kind of useful data from the OUTCAR.\r\n\r\nI agree having a descriptive exception message is always better. But currently **it's unclear to me what is a reliable criterion from OUTCAR that indicating a VASP job has been properly setup and started**. Looks like NBANDS might be one of the first parameters after KPOINTS are setup, do you have any comment on this?\r\n\r\n---\r\n\r\nLooking at line 414 of your first OUTCAR (where the job started correctly)\r\n```\r\n Dimension of arrays:\r\n k-points NKPTS = 20 k-points in BZ NKDIM = 20 number of bands NBANDS= 24\r\n number of dos NEDOS = 301 number of ions NIONS = 4\r\n non local maximal LDIM = 6 non local SUM 2l+1 LMDIM = 18\r\n total plane-waves NPLWV = 248832\r\n max r-space proj IRMAX = 1 max aug-charges IRDMAX= 34250\r\n dimension x,y,z NGX = 36 NGY = 36 NGZ = 192\r\n dimension x,y,z NGXF= 72 NGYF= 72 NGZF= 384\r\n support grid NGXF= 72 NGYF= 72 NGZF= 384\r\n ions per type = 2 2\r\n NGX,Y,Z is equivalent to a cutoff of 13.30, 13.05, 13.50 a.u.\r\n NGXF,Y,Z is equivalent to a cutoff of 26.60, 26.09, 27.00 a.u.\r\n```\r\n", "> Looks like NBANDS might be one of the first parameters after KPOINTS are setup, do you have any comment on this?\r\n\r\nIMHO, trying to deduce the undocumented OUTCAR format *exactly* is prone to errors.\r\nI think that the best approach would be doing something similar to what the Outcar class docstring explains about special VASP run types:\r\n\r\n Note, this class works a bit differently than most of the other\r\n VASP objects, since OUTCAR can be very different depending on which\r\n \"type of run\" performed.\r\n\r\n Create the OUTCAR class with a filename reads \"regular parameters\" that\r\n are always present.\r\n ...\r\n One can then call a specific reader depending on the type of run being\r\n performed. These are currently: read_igpar(), read_lepsilon() and\r\n read_lcalcpol(), read_core_state_eign(), read_avg_core_pot().\r\n\r\nAccording to the docstring, some parts of the OUTCAR are parsed conditionally.\r\n\r\nSimilar to the optional parts of the OUTCAR, the \"always present\" parts (not always, as we see in my OUTCAR.txt) might be parsed conditionally - if they can be parsed, they do get added to the class. If not - not added.\r\n\r\nParactically, I imagine that the class constructor can be separated into subroutines each parsing individual part of the file. If any of the subroutines throws an error or detects in any other way that some information is not present, either a error is thrown or a warning is displayed.", "> Looks like NBANDS might be one of the first parameters after KPOINTS are setup, do you have any comment on this?\r\n\r\nIf we do want some kind of simple criterion that VASP started a calculation (not stopped in the middle of a setup), one heuristics might be searching for `cpu time.+` lines.", "`NBANDS` is not a required INCAR tag, VASP determines this on the fly if it's not set. That's usually what we do when we have no a priori knowledge of the electronic structure of a system\r\n\r\npymatgen can usually parse OUTCARs from failed calculations only if they've reached at least one electronic step. Is there info in the OUTCAR that you need to extract in this case? Most of it is user input since it didn't reach k-point generation\r\n\r\nAlso, you may want to look into [`custodian`](https://github.com/materialsproject/custodian), which can help in recovering from errors", "> pymatgen can usually parse OUTCARs from failed calculations only if they've reached at least one electronic step. Is there info in the OUTCAR that you need to extract in this case? Most of it is user input since it didn't reach k-point generation\r\n\r\nFor example, whether WAVECAR/CHGCAR has been read successfully (or at all).\r\n\r\nFor context, I am using a class derived from the original Outcar with some extensions. The main focus is displaying key information about running VASP calculation.\r\n\r\nThat said, I am not saying that pymatgen should implement the more granular parsing as I described. Throwing a catchable exception would suffice for my needs.\r\n\r\n> Also, you may want to look into [custodian](https://github.com/materialsproject/custodian), which can help in recovering from errors\r\n\r\nI've looked at it. It is not suitable for my needs as it produces results that are not comparable when analyzing several related structures. It will also not recover from this particular problem with parsing KPOINTS file (which is simply a VASP bug). But that's probably an off topic to this particular bug report.\r\n", "> Throwing a catchable exception would suffice for my needs.\r\n\r\nThat's already possible no?\r\n```\r\ntry:\r\n outcar = Outcar(\"<filename>\")\r\nexcept Exception as exc:\r\n outcar = None\r\n```\r\nRestricting the exception catching to `IndexError` is probably too restrictive to catch all possible failure modes\r\n\r\nThere's some precedent for parsing partial VASP output in the `Vasprun` class by setting `exception_on_bad_xml = False`. But a similar option would have to be implemented for `Outcar`. \r\n\r\nMaybe using the `Vasprun` with that option can help as well? The `Vasprun` class is overall better maintained and provides more detailed information about the calculation than the `Outcar` class", "> That's already possible no?\n\nYes, of course. But it is much better when pymatgen signals a very specific exception type that tells what exactly is wrong.\nJust `IndexError` does not tell much. It might as well be a bug in pymatgen - impossible to say without reading the source code and doing in-depth debugging.\n\nAnd nothing in the docstring says that some Outcars cannot be read.\n\n> There's some precedent for parsing partial VASP output in the Vasprun class by setting exception_on_bad_xml = False. But a similar option would have to be implemented for Outcar.\n\nThat would be ideal, although I am not 100% if it is worth the effort.\n\n> Maybe using the Vasprun with that option can help as well? The Vasprun class is overall better maintained and provides more detailed information about the calculation than the Outcar class\n\nOh. I wish it were true. But it is not:\n1. vasprun.xml does not provide magnetization info (AFAIK).\n2. vasprun.xml is not written at all when doing NEB calculations.\n", "I am closing this Issue since I don't think it is fruitful to try to implement. The main reason is that the OUTCAR is a poorly defined text file, unlike say XML. The OUTCAR can be incomplete for any number of reasons. E.g., say if the compute cluster just randomly terminates a run. At best, we can have a big try-catch and raise a \"BadOutcar\" error, but that is not going to be useful since there is no way to diagnose the reason for the error. In the extreme example, say a run results in a completely empty OUTCAR file - what then? A broad BadOutcar error is not much different from doing a try-catch with a BaseException. " ]
2025-01-13T19:02:46
2025-01-17T16:42:19
2025-01-17T16:42:18Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version 2025.1.9 ### Operating system version Linux ### Current behavior ``` Traceback (most recent call last): outcar = Outcar(os.path.join(wdir, "OUTCAR")).as_dict() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/LUMI_TYKKY_NMfA5bl/miniconda/envs/env1/lib/python3.12/site-packages/pymatgen/io/vasp/outputs.py", line 2161, in __init__ self.data["nbands"] = self.data["nbands"][0][0] ~~~~~~~~~~~~~~~~~~~^^^ IndexError: list index out of range ``` ### Expected Behavior Outcar being parsed. ### Minimal example ```Python from pymatgen.io.vasp.outputs import Outcar out = Outcar('OUTCAR') ``` ### Relevant files to reproduce this bug [OUTCAR.txt](https://github.com/user-attachments/files/18400925/OUTCAR.txt)
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4251/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4251/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4252
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4252/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4252/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4252/events
https://github.com/materialsproject/pymatgen/issues/4252
2,785,503,501
I_kwDOACgets6mB2kN
4,252
Add method `Trajectory.to_ase_trajectory()`
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1427867026, "node_id": "MDU6TGFiZWwxNDI3ODY3MDI2", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/enhancement", "name": "enhancement", "color": "c5e06d", "default": true, "description": "A new feature or improvement to an existing one" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "further context: there's a `pmg_to_ase_trajectory` helper function in https://s3.us-east-1.amazonaws.com/materialsproject-contribs/amorphous_diffusivity/trajectory_reader.ipynb by @esoteric-ephemera that looks like it would be generally useful", "Hey @janosh I was actually working on this for the same reason, hope to have something up soon", "Since a read-in ASE trajectory is just a `list[Atoms]` (yes?), should it just be `[s.to_ase_atoms() for s in list_of_structures]`? Or do you actually want to make a `.traj` file? Either way, seems simple enough to support.", "Ah, I see in the helper function you are attaching `SinglePointCalculator` objects from `.frame_properties` of the Pymatgen trajectory. Makes sense, but I encourage some one note of caution: if the `Structure` object has charges or magmoms on it, this is going to conflict with the calculator that gets attached below, which is needed to do things like `Atoms.get_magnetic_moments()` or `Atoms.get_charges()`:\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/0d14d7240e1d773e5ab9c4b9ecea690c8a637ff6/src/pymatgen/io/ase.py#L216-L227\r\n\r\nJust make sure that the magmoms especially get handled appropriately. " ]
2025-01-13T21:43:44
2025-01-15T17:23:15
2025-01-15T17:23:15Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Feature Requested `class Trajectory` has a [`from_file` method](https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/trajectory.py#L552) that supports ASE `.traj` files. arguably, if from ASE works, would be great if to ASE also works ### Proposed Solution add method `Trajectory.to_ase_trajectory()` ### Relevant Information pinging @esoteric-ephemera and @Andrew-S-Rosen in case you'd like to weigh in
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4252/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4252/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4253
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4253/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4253/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4253/events
https://github.com/materialsproject/pymatgen/pull/4253
2,785,809,929
PR_kwDOACgets6HohM3
4,253
ASE <---> pymatgen trajectory conversion
{ "login": "esoteric-ephemera", "id": 33381112, "node_id": "MDQ6VXNlcjMzMzgxMTEy", "avatar_url": "https://avatars.githubusercontent.com/u/33381112?v=4", "gravatar_id": "", "url": "https://api.github.com/users/esoteric-ephemera", "html_url": "https://github.com/esoteric-ephemera", "followers_url": "https://api.github.com/users/esoteric-ephemera/followers", "following_url": "https://api.github.com/users/esoteric-ephemera/following{/other_user}", "gists_url": "https://api.github.com/users/esoteric-ephemera/gists{/gist_id}", "starred_url": "https://api.github.com/users/esoteric-ephemera/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/esoteric-ephemera/subscriptions", "organizations_url": "https://api.github.com/users/esoteric-ephemera/orgs", "repos_url": "https://api.github.com/users/esoteric-ephemera/repos", "events_url": "https://api.github.com/users/esoteric-ephemera/events{/privacy}", "received_events_url": "https://api.github.com/users/esoteric-ephemera/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "@shyuep and @mkhorton should be ready for review whenever you get a chance", "Looks good. Thanks. Merged." ]
2025-01-14T00:30:25
2025-01-15T17:23:26
2025-01-15T17:23:14Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Adds feature to convert between ASE and pymatgen trajectories via `from_ase` and `to_ase` methods on `Trajectory`. Allows for carrying energies, forces, stresses, etc. between ASE and pymatgen trajectories, rather than just structural info as previously implemented. Merging would close #4252. From the discussion there: this PR ensures that any calculator attr's that are set by `AseAtomsAdaptor` are not lost in the trajectory conversion processs. To-do: ~- Tests~
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4253/reactions", "total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 3, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4253/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4253", "html_url": "https://github.com/materialsproject/pymatgen/pull/4253", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4253.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4253.patch", "merged_at": "2025-01-15T17:23:14Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4254
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4254/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4254/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4254/events
https://github.com/materialsproject/pymatgen/pull/4254
2,793,676,888
PR_kwDOACgets6IDvNS
4,254
Using libxc with FHI-aims requires an additional keyword
{ "login": "tpurcell90", "id": 7539573, "node_id": "MDQ6VXNlcjc1Mzk1NzM=", "avatar_url": "https://avatars.githubusercontent.com/u/7539573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tpurcell90", "html_url": "https://github.com/tpurcell90", "followers_url": "https://api.github.com/users/tpurcell90/followers", "following_url": "https://api.github.com/users/tpurcell90/following{/other_user}", "gists_url": "https://api.github.com/users/tpurcell90/gists{/gist_id}", "starred_url": "https://api.github.com/users/tpurcell90/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tpurcell90/subscriptions", "organizations_url": "https://api.github.com/users/tpurcell90/orgs", "repos_url": "https://api.github.com/users/tpurcell90/repos", "events_url": "https://api.github.com/users/tpurcell90/events{/privacy}", "received_events_url": "https://api.github.com/users/tpurcell90/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-16T20:07:11
2025-01-17T17:10:58
2025-01-17T17:10:58Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
automatically add the override warning when using libxc ## Summary Major changes: - fix 1: libxc calls should automatically override warning ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4254/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4254/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4254", "html_url": "https://github.com/materialsproject/pymatgen/pull/4254", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4254.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4254.patch", "merged_at": "2025-01-17T17:10:58Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4255
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4255/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4255/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4255/events
https://github.com/materialsproject/pymatgen/pull/4255
2,794,047,305
PR_kwDOACgets6IFBpH
4,255
Make run_type in mixing scheme consistent with entries
{ "login": "peikai", "id": 25943913, "node_id": "MDQ6VXNlcjI1OTQzOTEz", "avatar_url": "https://avatars.githubusercontent.com/u/25943913?v=4", "gravatar_id": "", "url": "https://api.github.com/users/peikai", "html_url": "https://github.com/peikai", "followers_url": "https://api.github.com/users/peikai/followers", "following_url": "https://api.github.com/users/peikai/following{/other_user}", "gists_url": "https://api.github.com/users/peikai/gists{/gist_id}", "starred_url": "https://api.github.com/users/peikai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/peikai/subscriptions", "organizations_url": "https://api.github.com/users/peikai/orgs", "repos_url": "https://api.github.com/users/peikai/repos", "events_url": "https://api.github.com/users/peikai/events{/privacy}", "received_events_url": "https://api.github.com/users/peikai/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Good catch, thanks @peikai!\r\n\r\nIf you could, can you change the check to ensure it is not case sensitive? This is probably the most robust solution, in case some people are still using entries serialised with the former `run_type`.", "@mkhorton, Sure, I updated the calculation parameters for archive test entries, changing 'R2SCAN' to 'r2SCAN' in parameters['run_type']. Then, added an unittest to check run types in mixing scheme are consistent to calculation parameters. \r\n\r\nIn addition, comments that use R2SCAN as a run type are also revised, according to a principle: the run type that inherits from calculation parameters of VASP should use 'r2SCAN' to keep consistent with the `parameter` dictionary in entry object; when talking about the thermo type, 'R2SCAN' is still retained to divide problems considering it has been a frequently used glossary. However, I noticed that the wording for this thermo type has been changing to r2SCAN. [^2]\r\n\r\nAlso, I would like to mention that there are two run_type terms in an entry object, located in the parameter and the data dictionary respectively. For an r2SCAN entry, the run_type in parameter dict is 'r2SCAN', whereas the run_type in data dict is 'R2SCAN', which still easy to make confusion.\r\n\r\n[^2]: https://docs.materialsproject.org/changes/database-versions#v2024.12.18:~:text=GGA_GGA%2BU_R2SCAN%3E-,r2SCAN,-%3E%20GGA_GGA%2BU", "Hey @peikai, we recently changed the `run_type` values used by the Materials Project in the `emmet` package to account for how DFT functionals are written in literature. So MP's data now uses `r2SCAN` as the `run_type` rather than `R2SCAN`. Similarly, other data now has `PBEsol` as the `run_type`\r\n\r\nThere's a mismatch between what the pymatgen corrections/phase diagram class expects and what MP data returns. In the long run, might be better to implement @mkhorton's suggestion since there shouldn't be functionals with names that differ only in capitalization. Happy to do so", "Hey @esoteric-ephemera, it is great that glossary is consistent to calculation. Also, the run_type in data dictionary might need update, for all entries, or link them as one directly. The commits above had incorporated an unittest for run_type consistency during mixing scheme correcting. \r\n", "@mkhorton Oh, I misunderstood the word case-sensitive. Here are updated commits to permit both 'r2SCAN' entries and archived 'R2SCAN' entries for mixing scheme correction, which would fix that 'r2SCAN' entries were ignored in mixing scheme correction. Furthermore, 'r2SCAN' as an input run_type would not be case-sensitive, to give backward compatibility, ensuring former default input, 'R2SCAN', can still work in the mixing scheme. The extendibility for possible run_type variations is taken into account. A unit test has been added to check it worked properly. And the name of input run_type of `MaterialsProjectDFTMixingScheme()` moves forward as the 'r2SCAN'.\r\n\r\nAny modifications are welcome, it would be better if there is an implement realizing case insensitive of the run_type only in test files. Alternatively, it is a chance to clear and update archive R2SCAN entries in test files.", "Many thanks Kai!", "No problem! Thanks for the instructions." ]
2025-01-16T23:51:59
2025-01-28T17:36:32
2025-01-23T17:40:36Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The run_type for entries had been changed from 'R2SCAN' to 'r2SCAN', whereas the `MaterialsProjectDFTMixingScheme()` is still expecting to find 'R2SCAN' entries. As a result, all r2SCAN entries would be ignored when carrying out GGA(+U)/R2SCAN mixing scheme corrections, thereby affecting the construction of GGA(+U)/R2SCAN mixing phase diagram [^1]. Error message would be: ``` pymatgen\entries\mixing_scheme.py:176: UserWarning: Invalid run_type='r2SCAN' for entry mp-1018134-r2SCAN. Must be one of ['GGA', 'GGA+U', 'R2SCAN']. This entry will be ignored. ``` [^1]: https://docs.materialsproject.org/methodology/materials-methodology/thermodynamic-stability/phase-diagrams-pds#gga-ggau-r2scan
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4255/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4255/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4255", "html_url": "https://github.com/materialsproject/pymatgen/pull/4255", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4255.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4255.patch", "merged_at": "2025-01-23T17:40:36Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4256
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4256/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4256/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4256/events
https://github.com/materialsproject/pymatgen/pull/4256
2,795,114,892
PR_kwDOACgets6IIuvm
4,256
Fix `Composition` for mixed species & element compositions
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Great thanks." ]
2025-01-17T10:35:53
2025-01-17T16:43:36
2025-01-17T16:43:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
`Composition` objects initialised as e.g. `Composition({"Cd2+": 1, "Cd": 1, "Te2-": 2})` do not behave as expected, giving e.g. `Composition.formula = "Cd3 Te2"` instead of `Cd2 Te2`. This is due to `Composition.__getitem__()` matching all species and elements/non-species of a given input string; so that `Composition["Cd"]` here would return `2` (as desired), but than `Composition.items()` (which is use for `get_el_amt_dict`, `formula` and more) gives `("Cd2+", 1), ("Cd", 2), ("Te", 2)` which is incorrect. In the end, it's an easy fix to just define the `items()` method to avoid the `Composition.__getitem__()` (which is only needed when the user does `Composition[...]`). Test added, which failed with previous code and passes now. Context: Took a while to find what was going on here. Was originally flagged by this `ValueError` with `ComputedStructureEntry`: https://github.com/materialsproject/pymatgen/blob/master/src/pymatgen/entries/computed_entries.py#L588 With original `pymatgen` code: ![image](https://github.com/user-attachments/assets/82469cb3-4ada-45bb-8cfe-55b6676004b4) ![image](https://github.com/user-attachments/assets/d333b290-96d3-495e-98ce-4a62274db5bd) With fixed code: ![image](https://github.com/user-attachments/assets/b8a89a9a-69d2-4539-9d60-05c8cd5685a1) ![image](https://github.com/user-attachments/assets/26e3b2d9-8dc7-4f75-8691-d0ba8afe69b2) Flagged by tests in [ShakeNBreak](https://shakenbreak.readthedocs.io/), because defect generation in `pymatgen-analysis-defects` mixes species with just element symbols; e.g. converting to just element symbol with `get_element` here: https://github.com/materialsproject/pymatgen-analysis-defects/blob/main/pymatgen/analysis/defects/core.py#L566-L576
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4256/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4256/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4256", "html_url": "https://github.com/materialsproject/pymatgen/pull/4256", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4256.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4256.patch", "merged_at": "2025-01-17T16:43:30Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4257
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4257/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4257/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4257/events
https://github.com/materialsproject/pymatgen/pull/4257
2,795,284,047
PR_kwDOACgets6IJVHx
4,257
build Linux arm64 wheels
{ "login": "njzjz", "id": 9496702, "node_id": "MDQ6VXNlcjk0OTY3MDI=", "avatar_url": "https://avatars.githubusercontent.com/u/9496702?v=4", "gravatar_id": "", "url": "https://api.github.com/users/njzjz", "html_url": "https://github.com/njzjz", "followers_url": "https://api.github.com/users/njzjz/followers", "following_url": "https://api.github.com/users/njzjz/following{/other_user}", "gists_url": "https://api.github.com/users/njzjz/gists{/gist_id}", "starred_url": "https://api.github.com/users/njzjz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/njzjz/subscriptions", "organizations_url": "https://api.github.com/users/njzjz/orgs", "repos_url": "https://api.github.com/users/njzjz/repos", "events_url": "https://api.github.com/users/njzjz/events{/privacy}", "received_events_url": "https://api.github.com/users/njzjz/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks." ]
2025-01-17T11:42:57
2025-01-18T16:21:09
2025-01-18T16:21:05Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
See https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ ## Summary Major changes: - feature 1: ... - fix 1: ... ## Todos If this is work in progress, what else needs to be done? - feature 2: ... - fix 2: ## Checklist - [ ] Google format doc strings added. Check with `ruff`. - [ ] Type annotations included. Check with `mypy`. - [ ] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4257/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4257/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4257", "html_url": "https://github.com/materialsproject/pymatgen/pull/4257", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4257.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4257.patch", "merged_at": "2025-01-18T16:21:05Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4258
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4258/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4258/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4258/events
https://github.com/materialsproject/pymatgen/issues/4258
2,800,285,087
I_kwDOACgets6m6PWf
4,258
cannot install crystal-toolkit to visualise the structure
{ "login": "luciandf", "id": 48201912, "node_id": "MDQ6VXNlcjQ4MjAxOTEy", "avatar_url": "https://avatars.githubusercontent.com/u/48201912?v=4", "gravatar_id": "", "url": "https://api.github.com/users/luciandf", "html_url": "https://github.com/luciandf", "followers_url": "https://api.github.com/users/luciandf/followers", "following_url": "https://api.github.com/users/luciandf/following{/other_user}", "gists_url": "https://api.github.com/users/luciandf/gists{/gist_id}", "starred_url": "https://api.github.com/users/luciandf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/luciandf/subscriptions", "organizations_url": "https://api.github.com/users/luciandf/orgs", "repos_url": "https://api.github.com/users/luciandf/repos", "events_url": "https://api.github.com/users/luciandf/events{/privacy}", "received_events_url": "https://api.github.com/users/luciandf/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I could recreate this with Python 3.13 as [`pipes` has been removed in Python 3.13](https://docs.python.org/3/library/pipes.html):\n> This module is no longer part of the Python standard library. It was [removed in Python 3.13](https://docs.python.org/3/whatsnew/3.13.html#whatsnew313-pep594) after being deprecated in Python 3.11. The removal was decided in [PEP 594](https://peps.python.org/pep-0594/).\n\nI believe this is not a `pymatgen` issue but a [`crystal-toolkit`](https://github.com/materialsproject/crystaltoolkit) issue ([crystaltoolkit-extension](https://github.com/materialsproject/crystaltoolkit-extension) in fact), I would have a look at this later\n\n---\n\nI don't have experience with building a jupyter extension so I'm opening an issue to keep it tracked instead: https://github.com/materialsproject/crystaltoolkit/issues/445\n\n", "Please do not report issues with other packages on the Pymatgen repo, unless there is evidence that the issue stems from pymatgen. You can report this on the appropriate repo for the appropriate maintainer. I am closing this issue." ]
2025-01-20T21:19:38
2025-01-23T17:51:42
2025-01-23T17:34:10Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.13.1 ### Pymatgen version 2024.10.3 ### Operating system version EndeavorOS ### Current behavior I have installed pymatgen using the official instructions but I fail to install the crystal-toolkit module. It stops with the error that it cannot find a different module called `pipes`. ### Expected Behavior Install the crystal-toolkit and let me focus on the science rather than digging through weird python errors. ### Minimal example ```Python pip3 install crystal-toolkit ``` ### Relevant files to reproduce this bug _No response_
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4258/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4258/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4259
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4259/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4259/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4259/events
https://github.com/materialsproject/pymatgen/issues/4259
2,805,524,177
I_kwDOACgets6nOObR
4,259
Enhancement: Deterministic ``entry_id`` from ``Vasprun``
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I agree with this in general. But I would suggest something like `<comp>-<date/time>-<md5 hash of vasprun.xml>` as the entry id. ", "This has been fixed.", "Nice, thanks @shyuep!" ]
2025-01-22T23:09:32
2025-01-23T18:56:28
2025-01-23T17:34:37Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
When using the ``get_computed_entry()`` method for ``Vasprun``, the ``entry_id`` is automatically set to `f"vasprun-{datetime.now(tz=timezone.utc)}"`: https://github.com/materialsproject/pymatgen/blob/876b9998d0622161f48ecf29348cf479e3b54ad0/src/pymatgen/io/vasp/outputs.py#L871 This means that `entry_id` changes when the same `vasprun.xml` file is parsed at different times, which can be annoying as `entry_id` is used for comparing entries at different points, and saved `ComputedEntry` `json`s will differ as a result etc. So it would be useful if the `entry_id` was set to a more deterministic value rather than this. My suggestion would be to use the time of the _calculation_ (rather than time of parsing), which is available in the `generator` field of the `vasprun.xml`: ``` Archer4: Unperturbed_vasp_gam > head vasprun.xml <?xml version="1.0" encoding="ISO-8859-1"?> <modeling> <generator> <i name="program" type="string">vasp </i> <i name="version" type="string">6.4.3 </i> <i name="subversion" type="string">19Mar24 (build Jul 4 2024 15:56:16) gamma-only parallel </i> <i name="platform" type="string">HPECrayEX_GCC </i> <i name="date" type="string">2025 01 21 </i> <i name="time" type="string">23:56:14 </i> </generator> ``` The `generator` dict is already parsed in the `pymatgen` vasprun.xml parsing, but only `version` is kept for stored information: https://github.com/materialsproject/pymatgen/blob/876b9998d0622161f48ecf29348cf479e3b54ad0/src/pymatgen/io/vasp/outputs.py#L552 The `date` and `time` (and maybe version & formatted subversion) could be stored with parsed `Vasprun`s and used as a better automatic `entry_id`?
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4259/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4259/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4260
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4260/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4260/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4260/events
https://github.com/materialsproject/pymatgen/pull/4260
2,807,326,820
PR_kwDOACgets6IyPRe
4,260
Draft: Use external Package for FHI-aims IO interface
{ "login": "tpurcell90", "id": 7539573, "node_id": "MDQ6VXNlcjc1Mzk1NzM=", "avatar_url": "https://avatars.githubusercontent.com/u/7539573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tpurcell90", "html_url": "https://github.com/tpurcell90", "followers_url": "https://api.github.com/users/tpurcell90/followers", "following_url": "https://api.github.com/users/tpurcell90/following{/other_user}", "gists_url": "https://api.github.com/users/tpurcell90/gists{/gist_id}", "starred_url": "https://api.github.com/users/tpurcell90/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tpurcell90/subscriptions", "organizations_url": "https://api.github.com/users/tpurcell90/orgs", "repos_url": "https://api.github.com/users/tpurcell90/repos", "events_url": "https://api.github.com/users/tpurcell90/events{/privacy}", "received_events_url": "https://api.github.com/users/tpurcell90/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "If the idea is to move FHI aims to a new external package, I think it should be done completely. Then there is no need for the unit tests to be done here. It can be done in the new package. We can also remove all the FHI related test files.", "Okay that is reasonable, I will move the tests there." ]
2025-01-23T16:12:29
2025-03-11T16:01:31
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - moved FHI-aims specific content into a separate package (pyfhiaims) for ease of maintenance (stop multiple libraries from implementing the same basic interface) ## Todos If this is work in progress, what else needs to be done? - Workout how to best test the aims io interface/dependency tracker - check with community this does not break their setups ## Checklist - [ ] Google format doc strings added. Check with `ruff`. - [ ] Type annotations included. Check with `mypy`. - [ ] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4260/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4260/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4260", "html_url": "https://github.com/materialsproject/pymatgen/pull/4260", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4260.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4260.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4261
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4261/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4261/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4261/events
https://github.com/materialsproject/pymatgen/issues/4261
2,808,931,577
I_kwDOACgets6nbOT5
4,261
Mixing scheme fails to mix entries from the same material id even when their structures match
{ "login": "PutuB", "id": 133083336, "node_id": "U_kgDOB-6wyA", "avatar_url": "https://avatars.githubusercontent.com/u/133083336?v=4", "gravatar_id": "", "url": "https://api.github.com/users/PutuB", "html_url": "https://github.com/PutuB", "followers_url": "https://api.github.com/users/PutuB/followers", "following_url": "https://api.github.com/users/PutuB/following{/other_user}", "gists_url": "https://api.github.com/users/PutuB/gists{/gist_id}", "starred_url": "https://api.github.com/users/PutuB/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PutuB/subscriptions", "organizations_url": "https://api.github.com/users/PutuB/orgs", "repos_url": "https://api.github.com/users/PutuB/repos", "events_url": "https://api.github.com/users/PutuB/events{/privacy}", "received_events_url": "https://api.github.com/users/PutuB/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-24T09:13:38
2025-01-24T09:13:38
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.11.11 ### Pymatgen version 2025.1.23 ### Operating system version _No response_ ### Current behavior Hello, I recently tried using the MaterialsProjectDFTMixingScheme() to construct a GGA/GGA+U/R2SCAN phase diagram for Fe-O by following the code on the materials project documentation. However, I noticed that the constructed phase diagram used the mp-13-GGA entry even though mp-13-r2SCAN exists. It seems that the mixing function did not attempt to combine entries for mp-13 because its GGA and R2SCAN calculations employ different numbers of atoms in the cell: ``` Full Formula (Fe1) Reduced Formula: Fe abc : 2.459206 2.459352 2.459570 angles: 109.469122 109.467063 109.459583 pbc : True True True Sites (1) # SP a b c --- ---- --- --- --- 0 Fe 0 0 0 Full Formula (Fe2) Reduced Formula: Fe abc : 2.477813 2.477809 4.054295 angles: 90.000038 90.000320 109.469837 pbc : True True True Sites (2) # SP a b c --- ---- --- --- --- 0 Fe 0.5 0.5 0.5 1 Fe 1 1 0 ``` ### Expected Behavior The ground state at composition Fe (mp-13) has both GGA/GGA+U and R2SCAN entries, so I expected the R2SCAN entry to replace the GGA one. I have also checked that their structures matched using `StructureMatcher().fit()`. ### Minimal example ```Python from mp_api.client import MPRester from pymatgen.analysis.phase_diagram import PhaseDiagram, PDPlotter from pymatgen.entries.mixing_scheme import MaterialsProjectDFTMixingScheme with MPRester(my_key) as mpr: # Obtain GGA, GGA+U, and r2SCAN ComputedStructureEntry objects entries = mpr.get_entries_in_chemsys(elements=["Fe", "O"], additional_criteria={"thermo_types": ["GGA_GGA+U", "R2SCAN"]}) # Apply corrections locally with the mixing scheme scheme = MaterialsProjectDFTMixingScheme() corrected_entries = scheme.process_entries(entries, verbose=True) # Construct phase diagram pd = PhaseDiagram(corrected_entries) # Plot phase diagram PDPlotter(pd).get_plot() ``` ### Relevant files to reproduce this bug _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4261/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4261/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4262
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4262/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4262/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4262/events
https://github.com/materialsproject/pymatgen/pull/4262
2,809,358,263
PR_kwDOACgets6I5OZA
4,262
WIP: add script to generate lobster basis information
{ "login": "JaGeo", "id": 22094846, "node_id": "MDQ6VXNlcjIyMDk0ODQ2", "avatar_url": "https://avatars.githubusercontent.com/u/22094846?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JaGeo", "html_url": "https://github.com/JaGeo", "followers_url": "https://api.github.com/users/JaGeo/followers", "following_url": "https://api.github.com/users/JaGeo/following{/other_user}", "gists_url": "https://api.github.com/users/JaGeo/gists{/gist_id}", "starred_url": "https://api.github.com/users/JaGeo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JaGeo/subscriptions", "organizations_url": "https://api.github.com/users/JaGeo/orgs", "repos_url": "https://api.github.com/users/JaGeo/repos", "events_url": "https://api.github.com/users/JaGeo/events{/privacy}", "received_events_url": "https://api.github.com/users/JaGeo/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "[lobster_bases_PAWv64.zip](https://github.com/user-attachments/files/18561485/lobster_bases_PAWv64.zip)\r\n\r\nI made some minor changes to script that are system specific, and ran it with the v6.4-PAWs. I used different values for the minimal occupation and excluded any GW potential. I have also made some simple comparisons between the different versions and occupational cutoffs to spot any inconsistencies quicker. These comparisons can be found in the diff_1_2.yaml where only basis sets that are different are included. " ]
2025-01-24T12:36:38
2025-01-27T16:44:22
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary This is a script to read in POTCARs and generate the required basis set information files for all LOBSTER modules. As we might want to generate these files for newer versions of POTCARs, I wanted to make them available. (@Luccerboi for information)
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4262/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4262/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4262", "html_url": "https://github.com/materialsproject/pymatgen/pull/4262", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4262.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4262.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4263
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4263/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4263/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4263/events
https://github.com/materialsproject/pymatgen/issues/4263
2,810,706,064
I_kwDOACgets6nh_iQ
4,263
Segmentation fault when initializing SpacegroupAnalyzer
{ "login": "ajhoffman1229", "id": 11877580, "node_id": "MDQ6VXNlcjExODc3NTgw", "avatar_url": "https://avatars.githubusercontent.com/u/11877580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ajhoffman1229", "html_url": "https://github.com/ajhoffman1229", "followers_url": "https://api.github.com/users/ajhoffman1229/followers", "following_url": "https://api.github.com/users/ajhoffman1229/following{/other_user}", "gists_url": "https://api.github.com/users/ajhoffman1229/gists{/gist_id}", "starred_url": "https://api.github.com/users/ajhoffman1229/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ajhoffman1229/subscriptions", "organizations_url": "https://api.github.com/users/ajhoffman1229/orgs", "repos_url": "https://api.github.com/users/ajhoffman1229/repos", "events_url": "https://api.github.com/users/ajhoffman1229/events{/privacy}", "received_events_url": "https://api.github.com/users/ajhoffman1229/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-25T02:32:32
2025-01-25T02:46:05
2025-01-25T02:46:05Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.11.11 ### Pymatgen version 2025.1.24 ### Operating system version Ubuntu 20.04.6 LTS ### Current behavior For a given structure, when I try to create an instance of the `SpacegroupAnalyzer` class, I get an immediate segmentation fault. I suspect it's an issue with spglib (I have v2.5.0). Comments on previous issue #2641 suggested increasing the `symprec` when creating an instance of the class, but this has failed for values of 1e-2 to 1. ### Expected Behavior No segmentation fault. ### Minimal example ```Python symprec = 1e-1 angle_tolerance = 5.0 spg_analyzer = SpacegroupAnalyzer(structure, symprec=symprec, angle_tolerance=angle_tolerance) ``` ### Relevant files to reproduce this bug _No response_
{ "login": "ajhoffman1229", "id": 11877580, "node_id": "MDQ6VXNlcjExODc3NTgw", "avatar_url": "https://avatars.githubusercontent.com/u/11877580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ajhoffman1229", "html_url": "https://github.com/ajhoffman1229", "followers_url": "https://api.github.com/users/ajhoffman1229/followers", "following_url": "https://api.github.com/users/ajhoffman1229/following{/other_user}", "gists_url": "https://api.github.com/users/ajhoffman1229/gists{/gist_id}", "starred_url": "https://api.github.com/users/ajhoffman1229/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ajhoffman1229/subscriptions", "organizations_url": "https://api.github.com/users/ajhoffman1229/orgs", "repos_url": "https://api.github.com/users/ajhoffman1229/repos", "events_url": "https://api.github.com/users/ajhoffman1229/events{/privacy}", "received_events_url": "https://api.github.com/users/ajhoffman1229/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4263/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4263/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4264
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4264/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4264/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4264/events
https://github.com/materialsproject/pymatgen/issues/4264
2,810,745,299
I_kwDOACgets6niJHT
4,264
36 tests failed
{ "login": "yurivict", "id": 271906, "node_id": "MDQ6VXNlcjI3MTkwNg==", "avatar_url": "https://avatars.githubusercontent.com/u/271906?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yurivict", "html_url": "https://github.com/yurivict", "followers_url": "https://api.github.com/users/yurivict/followers", "following_url": "https://api.github.com/users/yurivict/following{/other_user}", "gists_url": "https://api.github.com/users/yurivict/gists{/gist_id}", "starred_url": "https://api.github.com/users/yurivict/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yurivict/subscriptions", "organizations_url": "https://api.github.com/users/yurivict/orgs", "repos_url": "https://api.github.com/users/yurivict/repos", "events_url": "https://api.github.com/users/yurivict/events{/privacy}", "received_events_url": "https://api.github.com/users/yurivict/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-25T04:03:54
2025-01-25T04:03:54
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.11 ### Pymatgen version 2025.1.23 ### Operating system version FreeBSD 14.2 ### Current behavior [log](https://freebsd.org/~yuri/py-pymatgen-2025.1.23-tests.log) ### Expected Behavior n/a ### Minimal example ```Python ``` ### Relevant files to reproduce this bug _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4264/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4264/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4265
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4265/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4265/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4265/events
https://github.com/materialsproject/pymatgen/pull/4265
2,810,918,796
PR_kwDOACgets6I-iI-
4,265
Clarify return float/int type for `core.Composition.reduced_composition` and siblings, minor type clean up for `core.Composition`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-25T10:45:45
2025-01-28T20:55:06
2025-01-28T20:32:18Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Clarify return float/int type for `core.Composition.reduced_composition` and siblings, `factor` returned by `reduce_formula` would be int instead of float (as a union type of float | int): https://github.com/materialsproject/pymatgen/blob/296a0ec856b22da847b2ccd0e55e146e071cb8fd/src/pymatgen/core/composition.py#L1345-L1348 - Minor type clean up for `core.Composition` - [x] `reduce_formula` is not covered by test
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4265/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4265/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4265", "html_url": "https://github.com/materialsproject/pymatgen/pull/4265", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4265.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4265.patch", "merged_at": "2025-01-28T20:32:18Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4268
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4268/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4268/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4268/events
https://github.com/materialsproject/pymatgen/pull/4268
2,811,907,126
PR_kwDOACgets6JBpa4
4,268
Add `Structure.get_symmetry_dataset` convenience method
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "it occurs to me i forgot to add a `@due.dcite` decorator to this method. @lan496 do you have something you'd like users of this method to cite? maybe just a Zenodo release or a `citation.cff` file for now? here's a similar example:\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/296a0ec856b22da847b2ccd0e55e146e071cb8fd/src/pymatgen/analysis/prototypes.py#L31-L35", "> do you have something you'd like users of this method to cite? maybe just a Zenodo release or a citation.cff file for now?\r\n\r\n@janosh For now, I think the citation for spglib is enough.\r\n```\r\n@article{spglib,\r\n author = {Atsushi Togo, Kohei Shinohara and Isao Tanaka},\r\n title = {Spglib: a software library for crystal symmetry search},\r\n journal = {Sci. Technol. Adv. Mater., Meth.},\r\n volume = {4},\r\n number = {1},\r\n pages = {2384822--2384836},\r\n year = {2024},\r\n doi = {10.1080/27660400.2024.2384822},\r\n url = {https://doi.org/10.1080/27660400.2024.2384822},\r\n}\r\n```", "remaining question after [8974a61](https://github.com/materialsproject/pymatgen/pull/4268/commits/8974a61ed1929e8bed619414721d5ec13f9b67e5): what should the default `symprec` and `angle_tolerance` across `moyopy` and `spglib` be. currently each code uses different defaults which can result in different symmetries returned by each backend. i believe the current `pymatgen` default `symprec=0.1` is far too loose. maybe the `spglib` default of `1e-5` is a bit too strict. i advocate we adopt `moyopy`'s default of `1e-4`. curious to hear your thoughts @lan496. also, the `angle_tolerance` in `moyopy` is in radians whereas `spglib` uses degrees, so we need to take care of unit conversion and also pick a consistent default", "Also curious to hear a perspective on that, concur the 0.1 default is probably far too loose. I think maybe fine for purposes of loosely grouping structures, for rough relaxations etc. We should probably add a note to the docstring to give a hint to the user what symprecs might be appropriate for what use cases.", "I don't have a strong opinion on symprec, but I will give some context. The general idea of all structure / symmetry comparisons in pymatgen is this: if I take two structures that have the \"same\" (either in structure matcher or in symmetry) and relax them in DFT, would I end up in the same place? In that context, 0.1A is good enough. It is highly unlikely that two structures that differ by 0.1A would relax to two different final structures or symmetries. \r\n\r\nFor spglib, I have found that sometimes there are some paradoxical behavior. A structure would fail with either too low or too high symmprec, but is ok in some intermediate range of symprec. \r\n\r\nIn the end, it really depends on your philosophy. Basically, if I take a structure and just moves one of the atoms by 0.11A, do you want that to break symmetry?", "Sorry, I accidentally merged. Feel free to submit a separate PR to change the default symprec.", "> Feel free to submit a separate PR to change the default symprec.\r\n\r\nhappy to but need some consensus on what the default should be. unless i hear otherwise, it'll be `1e-4`. @lan496 what would you recommend for `angle_tolerance`?", "@janosh I propose 0.01A. I think 1e-4 is far too strict. 0.01 is already an order of magnitude smaller than the shortest chemical bond. ", "I can just make this change myself.", "One thing to note, there are severe inconsistencies between moyopy and spglib. E.g., spglib returns the international symbol (which any sane symmetry analysis code would do). moyopy just returns the number. This makes it even more imperative that the default return type needs to be a consistent dict / named tuple. Otherwise the end user is going to be confused.", "You can get both from moyopy. The reason I think 0.1 is a bad default symprec is you shouldn't make the assumption for the user that they want the symmetry of the structure that their input might relax to. By default, you should assume they want the symmetry for the actual structure they pass.", "I implemented some basic changes. Feel free to make further mods and submit a PR. \r\n\r\nI don't necessarily disagree that we should return the symmetry of the structure that they pass. But that is a slippery argument. Symmetry is always based on tolerances. One can argue that even if an atom moves by 1e-100 A from the correct position, that already breaks symmetry in the strictest sense of the word. Surely we can all agree that a 1e-100 tolerance is too strict and will cause too many structures to be rendered P1.\r\n\r\nThe logical determination of symmetry tolerances should be based on **real-world perturbations with an actual impact on properties**. If a 0.01A shift has negligible impact on properties and is in fact 10 times smaller than the shortest chemical bond, it is good enough to say that the structures are symmetrically equivalent. We do not need a stricter cutoff based on some mathematical argument.", "From an implementation perspective, a symmetry finder (spglib and moyopy) struggles with too small or big symprec.\r\nFor too small symprec (say ~1e-10), the numerical accuracy for floating-point number may result in inconsistency: for example, detected symmetry operations with the large symprec may not form a group. \r\nFor too large symprec (~0.1), I sometimes observed weird behaviors as well. I think it comes from the inconsistency in the detected translation subgroup and symmetry operations.\r\n\r\nRecently, I've performed a benchmark of these symmetry finders with several symprec choices to Materials Project's entries ([link](https://github.com/spglib/moyo/blob/main/bench/mp/analysis.ipynb)). Let me check how symprec affects detected space-group types.", "You cannot determine the necessary symprec simply from just running on all MP structures. If symprec = 0.1 gives cubic and symprec = 0.00001 gives orthorhombic, which is correct?\r\n\r\nAt room temperature (300K), the typical atomic vibration amplitude is around 0.05 - 0.1 A. We can agree that thermal vibrations shouldn't break symmetry. So a tolerance of 0.01A is fine. (This is already the default for the Structure.get_space_group method).", "I do not intend to suggest determining a default symprec from statistics.\r\n\r\nThe following figures show how detected crystal systems are changed by symprec. Low-symmetry systems (triclinic and monoclinic) are especially affected by symprec choice as expected. \r\n\r\n![image](https://github.com/user-attachments/assets/da17b043-2c87-4f15-b567-dd58ddadd4ff)\r\n\r\n![image](https://github.com/user-attachments/assets/2c3f86c9-9ad3-4d45-b5b4-d7866d9b9e94)\r\n\r\nInteractive HTML for these figures:\r\n[sankey.zip](https://github.com/user-attachments/files/18601356/sankey.zip)\r\n" ]
2025-01-27T01:16:55
2025-01-30T11:43:07
2025-01-28T20:29:31Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
`moyopy` is a successor to `spglib` that's faster and written in Rust. in my usage so far for analyzing MLFF-relaxed WBM structures for https://matbench-discovery.materialsproject.org/tasks/geo-opt, it seems about 4x faster than `spglib` and gives identical results in nearly all 257k cases. a few exceptions were reported in https://github.com/CompRhys/aviary/pull/96 and resolution tracked in https://github.com/spglib/moyo/issues/54 this PR adds a convenience method for directly accessing `moyopy` symmetry analysis results on pymatgen `Structures`. it also defines a new optional dependency set `symmetry` in `pyproject.toml` ``` symmetry = ["moyopy>=0.3", "spglib>=2.5"] ``` pinging @lan496 related ASE issue: https://gitlab.com/ase/ase/-/issues/1612
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4268/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4268/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4268", "html_url": "https://github.com/materialsproject/pymatgen/pull/4268", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4268.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4268.patch", "merged_at": "2025-01-28T20:29:31Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4269
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4269/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4269/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4269/events
https://github.com/materialsproject/pymatgen/issues/4269
2,812,014,565
I_kwDOACgets6nm-_l
4,269
Possibly incorrect electron_configuration returned by vasp.inputs.PotcarSingle
{ "login": "pranabdas", "id": 31024886, "node_id": "MDQ6VXNlcjMxMDI0ODg2", "avatar_url": "https://avatars.githubusercontent.com/u/31024886?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pranabdas", "html_url": "https://github.com/pranabdas", "followers_url": "https://api.github.com/users/pranabdas/followers", "following_url": "https://api.github.com/users/pranabdas/following{/other_user}", "gists_url": "https://api.github.com/users/pranabdas/gists{/gist_id}", "starred_url": "https://api.github.com/users/pranabdas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pranabdas/subscriptions", "organizations_url": "https://api.github.com/users/pranabdas/orgs", "repos_url": "https://api.github.com/users/pranabdas/repos", "events_url": "https://api.github.com/users/pranabdas/events{/privacy}", "received_events_url": "https://api.github.com/users/pranabdas/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi thanks for reporting this and looks like a bug to me, and I could recreate this issue :)\n\n```python\nfrom pymatgen.core import Element\n\n\nele_hg = Element.from_Z(80)\n\nprint(ele_hg.full_electronic_structure)\n# [(1, 's', 2), (2, 's', 2), (2, 'p', 6), (3, 's', 2), (3, 'p', 6), (4, 's', 2), (3, 'd', 10), (4, 'p', 6), (5, 's', 2), (4, 'd', 10), (5, 'p', 6), (6, 's', 2), (4, 'f', 14), (5, 'd', 10)]\n```\n\nhttps://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/src/pymatgen/core/periodic_table.py#L42-L62\n\n---\n\nI guess it's related to the change in #3944 and we would need to fix how the valence shell is determined" ]
2025-01-27T03:35:06
2025-02-18T17:15:40
2025-02-18T17:15:40Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.10.16 ### Pymatgen version 2025.1.24 ### Operating system version _No response_ ### Current behavior It seems pymatgen returns incorrect valence configuration while parsing VASP POTCAR. Consider following code, where the POTCAR file corresponds to Hg (VASP-5.4, GGA, PBE, PAW, default): ```py from pymatgen.io.vasp.inputs import PotcarSingle with open("POTCAR", "r", encoding="utf-8") as file: data = file.read() print(PotcarSingle(data).electron_configuration) ``` It prints: ``` [(5, 'd', 10), (4, 'f', 14)] ``` ### Expected Behavior Previously, I tested `pymatgen==2023.8.10`, it used to return: ``` [(6, 's', 2), (5, 'd', 10)] ``` The second line (valence) in POTCAR file is: ``` 12.0000000000000 ``` Also, there is this line: ``` POMASS = XXX.XXX; ZVAL = 12.000 mass and valenz ``` So, I suppose the previous behavior (i.e, `[(6, 's', 2), (5, 'd', 10)]`, 12 valence electrons) was correct. Atomic configuration block: ``` Atomic configuration 15 entries n l j E occ. 1 0 0.50 XXX 2.0000 ... 4 3 3.50 XXX 14.0000 5 0 0.50 XXX 2.0000 5 1 1.50 XXX 6.0000 5 2 2.50 XXX 10.0000 6 0 0.50 XXX 2.0000 6 1 1.50 XXX 0.0000 ``` ### Minimal example ```Python We can create a temporary directory and create virtualenv for testing: mkdir test cd test python -m venv .venv source .venv/bin/activate pip install pymatgen Then please use POTCAR of Hg and run the above python code. To test older version of pymatgen, do the same instead install: pip install pymatgen==2023.8.10 numpy==1.* ``` ### Relevant files to reproduce this bug Sorry, but you need access to VASP POTCAR files, which cannot be shared due to copyright issues.
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4269/reactions", "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4269/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4270
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4270/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4270/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4270/events
https://github.com/materialsproject/pymatgen/pull/4270
2,813,617,100
PR_kwDOACgets6JHewv
4,270
Add `seed: int = 0` parameter to `Structure.perturb()` method
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I am confused why this is really needed. The definition of a random perturbation means it is non-deterministic. The only determinism is an inequality based on the amplitude of the perturbation.", "needed for downstream packages that use the `perturb` method in testing" ]
2025-01-27T17:26:06
2025-01-28T22:50:02
2025-01-28T20:10:07Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
- Update tests to verify reproducible random perturbations with same seed - Add test cases for different seed values and min_distance parameter
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4270/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4270/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4270", "html_url": "https://github.com/materialsproject/pymatgen/pull/4270", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4270.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4270.patch", "merged_at": "2025-01-28T20:10:07Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4271
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4271/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4271/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4271/events
https://github.com/materialsproject/pymatgen/pull/4271
2,815,895,830
PR_kwDOACgets6JPRVh
4,271
Add missing parenthesis to `electronic_structure.boltztrap.BoltztrapAnalyzer.get_extreme.is_isotropic`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-28T14:46:11
2025-01-28T20:53:58
2025-01-28T20:28:38Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Add missing parenthesis to `electronic_structure.boltztrap.BoltztrapAnalyzer.get_extreme.is_isotropic`, to fix #4165 - Minor type/comment/var name cleanup
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4271/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4271/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4271", "html_url": "https://github.com/materialsproject/pymatgen/pull/4271", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4271.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4271.patch", "merged_at": "2025-01-28T20:28:38Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4272
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4272/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4272/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4272/events
https://github.com/materialsproject/pymatgen/issues/4272
2,816,597,670
I_kwDOACgets6n4d6m
4,272
plotly 6.0.0 breaks `PDPlotter`
{ "login": "Andrew-S-Rosen", "id": 8674072, "node_id": "MDQ6VXNlcjg2NzQwNzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Andrew-S-Rosen", "html_url": "https://github.com/Andrew-S-Rosen", "followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers", "following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}", "gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions", "organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs", "repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos", "events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}", "received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-01-28T19:57:14
2025-02-18T17:09:03
2025-02-18T17:09:03Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.11 ### Pymatgen version 2025.1.24 ### Operating system version Windows ### Current behavior Plotly 6.0.0 was released mere minutes ago, and I got unlucky. It turns out this seems to cause issues with the `PDPlotter` utility: ```python from pymatgen.analysis.phase_diagram import PhaseDiagram, PDPlotter from mp_api.client import MPRester with MPRester() as mpr: entries = mpr.get_entries_in_chemsys(elements=["Si", "O"],additional_criteria={"thermo_types": ["GGA_GGA+U"]}) pd = PhaseDiagram(entries) plot = PDPlotter(pd).get_plot() plot.show() ``` Switching back to plotly==5.24.1 resolves the issue. ### Expected Behavior Plot should be shown. Instead, I get ``` ValueError: Invalid property specified for object of type plotly.graph_objs.layout.XAxis: 'titlefont' ``` ### Traceback ``` Retrieving ThermoDoc documents: 100%  407/407 [00:00<00:00, 36974.63it/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[4], [line 7](vscode-notebook-cell:?execution_count=4&line=7) [5](vscode-notebook-cell:?execution_count=4&line=5) pd = PhaseDiagram(entries) [6](vscode-notebook-cell:?execution_count=4&line=6) # Plot phase diagram ----> [7](vscode-notebook-cell:?execution_count=4&line=7) plot = PDPlotter(pd).get_plot() [8](vscode-notebook-cell:?execution_count=4&line=8) plot.show() File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\pymatgen\analysis\phase_diagram.py:2310, in PDPlotter.get_plot(self, label_stable, label_unstable, ordering, energy_colormap, process_attributes, ax, label_uncertainties, fill, highlight_entries) [2307](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/pymatgen/analysis/phase_diagram.py:2307) data.append(highlight_plot) [2309](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/pymatgen/analysis/phase_diagram.py:2309) fig = go.Figure(data=data) -> [2310](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/pymatgen/analysis/phase_diagram.py:2310) fig.layout = self._create_plotly_figure_layout() [2311](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/pymatgen/analysis/phase_diagram.py:2311) fig.update_layout(coloraxis_colorbar={"yanchor": "top", "y": 0.05, "x": 1}) [2313](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/pymatgen/analysis/phase_diagram.py:2313) elif self.backend == "matplotlib": File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:718, in BaseFigure.__setattr__(self, prop, value) [705](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:705) """ [706](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:706) Parameters [707](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:707) ---------- (...) [714](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:714) None [715](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:715) """ [716](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:716) if prop.startswith("_") or hasattr(self, prop): [717](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:717) # Let known properties and private properties through --> [718](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:718) super(BaseFigure, self).__setattr__(prop, value) [719](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:719) else: [720](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:720) # Raise error on unknown public properties [721](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:721) raise AttributeError(prop) File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:2552, in BaseFigure.layout(self, new_layout) [2547](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2547) @layout.setter [2548](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2548) def layout(self, new_layout): [2549](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2549) [2550](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2550) # Validate new layout [2551](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2551) # ------------------- -> [2552](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2552) new_layout = self._layout_validator.validate_coerce(new_layout) [2553](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2553) new_layout_data = deepcopy(new_layout._props) [2555](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2555) # Unparent current layout [2556](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:2556) # ----------------------- File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\_plotly_utils\basevalidators.py:2504, in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate) [2501](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2501) v = self.data_class() [2503](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2503) elif isinstance(v, dict): -> [2504](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2504) v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate) [2506](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2506) elif isinstance(v, self.data_class): [2507](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2507) # Copy object [2508](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2508) v = self.data_class(v) File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\graph_objs\_layout.py:7188, in Layout.__init__(self, arg, activeselection, activeshape, annotations, annotationdefaults, autosize, autotypenumbers, barcornerradius, bargap, bargroupgap, barmode, barnorm, boxgap, boxgroupgap, boxmode, calendar, clickmode, coloraxis, colorscale, colorway, computed, datarevision, dragmode, editrevision, extendfunnelareacolors, extendiciclecolors, extendpiecolors, extendsunburstcolors, extendtreemapcolors, font, funnelareacolorway, funnelgap, funnelgroupgap, funnelmode, geo, grid, height, hiddenlabels, hiddenlabelssrc, hidesources, hoverdistance, hoverlabel, hovermode, hoversubplots, iciclecolorway, images, imagedefaults, legend, map, mapbox, margin, meta, metasrc, minreducedheight, minreducedwidth, modebar, newselection, newshape, paper_bgcolor, piecolorway, plot_bgcolor, polar, scattergap, scattermode, scene, selectdirection, selectionrevision, selections, selectiondefaults, separators, shapes, shapedefaults, showlegend, sliders, sliderdefaults, smith, spikedistance, sunburstcolorway, template, ternary, title, transition, treemapcolorway, uirevision, uniformtext, updatemenus, updatemenudefaults, violingap, violingroupgap, violinmode, waterfallgap, waterfallgroupgap, waterfallmode, width, xaxis, yaxis, **kwargs) [7186](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/_layout.py:7186) _v = xaxis if xaxis is not None else _v [7187](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/_layout.py:7187) if _v is not None: -> [7188](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/_layout.py:7188) self["xaxis"] = _v [7189](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/_layout.py:7189) _v = arg.pop("yaxis", None) [7190](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/_layout.py:7190) _v = yaxis if yaxis is not None else _v File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:5898, in BaseLayoutType.__setitem__(self, prop, value) [5895](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5895) match = self._subplot_re_match(prop) [5896](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5896) if match is None: [5897](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5897) # Set as ordinary property -> [5898](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5898) super(BaseLayoutHierarchyType, self).__setitem__(prop, value) [5899](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5899) else: [5900](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5900) # Set as subplotid property [5901](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5901) self._set_subplotid_prop(prop, value) File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:4852, in BasePlotlyType.__setitem__(self, prop, value) [4850](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4850) # ### Handle compound property ### [4851](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4851) if isinstance(validator, CompoundValidator): -> [4852](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4852) self._set_compound_prop(prop, value) [4854](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4854) # ### Handle compound array property ### [4855](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4855) elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:5263, in BasePlotlyType._set_compound_prop(self, prop, val) [5260](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5260) # Import value [5261](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5261) # ------------ [5262](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5262) validator = self._get_validator(prop) -> [5263](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5263) val = validator.validate_coerce(val, skip_invalid=self._skip_invalid) [5265](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5265) # Save deep copies of current and new states [5266](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5266) # ------------------------------------------ [5267](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:5267) curr_val = self._compound_props.get(prop, None) File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\_plotly_utils\basevalidators.py:2504, in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate) [2501](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2501) v = self.data_class() [2503](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2503) elif isinstance(v, dict): -> [2504](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2504) v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate) [2506](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2506) elif isinstance(v, self.data_class): [2507](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2507) # Copy object [2508](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/_plotly_utils/basevalidators.py:2508) v = self.data_class(v) File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\graph_objs\layout\_xaxis.py:4493, in XAxis.__init__(self, arg, anchor, automargin, autorange, autorangeoptions, autotickangles, autotypenumbers, calendar, categoryarray, categoryarraysrc, categoryorder, color, constrain, constraintoward, dividercolor, dividerwidth, domain, dtick, exponentformat, fixedrange, gridcolor, griddash, gridwidth, hoverformat, insiderange, labelalias, layer, linecolor, linewidth, matches, maxallowed, minallowed, minexponent, minor, mirror, nticks, overlaying, position, range, rangebreaks, rangebreakdefaults, rangemode, rangeselector, rangeslider, scaleanchor, scaleratio, separatethousands, showdividers, showexponent, showgrid, showline, showspikes, showticklabels, showtickprefix, showticksuffix, side, spikecolor, spikedash, spikemode, spikesnap, spikethickness, tick0, tickangle, tickcolor, tickfont, tickformat, tickformatstops, tickformatstopdefaults, ticklabelindex, ticklabelindexsrc, ticklabelmode, ticklabeloverflow, ticklabelposition, ticklabelshift, ticklabelstandoff, ticklabelstep, ticklen, tickmode, tickprefix, ticks, tickson, ticksuffix, ticktext, ticktextsrc, tickvals, tickvalssrc, tickwidth, title, type, uirevision, visible, zeroline, zerolinecolor, zerolinewidth, **kwargs) [4489](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4489) self["zerolinewidth"] = _v [4491](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4491) # Process unknown kwargs [4492](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4492) # ---------------------- -> [4493](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4493) self._process_kwargs(**dict(arg, **kwargs)) [4495](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4495) # Reset skip_invalid [4496](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4496) # ------------------ [4497](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/graph_objs/layout/_xaxis.py:4497) self._skip_invalid = False File c:\Users\asrosen\AppData\Local\miniconda3\envs\cms\Lib\site-packages\plotly\basedatatypes.py:4378, in BasePlotlyType._process_kwargs(self, **kwargs) [4376](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4376) self[k] = v [4377](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4377) elif not self._skip_invalid: -> [4378](file:///C:/Users/asrosen/AppData/Local/miniconda3/envs/cms/Lib/site-packages/plotly/basedatatypes.py:4378) raise err ValueError: Invalid property specified for object of type plotly.graph_objs.layout.XAxis: 'titlefont' Did you mean "tickfont"? Valid properties: anchor If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding opposite-letter axis. If set to "free", this axis' position is determined by `position`. automargin Determines whether long tick labels automatically grow the figure margins. autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.xaxis.Autorangeopti ons` instance or dict with compatible properties autotickangles When `tickangle` is set to "auto", it will be set to the first angle in this array that is large enough to prevent label overlap. autotypenumbers Using "strict" a numeric string in trace data is not converted to a number. Using *convert types* a numeric string in trace data may be treated as a number during automatic axis `type` detection. Defaults to layout.autotypenumbers. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. color Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. constrain If this axis needs to be compressed (either due to its own `scaleanchor` and `scaleratio` or those of the other axis), determines how that happens: by increasing the "range", or by decreasing the "domain". Default is "domain" for axes containing image traces, "range" otherwise. constraintoward If this axis needs to be compressed (either due to its own `scaleanchor` and `scaleratio` or those of the other axis), determines which direction we push the originally specified plot area. Options are "left", "center" (default), and "right" for x axes, and "top", "middle" (default), and "bottom" for y axes. dividercolor Sets the color of the dividers Only has an effect on "multicategory" axes. dividerwidth Sets the width (in px) of the dividers Only has an effect on "multicategory" axes. domain Sets the domain of this axis (in plot fraction). dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. fixedrange Determines whether or not this axis is zoom-able. If true, then zoom is disabled. gridcolor Sets the color of the grid lines. griddash Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" insiderange Could be used to set the desired inside range of this axis (excluding the labels) when `ticklabelposition` of the anchored axis has "inside". Not implemented for axes with `type` "log". This would be ignored when `range` is provided. labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. layer Sets the layer on which this axis is displayed. If *above traces*, this axis is displayed above all the subplot's traces If *below traces*, this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces with `cliponaxis` set to False to show markers and/or text nodes above this axis. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. matches If set to another axis id (e.g. `x2`, `y`), the range of this axis will match the range of the corresponding axis in data-coordinates space. Moreover, matching axes share auto-range values, category lists and histogram auto-bins. Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint is currently forbidden. Moreover, note that matching axes must have the same `type`. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". minor :class:`plotly.graph_objects.layout.xaxis.Minor` instance or dict with compatible properties mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". overlaying If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis, with traces and axes visible for both axes. If False, this axis does not overlay any same-letter axes. In this case, for axes with overlapping domains only the highest- numbered axis will be visible. position Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to "free". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangebreaks A tuple of :class:`plotly.graph_objects.layout.xaxis.Rangebreak` instances or dicts with compatible properties rangebreakdefaults When used in a template (as layout.template.layout.xaxis.rangebreakdefaults), sets the default property values to use for elements of layout.xaxis.rangebreaks rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. rangeselector :class:`plotly.graph_objects.layout.xaxis.Rangeselector ` instance or dict with compatible properties rangeslider :class:`plotly.graph_objects.layout.xaxis.Rangeslider` instance or dict with compatible properties scaleanchor If set to another axis id (e.g. `x2`, `y`), the range of this axis changes together with the range of the corresponding axis such that the scale of pixels per unit is in a constant ratio. Both axes are still zoomable, but when you zoom one, the other will zoom the same amount, keeping a fixed midpoint. `constrain` and `constraintoward` determine how we enforce the constraint. You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` but you can only link axes of the same `type`. The linked axis can have the opposite letter (to constrain the aspect ratio) or the same letter (to match scales across subplots). Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant and the last constraint encountered will be ignored to avoid possible inconsistent constraints via `scaleratio`. Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint is currently forbidden. Setting `false` allows to remove a default constraint (occasionally, you may need to prevent a default `scaleanchor` constraint from being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}` is set automatically in order for pixels to be rendered as squares, setting `yaxis: {scaleanchor: false}` allows to remove the constraint). scaleratio If this axis is linked to another by `scaleanchor`, this determines the pixel to unit scale ratio. For example, if this value is 10, then every unit on this axis spans 10 times the number of pixels as a unit on the linked axis. Use this for example to create an elevation profile where the vertical scale is exaggerated a fixed amount with respect to the horizontal. separatethousands If "true", even 4-digit integers are separated showdividers Determines whether or not a dividers are drawn between the category levels of this axis. Only has an effect on "multicategory" axes. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Determines whether or not spikes (aka droplines) are drawn for this axis. Note: This only takes affect when hovermode = closest showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. side Determines whether a x (y) axis is positioned at the "bottom" ("left") or "top" ("right") of the plotting area. spikecolor Sets the spike color. If undefined, will use the series color spikedash Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). spikemode Determines the drawing mode for the spike line If "toaxis", the line is drawn from the data point to the axis the series is plotted on. If "across", the line is drawn across the entire plot area, and supercedes "toaxis". If "marker", then a marker dot is drawn on the axis the series is plotted on spikesnap Determines whether spikelines are stuck to the cursor or to the closest datapoints. spikethickness Sets the width (in px) of the zero line. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops A tuple of :class:`plotly.graph_objects.layout.xaxis.Ti ckformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.layout.xaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.xaxis.tickformatstops ticklabelindex Only for axes with `type` "date" or "linear". Instead of drawing the major tick label, draw the label for the minor tick that is n positions away from the major tick. E.g. to always draw the label for the minor tick before each major tick, choose `ticklabelindex` -1. This is useful for date axes with `ticklabelmode` "period" if you want to label the period that ends with each major tick instead of the period that begins there. ticklabelindexsrc Sets the source reference on Chart Studio Cloud for `ticklabelindex`. ticklabelmode Determines where tick labels are drawn with respect to their corresponding ticks and grid lines. Only has an effect for axes of `type` "date" When set to "period", tick labels are drawn in the middle of the period between ticks. ticklabeloverflow Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is *hide past domain*. Otherwise on "category" and "multicategory" axes the default is "allow". In other cases the default is *hide past div*. ticklabelposition Determines where tick labels are drawn with respect to the axis Please note that top or bottom has no effect on x axes or when `ticklabelmode` is set to "period". Similarly left or right has no effect on y axes or when `ticklabelmode` is set to "period". Has no effect on "multicategory" axes or when `tickson` is set to "boundaries". When used on axes linked by `matches` or `scaleanchor`, no extra padding for inside labels would be added by autorange, so that the scales could match. ticklabelshift Shifts the tick labels by the specified number of pixels in parallel to the axis. Positive values move the labels in the positive direction of the axis. ticklabelstandoff Sets the standoff distance (in px) between the axis tick labels and their default position. A positive `ticklabelstandoff` moves the labels farther away from the plot area if `ticklabelposition` is "outside", and deeper into the plot area if `ticklabelposition` is "inside". A negative `ticklabelstandoff` works in the opposite direction, moving outside ticks towards the plot area and inside ticks towards the outside. If the negative value is large enough, inside ticks can even end up outside and vice versa. ticklabelstep Sets the spacing between tick labels as compared to the spacing between ticks. A value of 1 (default) means each tick gets a label. A value of 2 means shows every 2nd label. A larger value n means only every nth tick is labeled. `tick0` determines which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). If "sync", the number of ticks will sync with the overlayed axis set by `overlaying` property. tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. tickson Determines where ticks and grid lines are drawn with respect to their corresponding tick labels. Only has an effect for axes of `type` "category" or "multicategory". When set to "boundaries", ticks and grid lines are drawn half a category to the left/bottom of labels. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.xaxis.Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. uirevision Controls persistence of user-driven changes in axis `range`, `autorange`, and `title` if in `editable: true` configuration. Defaults to `layout.uirevision`. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Did you mean "tickfont"? Bad property path: titlefont ^^^^^^^^^ ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4272/reactions", "total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 3, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4272/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4273
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4273/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4273/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4273/events
https://github.com/materialsproject/pymatgen/pull/4273
2,816,659,325
PR_kwDOACgets6JR4-a
4,273
Revert "Add `Structure.get_symmetry_dataset` convenience method (#4268)"
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I see this was closed but just curious, was there an issue here?", "Nope." ]
2025-01-28T20:31:52
2025-01-31T19:54:23
2025-01-28T20:31:56Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
This reverts commit 4375e342f31a10fc023c9b07df5db6f316c738d4. ## Summary Major changes: - feature 1: ... - fix 1: ... ## Todos If this is work in progress, what else needs to be done? - feature 2: ... - fix 2: ## Checklist - [ ] Google format doc strings added. Check with `ruff`. - [ ] Type annotations included. Check with `mypy`. - [ ] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4273/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4273/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4273", "html_url": "https://github.com/materialsproject/pymatgen/pull/4273", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4273.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4273.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4274
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4274/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4274/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4274/events
https://github.com/materialsproject/pymatgen/pull/4274
2,816,867,930
PR_kwDOACgets6JSmet
4,274
Move `occ_tol` to init in `OrderDisorderedStructureTransformation`
{ "login": "Tinaatucsd", "id": 22058433, "node_id": "MDQ6VXNlcjIyMDU4NDMz", "avatar_url": "https://avatars.githubusercontent.com/u/22058433?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Tinaatucsd", "html_url": "https://github.com/Tinaatucsd", "followers_url": "https://api.github.com/users/Tinaatucsd/followers", "following_url": "https://api.github.com/users/Tinaatucsd/following{/other_user}", "gists_url": "https://api.github.com/users/Tinaatucsd/gists{/gist_id}", "starred_url": "https://api.github.com/users/Tinaatucsd/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Tinaatucsd/subscriptions", "organizations_url": "https://api.github.com/users/Tinaatucsd/orgs", "repos_url": "https://api.github.com/users/Tinaatucsd/repos", "events_url": "https://api.github.com/users/Tinaatucsd/events{/privacy}", "received_events_url": "https://api.github.com/users/Tinaatucsd/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks @Tinaatucsd, it looks like `occ_tol` should have been placed as an attribute of the class since only the first two parameters are called by the `alchemy` part of the code. \r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/296a0ec856b22da847b2ccd0e55e146e071cb8fd/src/pymatgen/alchemy/materials.py#L123C1-L126C1\r\n\r\nThis was an oversight on my part. Thanks for finding this!\r\n", "Thanks." ]
2025-01-28T22:50:29
2025-02-18T17:14:03
2025-02-18T17:13:57Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - fix 1: Fixed incompatibility between `OrderDisorderedStructureTransformation` and `StandardTransmuter`: - Previously, `occ_tol` was a method parameter in `apply_transformation`, making it unconfigurable when used with `StandardTransmuter` (which only passes transformation and optionally `extend_collection` parameters when calling `append_transformation`) - Moved `occ_tol` to class initialization to allow proper configuration when used in transformation chains ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) Tip: Install `pre-commit` hooks to auto-check types and linting before every commit: ```sh pip install -U pre-commit pre-commit install ```
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4274/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4274/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4274", "html_url": "https://github.com/materialsproject/pymatgen/pull/4274", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4274.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4274.patch", "merged_at": "2025-02-18T17:13:57Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4275
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4275/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4275/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4275/events
https://github.com/materialsproject/pymatgen/pull/4275
2,819,003,305
PR_kwDOACgets6JZ2YB
4,275
Fix default `transformation_kwargs` in `analysis.magnetism.analyze.MagneticStructureEnumerator`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I realized I wrote some review messages here too that you can't see ;-)\r\n\r\n> I think here it should be\r\n> SELF.transformation_kwargs = {\"check_ordered_symmetry\": False, \"timeout\".....", "I also tested this one and it works fine.\r\n", "Thanks for testing!", "Just to be sure, I found that line 670 should include a `self.`:\r\n`SELF.transformation_kwargs = {\"check_ordered_symmetry\": False, \"timeout`", "Looks like the code in your comment is incomplete, can you double check or explain?\r\n\r\nAssign to attribute is already included:\r\n```python\r\ntransformation_kwargs = transformation_kwargs or {}\r\ntransformation_kwargs = {\"check_ordered_symmetry\": False, \"timeout\": 5} | transformation_kwargs\r\nself.transformation_kwargs = transformation_kwargs\r\n```\r\n\r\nI just refactored to an one liner but should function the same\r\n\r\n```python\r\nself.transformation_kwargs = {\"check_ordered_symmetry\": False, \"timeout\": 5} | (transformation_kwargs or {})\r\n```" ]
2025-01-29T19:00:09
2025-02-18T17:53:23
2025-02-18T17:14:29Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Fix default `transformation_kwargs` in `analysis.magnetism.analyze.MagneticStructureEnumerator`, to close #4184 - Minor comment and type cleanup
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4275/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4275/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4275", "html_url": "https://github.com/materialsproject/pymatgen/pull/4275", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4275.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4275.patch", "merged_at": "2025-02-18T17:14:29Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4276
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4276/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4276/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4276/events
https://github.com/materialsproject/pymatgen/pull/4276
2,819,166,927
PR_kwDOACgets6JaarG
4,276
Fix timeout in `command_line.enumlib_caller.EnumlibAdaptor`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Hi @fraricci sorry for the late response, can you help me test if this patch works? I don't have a \"slow enough\" enumlib job to test with (the unit test job last only 0.04 s and I'm not sure if it's really validating the behaviour), thanks a lot!", "Hey @DanielYang59, I just saw your fix here. Sure I can test it on my structure if still needed.", "Sure, please have a try and let me know whether the fix works for you", "I tested and still it does not work. \r\nI tried to insert some print to understand and found that the line\r\n`output = process.communicate(timeout=timeout)[0].decode(\"utf-8\")`\r\nis executed instantly without waiting for the timeout and it is not generating any error.\r\n\r\nAlso, a version that uses `sleep 60` reveals that this logic does catch the timeout but \r\nit still waits the end of the command to return the raised error\r\n```\r\nENUM_CMD = [\"/usr/bin/sleep\",\"30\"]\r\ntimeout = 6\r\nwith subprocess.Popen(ENUM_CMD, stdout=subprocess.PIPE, stdin=subprocess.PIPE, close_fds=True) as process:\r\n print(timeout)\r\n try:\r\n print(\"running\")\r\n output = process.communicate(timeout=timeout)[0].decode(\"utf-8\")\r\n print(\"running ended\")\r\n \r\n except subprocess.TimeoutExpired as exc:\r\n print(\"timeout\")\r\n raise TimeoutError(\"Enumeration took too long\")\r\n```\r\nI think we need to kill the process inside the except.", "Hi thanks for testing. I cannot really say for sure because I haven't really used `enumlib` (maybe it doesn't respond to SIGTERM or something?).\r\n\r\nIn this case is it possible to share the structure and code for me to recreate this?", "Yeah, I think enum.x is not responding as other commands do.\r\nHere is a structure which enumlib should take some time for computing all the configurations.\r\n[POSCAR_mp-1218641.txt](https://github.com/user-attachments/files/18770183/POSCAR_mp-1218641.txt)\r\n\r\nThe code is yours with some print lines as in the example above.\r\n\r\nLet me know what you find, thanks!", "> The code is yours with some print lines as in the example above.\r\n\r\nI guess I might be missing something (as I didn't share any code before). I tried the following script and seem to get another error (looks like the `SpacegroupAnalyzer` cannot find `symmetrized_structure`, even after I used a less strict `enum_precision_parameter`):\r\n\r\n```python\r\nfrom pymatgen.core import Structure\r\nfrom pymatgen.command_line.enumlib_caller import EnumlibAdaptor\r\n\r\n\r\nstruct = Structure.from_file(\"./POSCAR_mp-1218641.txt\")\r\n\r\nadaptor = EnumlibAdaptor(struct, enum_precision_parameter=0.01, timeout=5)\r\n\r\n# Expect TimeoutError\r\nadaptor.run()\r\n\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/yang/developer/pymatgen/debug/test_enumlib_timeout.py\", line 10, in <module>\r\n adaptor.run()\r\n ~~~~~~~~~~~^^\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/command_line/enumlib_caller.py\", line 136, in run\r\n self._gen_input_file()\r\n ~~~~~~~~~~~~~~~~~~~~^^\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/command_line/enumlib_caller.py\", line 205, in _gen_input_file\r\n sg_num = get_sg_number(curr_sites)\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/command_line/enumlib_caller.py\", line 199, in get_sg_number\r\n finder = SpacegroupAnalyzer(Structure.from_sites(ss), self.symm_prec)\r\n ~~~~~~~~~~~~~~~~~~~~^^^^\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/core/structure.py\", line 1254, in from_sites\r\n raise ValueError(f\"You need at least 1 site to construct a {cls.__name__}\")\r\nValueError: You need at least 1 site to construct a Structure\r\n```\r\n\r\nCan you share a code snippet for me to recreate this? Thanks!\r\n", "I see, calling the EnumlibAdapter on that structure does not work.\r\nHere my code:\r\n```\r\nfrom pymatgen.analysis.magnetism.analyzer import MagneticStructureEnumerator\r\nfrom monty.serialization import loadfn\r\n\r\nst = Structure.from_file(\"./POSCAR_mp-1218641.txt\")\r\nenum_mag = MagneticStructureEnumerator(st,transformation_kwargs={\"timeout\":1})\r\n```\r\nNote: you need the other fix to get the timout arg passed correctly to the EnumlibAdapter.\r\n\r\nLet me know how that goes.", "Great! Really appreciate the code snippet!\r\n\r\nI just had a look but I don't think that code snippet is enough to recreate the issue. In my case, the total runtime of the entire script (at around 150 seconds) is indeed longer than the `timeout` (note the `timeout` is in **minutes** so it's 60 seconds). However the run time of `_run_multienum` is around 0.01 seconds so we're far from hitting that timeout.\r\n\r\nI guess we'd be much better off to have a code snnipet that could isolate this issue (the above code is a super high level wrapper and `enum_caller` is deeply nested).\r\n\r\n---\r\n\r\nI also did a quick line profiling of the script:\r\n- `__init__` `of MagneticStructureEnumerator` points out that `_generate_ordered_structures` is the bottlenect (100% of total run time): [profile_init_MagneticStructureEnumerator.log](https://github.com/user-attachments/files/18811817/profile_init_MagneticStructureEnumerator.log)\r\n- `duplicate_checker.matches_ordering(check_structure)` (350 hits) takes up 88% of the run time on `_generate_ordered_structures`: [profile_generate_ordered_structures.log](https://github.com/user-attachments/files/18811820/profile_generate_ordered_structures.log)\r\n- Another cProfile log (remove the `.txt` suffix): [profile_output.prof.txt](https://github.com/user-attachments/files/18811952/profile_output.prof.txt)\r\n\r\nI didn't go further than this as it's already unrelated to `timeout` on the `enumlib_caller` side, just mention this in case you want to optimize this part.\r\n", "Thanks for pointing out that the bottleneck might be not the enumeration but the \"duplicate_checker\" step.\r\nHere a custom structure that can be used directly by EnumlibAdaptor\r\n[struct_for_testing_enumlib.json](https://github.com/user-attachments/files/18825409/struct_for_testing_enumlib.json)\r\nand here the code I used for testing.\r\n```\r\nfrom pymatgen.core import Structure\r\nfrom pymatgen.command_line.enumlib_caller import EnumlibAdaptor\r\nimport time\r\n\r\nstruct = loadfn(\"./struct_for_testing_enumlib.json\")\r\n\r\nadaptor = EnumlibAdaptor(struct_for_enumlib,\r\n max_cell_size=10, #increasing this while take longer and hit the timeout\r\n timeout=0.1)\r\n\r\n# Expect TimeoutError\r\nadaptor.run()\r\n```\r\n\r\nThis should take enough time and reveals that the current implementation is actually working, but still missing the process.terminate()/kill() in the exception (as mentioned above).\r\nAnother process that is taking some time is the step \"getting_structures\" in the enumlibAdaptor.run() which follows the enumeration, and that fooled me in the beginning in finding the culprit.\r\n\r\nLet me know what you find and we can close this I think.\r\n", "Beautiful! I could now recreate this issue (it's super helpful)!\r\n\r\nLooks like `enum.x` indeed doesn't correctly respond to SIGTERM (`subprocess.TimeoutExpired` is caught successfully but the `enum.x` process wouldn't terminate), I switched to [send `SIGKILL`](https://docs.python.org/3/library/subprocess.html#subprocess.Popen.kill) instead.\r\n\r\nI tested and seem to work on my side, can you have a try?\r\n", "@fraricci Can I have your permission to include the `[struct_for_testing_enumlib.json](https://github.com/user-attachments/files/18825409/struct_for_testing_enumlib.json)` file into the `pymatgen` test suite (as a test file)? Previous test doesn't seem to do what it should, we need to update it.", "Good news, glad it helped out testing correctly this issue. \r\nI had already tested myself adding `process.terminate()` in the exception and it works fine.\r\nSure, go ahead and include that structure into the test suit.\r\n\r\nIf you can also change the error message as I mentioned above, that could be great.\r\n\r\nThanks!", "> I had already tested myself adding process.terminate() in the exception and it works fine.\r\n\r\nGreat to know. You could directly checkout my branch (no need to manually apply the change)\r\n\r\n> If you can also change the error message as I mentioned above, that could be great.\r\n\r\nHappy to change, but I'm not seeing anything related to this?", "It was just easier to add one line than go through updating branch ;-)\r\n\r\nI mentioned this in a message above:\r\n\r\n> Could you change the message into:\r\n> f\"Enumeration took more than the provided timeout {self.timeout} minutes\"", "Done! Super weird, I still couldn't find that message for some reason", "It's a review message and I see that it is \"pending\". Maybe that's why you can't see it.\r\n\r\nAnyway, thanks. It's good to go.", "> It's a review message and I see that it is \"pending\". Maybe that's why you can't see it.\r\n\r\nThat explains, you have to submit the review message otherwise people cannot see it: https://github.com/orgs/community/discussions/10369\r\n\r\n> Anyway, thanks\r\n\r\nNo problem at all. Can never be done without your help :)\r\n", "Thanks all for the great bug fix!", "No problem at all!" ]
2025-01-29T20:10:21
2025-02-18T17:54:57
2025-02-18T17:11:29Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Fix timeout in `command_line.enumlib_caller.EnumlibAdaptor`, to fix #4185 - [x] Fix unit test, current unit test doesn't seem to work correctly (`Fortran runtime error: Cannot open file 'struct_enum.in': No such file or directory`)
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4276/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4276/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4276", "html_url": "https://github.com/materialsproject/pymatgen/pull/4276", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4276.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4276.patch", "merged_at": "2025-02-18T17:11:29Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4277
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4277/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4277/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4277/events
https://github.com/materialsproject/pymatgen/issues/4277
2,824,759,746
I_kwDOACgets6oXmnC
4,277
Monthly issue metrics report
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-01T02:28:39
2025-02-01T02:28:39
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
# Issue Metrics | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | | Time to first response | 14:26:33 | 7:57:22 | 1 day, 4:06:28 | | Time to close | 3 days, 16:04:18 | 2 days, 7:57:02 | 6 days, 8:27:55 | | Time to answer | None | None | None | | Metric | Count | | --- | ---: | | Number of items that remain open | 5 | | Number of items closed | 10 | | Number of most active mentors | 0 | | Total number of items created | 15 | | Title | URL | Author | Time to first response | Time to close | Time to answer | | --- | --- | --- | --- | --- | --- | | plotly 6.0.0 breaks `PDPlotter` | https://github.com/materialsproject/pymatgen/issues/4272 | [Andrew-S-Rosen](https://github.com/Andrew-S-Rosen) | None | None | None | | Possibly incorrect electron_configuration returned by vasp.inputs.PotcarSingle | https://github.com/materialsproject/pymatgen/issues/4269 | [pranabdas](https://github.com/pranabdas) | None | None | None | | 36 tests failed | https://github.com/materialsproject/pymatgen/issues/4264 | [yurivict](https://github.com/yurivict) | None | None | None | | Segmentation fault when initializing SpacegroupAnalyzer | https://github.com/materialsproject/pymatgen/issues/4263 | [ajhoffman1229](https://github.com/ajhoffman1229) | None | 0:13:33 | None | | Mixing scheme fails to mix entries from the same material id even when their structures match | https://github.com/materialsproject/pymatgen/issues/4261 | [PutuB](https://github.com/PutuB) | None | None | None | | Enhancement: Deterministic ``entry_id`` from ``Vasprun`` | https://github.com/materialsproject/pymatgen/issues/4259 | [kavanase](https://github.com/kavanase) | 0:29:11 | 18:25:05 | None | | cannot install crystal-toolkit to visualise the structure | https://github.com/materialsproject/pymatgen/issues/4258 | [luciandf](https://github.com/luciandf) | 2 days, 20:11:50 | 2 days, 20:14:32 | None | | Add method `Trajectory.to_ase_trajectory()` | https://github.com/materialsproject/pymatgen/issues/4252 | [janosh](https://github.com/janosh) | 0:09:47 | 1 day, 19:39:31 | None | | Some OUTCARs cannot be parsed | https://github.com/materialsproject/pymatgen/issues/4251 | [yantar92](https://github.com/yantar92) | 15:42:36 | 3 days, 21:39:32 | None | | Mismatch between CifParser parsed coordinates and coordinates in the CIF file | https://github.com/materialsproject/pymatgen/issues/4250 | [JuJueTanWan](https://github.com/JuJueTanWan) | 15:04:11 | 5 days, 5:11:44 | None | | ug: SlabGenerator modifies x-y dimensions for (001) slab in triclinic system | https://github.com/materialsproject/pymatgen/issues/4249 | [lufern11](https://github.com/lufern11) | 4:17:51 | 4:17:51 | None | | Can we get a new release with scheduled deprecations removed | https://github.com/materialsproject/pymatgen/issues/4248 | [lbluque](https://github.com/lbluque) | 7:57:22 | 1 day, 9:44:09 | None | | port MPSurfaceSet from atomate(1) to pymatgen | https://github.com/materialsproject/pymatgen/issues/4247 | [rkingsbury](https://github.com/rkingsbury) | 0:01:05 | None | None | | Remove `is_rare_earth_metal` | https://github.com/materialsproject/pymatgen/issues/4243 | [jevandezande](https://github.com/jevandezande) | 18:05:07 | 3 days, 23:23:21 | None | | Monthly issue metrics report | https://github.com/materialsproject/pymatgen/issues/4241 | [github-actions[bot]](https://github.com/github-actions[bot]) | None | 16 days, 13:53:38 | None | _This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_ Search query used to find these items: `repo:materialsproject/pymatgen is:issue created:2025-01-01..2025-01-31 -reason:"not planned"`
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4277/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4277/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4278
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4278/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4278/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4278/events
https://github.com/materialsproject/pymatgen/pull/4278
2,825,173,535
PR_kwDOACgets6JuvNf
4,278
[Breaking] Fix valence electron configuration parsing for `PotcarSingle.electron_configuration`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I have a feeling that we might need to rewrite the `electron_configuration` property to parse the \"Atomic configuration\" section of POTCAR instead of generating from Madelung energy ordering rule, as electron configuration from POTCAR may or may not agree with periodic table (now that it's a property of `PotcarSingle` instead of `Element`).\r\n\r\nFor example for the `PAW_PBE Fe 06Sep2000` POTCAR, the valence electron configuration is \"3d7 4s1\" instead of \"3d6 4s2\": https://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/tests/io/vasp/test_inputs.py#L1386\r\n\r\n```\r\n Atomic configuration\r\n 9 entries\r\n n l j E occ.\r\n 1 0 0.50 xxx 2.0000\r\n 2 0 0.50 xxx 2.0000\r\n 2 1 1.50 xxx 6.0000\r\n 3 0 0.50 xxx 2.0000\r\n 3 1 1.50 xxx 6.0000\r\n 3 2 2.50 xxx 7.0000\r\n 4 0 0.50 xxx 1.0000\r\n 4 1 1.50 xxx 0.0000\r\n 4 3 2.50 xxx 0.0000\r\n```\r\n\r\nCan you please give me some advice on this? @rkingsbury Thanks in advance\r\n", "@DanielYang59 \r\nI agree.\r\nMaybe, take a look at https://github.com/materialsproject/pymatgen/pull/4262\r\nIt partially parses this info already (the code is poorly written but ...)\r\n\r\nI also defines a cutoff for an occupied orbital which might help for non-integer cases ", "Hi @JaGeo good day and thanks for the comment\r\n\r\n> Maybe, take a look at https://github.com/materialsproject/pymatgen/pull/4262 It partially parses this info already\r\n\r\nBeautiful! Looks like the `dev_scripts.get_lobster_basis_from_potcars.get_valence` function could replace `electron_configuration` property? In this case do you want me to take over the valence electron property reader part of `PotcarSingle` (perhaps copy and refactor your `get_valence` code) and then you work on top of this for the LOBSTER part? Or do you want to work on both?\r\n\r\n> the code is poorly written but\r\n\r\nI guess no code is perfectly written without repeated refactor? :) https://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/src/pymatgen/dao.py#L18\r\n", "@DanielYang59 yes, it would be great if you take over and make this code a method for the potcar. Then, I can adapt the developer code.", "> it would be great if you take over and make this code a method for the potcar\r\n\r\nGreat! I guess we could either:\r\n- Simply change (fix) the implement of `electron_configuration` property (this PR would be breaking then)\r\n- Or go the safer way, deprecate current `electron_configuration` with a corrected property (something like `val_elec_config` or something, naming could be discussed later of course)\r\n\r\nWhich do you suggest? I might personally prefer the former now that its already giving the wrong results so I would consider this a fix?\r\n\r\n---\r\n\r\n> I also defines a cutoff for an occupied orbital which might help for non-integer cases\r\n\r\nI'm not really aware of non-integer occupancies from POTCARs, can you perhaps point me to some such POTCARs such that I could put more thinking on them?\r\n", "@DanielYang59 i also think it should be the former as it currently is implemented wrong in my opinion.\r\n\r\nLi, Be, maybe? Some have 0.01 occupancy, I think. If you have some potcars available, you can use the dev script to spot them.", "> i also think it should be the former as it currently is implemented wrong in my opinion.\r\n\r\nCool I would just replace for now but should be easy to switch anytime \r\n\r\n> Li, Be, maybe? Some have 0.01 occupancy, I think. If you have some potcars available, you can use the dev script to spot them.\r\n\r\nThanks I would have a look, I thought it's H.* (H.25, H.35, ...)", "@DanielYang59 thanks for flagging. I'm not qualified to comment on the best way to connect this to `POTCAR` output; my changes in #3944 were guided only by trying to follow the canonical Madelung's rule. But in general it seems parsing information specific to the calculation is always better than assuming a standard configuration.\r\n\r\nI made one comment above to please mirror changes here in `Species`, because it actually does not inherit from `Element`.", "Thanks all for the fix." ]
2025-02-01T12:05:41
2025-02-18T17:53:01
2025-02-18T17:15:39Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Fix valence electron configuration parsing in `PotcarSingle.electron_configuration`, to fix #4269 - Likely a follow up PR of #3944 - [x] Update unit tests - [x] Test other versions of PSP?
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4278/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4278/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4278", "html_url": "https://github.com/materialsproject/pymatgen/pull/4278", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4278.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4278.patch", "merged_at": "2025-02-18T17:15:39Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4279
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4279/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4279/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4279/events
https://github.com/materialsproject/pymatgen/pull/4279
2,825,712,163
PR_kwDOACgets6Jwa7q
4,279
Fix P1 SymmOp string for `CifParser.get_symops`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks @DanielYang59!", "No problem at all!" ]
2025-02-02T09:56:18
2025-02-10T08:22:25
2025-02-10T03:50:28Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Fix P1 SymmOp string for `CifParser.get_symops`, to close #4230 - [x] Unit test
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4279/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4279/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4279", "html_url": "https://github.com/materialsproject/pymatgen/pull/4279", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4279.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4279.patch", "merged_at": "2025-02-10T03:50:28Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4280
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4280/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4280/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4280/events
https://github.com/materialsproject/pymatgen/pull/4280
2,828,551,793
PR_kwDOACgets6J57dl
4,280
pre-commit autoupdate
{ "login": "pre-commit-ci[bot]", "id": 66853113, "node_id": "MDM6Qm90NjY4NTMxMTM=", "avatar_url": "https://avatars.githubusercontent.com/in/68672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D", "html_url": "https://github.com/apps/pre-commit-ci", "followers_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/followers", "following_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/repos", "events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-03T21:20:56
2025-02-18T17:10:19
2025-02-18T17:10:17Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.2 → v0.9.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.2...v0.9.4) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.1) - [github.com/igorshubovych/markdownlint-cli: v0.43.0 → v0.44.0](https://github.com/igorshubovych/markdownlint-cli/compare/v0.43.0...v0.44.0) - [github.com/RobertCraigie/pyright-python: v1.1.391 → v1.1.393](https://github.com/RobertCraigie/pyright-python/compare/v1.1.391...v1.1.393) <!--pre-commit.ci end-->
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4280/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4280/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4280", "html_url": "https://github.com/materialsproject/pymatgen/pull/4280", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4280.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4280.patch", "merged_at": "2025-02-18T17:10:17Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4281
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4281/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4281/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4281/events
https://github.com/materialsproject/pymatgen/pull/4281
2,831,119,906
PR_kwDOACgets6KCybZ
4,281
Add method to get the Pearson symbol to SpaceGroupAnalyzer
{ "login": "CompRhys", "id": 26601751, "node_id": "MDQ6VXNlcjI2NjAxNzUx", "avatar_url": "https://avatars.githubusercontent.com/u/26601751?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CompRhys", "html_url": "https://github.com/CompRhys", "followers_url": "https://api.github.com/users/CompRhys/followers", "following_url": "https://api.github.com/users/CompRhys/following{/other_user}", "gists_url": "https://api.github.com/users/CompRhys/gists{/gist_id}", "starred_url": "https://api.github.com/users/CompRhys/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/CompRhys/subscriptions", "organizations_url": "https://api.github.com/users/CompRhys/orgs", "repos_url": "https://api.github.com/users/CompRhys/repos", "events_url": "https://api.github.com/users/CompRhys/events{/privacy}", "received_events_url": "https://api.github.com/users/CompRhys/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks Rhys!" ]
2025-02-04T19:30:42
2025-03-07T02:49:49
2025-03-07T02:49:49Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Add a simple convenience method to SGA to return the Pearson Symbol. ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [x] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4281/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4281/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4281", "html_url": "https://github.com/materialsproject/pymatgen/pull/4281", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4281.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4281.patch", "merged_at": "2025-03-07T02:49:48Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4282
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4282/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4282/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4282/events
https://github.com/materialsproject/pymatgen/issues/4282
2,835,047,385
I_kwDOACgets6o-2PZ
4,282
Redefinition of the ASE Atoms class in pymatgen.io.ase is problematic with type checkers
{ "login": "tomdemeyere", "id": 115232841, "node_id": "U_kgDOBt5QSQ", "avatar_url": "https://avatars.githubusercontent.com/u/115232841?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tomdemeyere", "html_url": "https://github.com/tomdemeyere", "followers_url": "https://api.github.com/users/tomdemeyere/followers", "following_url": "https://api.github.com/users/tomdemeyere/following{/other_user}", "gists_url": "https://api.github.com/users/tomdemeyere/gists{/gist_id}", "starred_url": "https://api.github.com/users/tomdemeyere/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tomdemeyere/subscriptions", "organizations_url": "https://api.github.com/users/tomdemeyere/orgs", "repos_url": "https://api.github.com/users/tomdemeyere/repos", "events_url": "https://api.github.com/users/tomdemeyere/events{/privacy}", "received_events_url": "https://api.github.com/users/tomdemeyere/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-06T09:51:40
2025-02-06T09:51:40
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
class Atoms: # type: ignore[no-redef] def __init__(self, *args, **kwargs): raise NO_ASE_ERR In my code I would then have ""pymatgen.io.ase.Atoms" is not assignable to "ase.atoms.Atoms"" everywhere, because the type checker is confused about the redefinition. Is it really necessary to have this DummyClass defined there?
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4282/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4282/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4283
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4283/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4283/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4283/events
https://github.com/materialsproject/pymatgen/pull/4283
2,836,856,013
PR_kwDOACgets6KWYDq
4,283
`Composition` support formula strings with curly brackets
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks @janosh! Enabled auto-merge on this, looks like there's an unrelated linting error", "@mkhorton i fixed the lint error. now there's another unrelated issue:\r\n\r\n```py\r\nfrom coverage.sqldata import CoverageData as CoverageData # pylint: disable=useless-import-alias\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/runner/micromamba/envs/pmg/lib/python3.11/site-packages/coverage/sqldata.py\", line 16, in <module>\r\n import sqlite3\r\n File \"/Users/runner/micromamba/envs/pmg/lib/python3.11/sqlite3/__init__.py\", line 57, in <module>\r\n from sqlite3.dbapi2 import *\r\n File \"/Users/runner/micromamba/envs/pmg/lib/python3.11/sqlite3/dbapi2.py\", line 27, in <module>\r\n from _sqlite3 import *\r\nImportError: dlopen(/Users/runner/micromamba/envs/pmg/lib/python3.11/lib-dynload/_sqlite3.cpython-311-darwin.so, 0x0002): Symbol not found: _sqlite3_enable_load_extension\r\n Referenced from: <52946D93-13ED-30[78](https://github.com/materialsproject/pymatgen/actions/runs/13239058137/job/36950164427#step:8:79)-8584-03D10CF0E4D2> /Users/runner/micromamba/envs/pmg/lib/python3.11/lib-dynload/_sqlite3.cpython-311-darwin.so\r\n Expected in: <7A829707-57EA-3128-A489-DFB2872CC69A> /usr/lib/libsqlite3.dylib\r\n```" ]
2025-02-06T23:44:29
2025-02-13T19:20:01
2025-02-13T19:20:01Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
This PR extends the existing bracket normalization for square brackets `[...]` to curly brackets `{...}`. Important e.g. for a few of the 8k+ metallic glass compositions reported in Ward et al. (2018) https://doi.org/10.1016/j.actamat.2018.08.002. previously, some of those formulas raised ```py ValueError: Invalid formula: {[(Fe0.6Co0.4)0.75B0.2Si0.05]0.96Nb0.04}100 ``` i added 5 unit tests to ensure they now parse correctly
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4283/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4283/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4283", "html_url": "https://github.com/materialsproject/pymatgen/pull/4283", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4283.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4283.patch", "merged_at": "2025-02-13T19:20:01Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4284
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4284/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4284/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4284/events
https://github.com/materialsproject/pymatgen/issues/4284
2,840,097,758
I_kwDOACgets6pSHPe
4,284
Python 3.13 support
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "#4100 should unblock Python 3.13. But I'm a bit unsure about [the CI failure](https://github.com/materialsproject/pymatgen/actions/runs/13219577081/job/36902930489?pr=4100) (it wasn't there before), and I'm looking into it.\n\nFor some reason I cannot recreate that error (which looks like some float point number precision issue) on my Ubuntu machine running Python 3.13. Maybe be some dependency-related constant update or something.\n\n```\n______________________ TestEOS.test_numerical_eos_values _______________________\n\nself = <analysis.test_eos.TestEOS testMethod=test_numerical_eos_values>\n\n def test_numerical_eos_values(self):\n assert_allclose(self.num_eos_fit.e0, -10.84749, atol=1e-3)\n assert_allclose(self.num_eos_fit.v0, 40.857201, atol=1e-1)\n assert_allclose(self.num_eos_fit.b0, 0.55, atol=1e-2)\n> assert_allclose(self.num_eos_fit.b0_GPa, 89.0[37](https://github.com/materialsproject/pymatgen/actions/runs/13219577081/job/36902930489?pr=4100#step:8:38)0727, atol=1e-1)\n\n/home/runner/work/pymatgen/pymatgen/tests/analysis/test_eos.py:429: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nargs = (<function assert_allclose.<locals>.compare at 0x7ff698cd6660>, array(88.82466552), array(89.0370727))\nkwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.1', 'verbose': True}\n\n @wraps(func)\n def inner(*args, **kwds):\n with self._recreate_cm():\n> return func(*args, **kwds)\nE AssertionError: \nE Not equal to tolerance rtol=1e-07, atol=0.1\nE \nE Mismatched elements: 1 / 1 (100%)\nE Max absolute difference: 0.21240718\nE Max relative difference: 0.002[38](https://github.com/materialsproject/pymatgen/actions/runs/13219577081/job/36902930489?pr=4100#step:8:39)56\nE x: array(88.824666)\nE y: array(89.037073)\n```", "thanks so much for working on this @DanielYang59! 🥇 i see you're way ahead of me :)\n\nthe difference is small so maybe numerics and based on the doc string, the class being tested maybe should have been removed by now anyway. so i think safe enough to just update the expected value to the new actual\n\nhttps://github.com/materialsproject/pymatgen/blob/ee65dca53f7cc941c7d610f13528271b584678e5/src/pymatgen/analysis/eos.py#L511-L541", "No problem at all!\n\n> the difference is small so maybe numerics and based on the doc string, the class being tested maybe should have been removed by now anyway\n\nI would have a look at the reason and let me you (if I could find it), because currently it could be reliably recreated in CI. Maybe some constant get updated at certain version, probably similar to:\n- https://github.com/materialsproject/pymatgen/pull/4244", "> For some reason I cannot recreate that error (which looks like some float point number precision issue) on my Ubuntu machine running Python 3.13. Maybe be some dependency-related constant update or something.\n\nUnfortunately I'm unable to recreate this issue nor find the reason after some time debugging, this is what I know so far:\n- This error seems to be from `fit` which generates `num_eos_fit.b0` as `0.5557256930400533` locally while being [ `0.5543999558833739` in CI](https://github.com/materialsproject/pymatgen/actions/runs/13334230008/job/37245633132) https://github.com/materialsproject/pymatgen/blob/75afbb180ea05ce3f12549af09061dfaf63ab212/tests/analysis/test_eos.py#L428-L429\n- The unit conversion factor is not the cause (I thought this might be the issue because [`scipy` recently updated some constants](https://github.com/scipy/scipy/pull/21605)): https://github.com/materialsproject/pymatgen/blob/75afbb180ea05ce3f12549af09061dfaf63ab212/src/pymatgen/analysis/eos.py#L143-L146\n\nAbove results are generated with the same Python (3.13.2), scipy(1.15.1) and numpy (1.26.4) versions, only noticeable difference is GitHub CI runner is now using Ubuntu 24.04 (my local machine is still Ubuntu 22.04)\n\nAs the result is generated with `NumericalEOS.fit`, very likely by optimization instead of finding exact solution, I guess such numerical error should be acceptable (the conversion factor is `160.21766339999996`). So I would just further increase the absolute tolerance for now f11974fc19c8c59665ab427797fa5581c653063b.\n" ]
2025-02-08T15:56:50
2025-04-20T19:35:33
2025-04-20T19:35:33Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
`pymatgen` currently pins `python<3.13` https://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/pyproject.toml#L24
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4284/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4284/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4285
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4285/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4285/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4285/events
https://github.com/materialsproject/pymatgen/issues/4285
2,840,668,251
I_kwDOACgets6pUShb
4,285
[Python 3.13 support roadmap] Replace `pybtex` with `bibtexparser`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I would give it a try and make it optional for now (0b2574515928e9b8add0b0c5cd05a3038b3984ab)", "@shyuep Can I have some comment on this? Current `pybtex` is a mandatory dependency and does not support Python 3.13 therefore blocking pymatgen upgrade to Python 3.13 support. Can we make it optional or do we want to find an alternative and still make it mandatory?", "Maybe replace with bibtexparser?", "Cool would give it a go and see how everything goes", "closed by #4361" ]
2025-02-09T13:15:24
2025-04-18T08:25:00
2025-04-18T08:24:59Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Looks like development on `pybtex` might have stalled ([no release since Jan 2021](https://pypi.org/project/pybtex/#history)), and the following would error out on MacOS Python 3.13: ```python from pybtex.database import BibliographyData, Entry ``` Gives: ``` Traceback (most recent call last): File "/Users/yang/developer/pymatgen/debug/test_pybtex_install.py", line 1, in <module> from pybtex.database import BibliographyData, Entry File "/Users/yang/developer/pymatgen/venv313/lib/python3.13/site-packages/pybtex/database/__init__.py", line 44, in <module> from pybtex.plugin import find_plugin File "/Users/yang/developer/pymatgen/venv313/lib/python3.13/site-packages/pybtex/plugin/__init__.py", line 26, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' ``` This is [an already fixed issue from pybtex's side](https://bitbucket.org/pybtex-devs/pybtex/issues/169/replace-pkg_resources-with) but they haven't got a release with this patch yet. Should we consider replace it ([python-bibtexparser](https://github.com/sciunto-org/python-bibtexparser) for example) or make it optional as it's only used in two places across the code base: #### `cif.CifParser.get_bibtex_string` https://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/src/pymatgen/io/cif.py#L1349-L1361 #### Helper function needed by `util.provenance.StructureNL` https://github.com/materialsproject/pymatgen/blob/5b997f78c9ae785e7a18a157c697d996f7dba746/src/pymatgen/util/provenance.py#L38-L53 --- Related: - https://github.com/materialsproject/pymatgen/pull/4100 - https://github.com/materialsproject/pymatgen/issues/4284
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4285/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4285/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4286
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4286/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4286/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4286/events
https://github.com/materialsproject/pymatgen/issues/4286
2,844,157,595
I_kwDOACgets6phmab
4,286
typo in 'core/structure.py'
{ "login": "MoseyQAQ", "id": 61280022, "node_id": "MDQ6VXNlcjYxMjgwMDIy", "avatar_url": "https://avatars.githubusercontent.com/u/61280022?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MoseyQAQ", "html_url": "https://github.com/MoseyQAQ", "followers_url": "https://api.github.com/users/MoseyQAQ/followers", "following_url": "https://api.github.com/users/MoseyQAQ/following{/other_user}", "gists_url": "https://api.github.com/users/MoseyQAQ/gists{/gist_id}", "starred_url": "https://api.github.com/users/MoseyQAQ/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MoseyQAQ/subscriptions", "organizations_url": "https://api.github.com/users/MoseyQAQ/orgs", "repos_url": "https://api.github.com/users/MoseyQAQ/repos", "events_url": "https://api.github.com/users/MoseyQAQ/events{/privacy}", "received_events_url": "https://api.github.com/users/MoseyQAQ/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for catching this, I would fix it!" ]
2025-02-11T02:58:00
2025-02-18T17:09:35
2025-02-18T17:09:34Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
Hi, I noticed a small typo in the comment in <kbd>core/structure.py</kbd>. The comment mentions "translation," but the function actually implements a "rotation" operation. (See line 4677 & 5298) https://github.com/materialsproject/pymatgen/blob/153ccb46155f665b9933babfd48b563ac24dfaca/src/pymatgen/core/structure.py#L5287-L5299 https://github.com/materialsproject/pymatgen/blob/153ccb46155f665b9933babfd48b563ac24dfaca/src/pymatgen/core/structure.py#L4664-L4678
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4286/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4286/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4287
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4287/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4287/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4287/events
https://github.com/materialsproject/pymatgen/pull/4287
2,846,008,383
PR_kwDOACgets6K1jLR
4,287
Updated vasp input sets with MPSurfaceSet from atomate1
{ "login": "abhardwaj73", "id": 84594454, "node_id": "MDQ6VXNlcjg0NTk0NDU0", "avatar_url": "https://avatars.githubusercontent.com/u/84594454?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abhardwaj73", "html_url": "https://github.com/abhardwaj73", "followers_url": "https://api.github.com/users/abhardwaj73/followers", "following_url": "https://api.github.com/users/abhardwaj73/following{/other_user}", "gists_url": "https://api.github.com/users/abhardwaj73/gists{/gist_id}", "starred_url": "https://api.github.com/users/abhardwaj73/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abhardwaj73/subscriptions", "organizations_url": "https://api.github.com/users/abhardwaj73/orgs", "repos_url": "https://api.github.com/users/abhardwaj73/repos", "events_url": "https://api.github.com/users/abhardwaj73/events{/privacy}", "received_events_url": "https://api.github.com/users/abhardwaj73/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I would rather not have two surface sets with only slgihtly different parameters and confusing names. The changes to the inputs are small enough that you can go ahead and modify MVLSlabSet directly and atomate should use MVLSlabSet.", "@abhardwaj73 it looks like the adsorption workflows in `atomate2` use a modified `MPRelaxSet` ([link](https://github.com/materialsproject/atomate2/blob/4f4b607a10a90852d76cca3aa45e073c1bcfaf83/src/atomate2/vasp/jobs/adsorption.py#L147)). After this PR is done, let's compare the revised `MVLSlabSet` parameters with the modified set used there, and update the `atomate2` import if appropriate.", "Thanks!" ]
2025-02-11T17:14:52
2025-05-01T21:19:13
2025-05-01T21:18:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - feature 1: Addition of MPSurfaceSet mentioned [here](https://github.com/hackingmaterials/atomate/blob/2e541f297165254ac054b50e8132adaa282a01e0/atomate/vasp/workflows/base/adsorption.py#L370) ## Todos - feature 2: Addition of tests for this new vasp input set Mentioned in this issue #4247 @rkingsbury
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4287/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4287/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4287", "html_url": "https://github.com/materialsproject/pymatgen/pull/4287", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4287.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4287.patch", "merged_at": "2025-05-01T21:18:30Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4288
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4288/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4288/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4288/events
https://github.com/materialsproject/pymatgen/pull/4288
2,846,307,168
PR_kwDOACgets6K2lF-
4,288
`Dos.get_cbm_vbm` updates
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Just to note, the linting test failure is unrelated to this PR, seems to be something due to `Xdatcar` parsing? (Possibly due to a `mypy` version update)?", "Tests are all passing btw" ]
2025-02-11T19:27:10
2025-02-18T17:16:20
2025-02-18T17:16:20Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Following discussion with @esoteric-ephemera after the updates to this function in https://github.com/materialsproject/pymatgen/pull/4240; the best approach for determining the VBM/CBM eigenvalues from a DOS object is to interpolate between the DOS points above/below the chosen threshold `tol`, and take the eigenvalues at the points where the (interpolated) DOS value equals `tol`. This gives band gaps matching the expected values for the (current) `emmet-core` tests, and also brings this behaviour in line with the `dos.get_interpolated_gap` function (in practice, results in reduced partially-redundant code here). Examples (used by @esoteric-ephemera in https://github.com/materialsproject/pymatgen/pull/4240 discussion): Green lines show determined VBM/CBM positions ![image](https://github.com/user-attachments/assets/998cf103-aa02-4e13-9d2a-f863e3d8ecc7) ![image](https://github.com/user-attachments/assets/03510573-73c4-4b1d-93f8-a787f4320307)
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4288/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4288/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4288", "html_url": "https://github.com/materialsproject/pymatgen/pull/4288", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4288.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4288.patch", "merged_at": "2025-02-18T17:16:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4289
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4289/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4289/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4289/events
https://github.com/materialsproject/pymatgen/issues/4289
2,846,591,860
I_kwDOACgets6pq4t0
4,289
structure.to_ase_atoms() modifies structure.properties in place
{ "login": "wolearyc", "id": 5248349, "node_id": "MDQ6VXNlcjUyNDgzNDk=", "avatar_url": "https://avatars.githubusercontent.com/u/5248349?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wolearyc", "html_url": "https://github.com/wolearyc", "followers_url": "https://api.github.com/users/wolearyc/followers", "following_url": "https://api.github.com/users/wolearyc/following{/other_user}", "gists_url": "https://api.github.com/users/wolearyc/gists{/gist_id}", "starred_url": "https://api.github.com/users/wolearyc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wolearyc/subscriptions", "organizations_url": "https://api.github.com/users/wolearyc/orgs", "repos_url": "https://api.github.com/users/wolearyc/repos", "events_url": "https://api.github.com/users/wolearyc/events{/privacy}", "received_events_url": "https://api.github.com/users/wolearyc/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "The minimal example also throws an error for me. It looks like this bug is occurring [on](https://github.com/materialsproject/pymatgen/blob/master/src/pymatgen/io/ase.py#L205-L215) lines 205 - 215 of pymatgen.io.ase\n\n\n```python\n # Atoms.info <---> Structure.properties\n if properties := structure.properties:\n atoms.info = properties # This links values in atoms.info to the corresponding values in structure.properties\n\n # Regenerate Spacegroup object from `.todict()` representation\n if isinstance(atoms.info.get(\"spacegroup\"), dict):\n atoms.info[\"spacegroup\"] = Spacegroup( # So now here atoms.info[\"spacegroup\"] is actually being changed by changing structure.properties[\"spacegroup\"]\n atoms.info[\"spacegroup\"][\"number\"],\n setting=atoms.info[\"spacegroup\"].get(\"setting\", 1),\n )\n```\n\nThe following is a quick change that fixes the error raised by your example, but I have not yet ran the test-checks with this change implemented.\n\n```python\n # Atoms.info <---> Structure.properties\n if properties := structure.properties:\n # Assign a copy to unlink the keys in atoms.info to structure.properties\n atoms.info = properties.copy()\n\n # Regenerate Spacegroup object from `.todict()` representation\n if isinstance(atoms.info.get(\"spacegroup\"), dict):\n atoms.info[\"spacegroup\"] = Spacegroup(\n atoms.info[\"spacegroup\"][\"number\"],\n setting=atoms.info[\"spacegroup\"].get(\"setting\", 1),\n )\n```\n\nI know people tend to like to keep thinks light, so it might be better to just make \"spacegroup\" an exception to the properties set on atoms as links to avoid the in-place changing.\n\n```python\n # Atoms.info <---> Structure.properties\n # Skip the following keys who's values in atoms.info are subject to change\n # to avoid in-place modification of the structure object.\n keys_to_skip = [\"spacegroup\"]\n # Walrus assign properties from structure.properties with truthy values and not in keys_to_skip\n if properties := {k: v for k, v in structure.properties.items() if v and k not in keys_to_skip}:\n atoms.info = properties\n\n # Regenerate Spacegroup object from `.todict()` representation\n if isinstance(structure.properties.get(\"spacegroup\"), dict):\n atoms.info[\"spacegroup\"] = Spacegroup(\n structure.properties[\"spacegroup\"][\"number\"],\n setting=structure.properties[\"spacegroup\"].get(\"setting\", 1),\n )\n```\n", "Happy to review a PR for this!", "Thanks for the fix @benrich37! I would have opened a PR, but was unfortunately pretty swamped this week :) \n\nMy vote is for your first solution where properties is simply copied. We could perhaps use `deepcopy` here to handle the case where atoms.info includes collections, etc. I think this solution has simpler control flow and, critically, does not require us to anticipate all possible 'special' keys in `Structure.properties`. I personally don't think `Atoms` objects generated by `to_ase_atoms()` should ever share memory with original `Structure` objects, and I think using `deepcopy` will move us closer to that ideal. ", "As the person who wrote much of the ASE converter, I wholeheartedly agree with you that nothing should be mutated! That was an oversight on my part. I also agree that a `deepcopy` would be wise.", "Just submitted a PR - turns out there was a similar issue with `get_structure`, so I fixed that too and added a couple tests. Thanks @Andrew-S-Rosen for your work on the converter! It makes my life quite a bit easier :)" ]
2025-02-11T21:46:47
2025-02-28T18:03:16
2025-02-28T18:03:16Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.12.4 ### Pymatgen version 2025.1.24 ### Operating system version MacOS ### Current behavior Problems arise when converting `Structure`'s **with spacegroup information embedded in structure.properties** into `ase.Atoms` objects. **MINIMAL EXAMPLE** ``` import json from pymatgen.core import Structure structure = Structure.from_dict( # apologies for the hardcoded dictionary { "@module": "pymatgen.core.structure", "@class": "Structure", "charge": 0, "lattice": { "matrix": [ [4.256387634803149, 4.314320171475424e-32, -6.507506952342294e-32], [3.3969381290161766e-32, 4.256387634803149, -2.3941644265810876e-18], [-1.1858272430092808e-32, -2.3941644265810356e-18, 4.256387634803149], ], "pbc": (True, True, True), "a": 4.256387634803149, "b": 4.256387634803149, "c": 4.256387634803149, "alpha": 90.0, "beta": 90.0, "gamma": 90.0, "volume": 77.11227544547246, }, "properties": { "spacegroup": {"number": 225, "setting": 1}, "unit_cell": "conventional", }, "sites": [ { "species": [{"element": "Mg", "occu": 1}], "abc": [0.0, 0.0, 0.0], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 0, }, "label": "Mg", "xyz": [0.0, 0.0, 0.0], }, { "species": [{"element": "Mg", "occu": 1}], "abc": [3.03275477652898e-48, 0.5, 0.5], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 0, }, "label": "Mg", "xyz": [1.1055554430034493e-32, 2.1281938174015744, 2.1281938174015744], }, { "species": [{"element": "Mg", "occu": 1}], "abc": [0.5, 1.8441828973042882e-35, 0.5], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 0, }, "label": "Mg", "xyz": [ 2.1281938174015744, -1.1970822132904962e-18, 2.1281938174015744, ], }, { "species": [{"element": "Mg", "occu": 1}], "abc": [0.5, 0.5, 3.414593957670284e-35], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 0, }, "label": "Mg", "xyz": [ 2.1281938174015744, 2.1281938174015744, -1.1970822132905761e-18, ], }, { "species": [{"element": "O", "occu": 1}], "abc": [0.5, 0.5, 0.5], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 1, }, "label": "O", "xyz": [2.1281938174015744, 2.1281938174015744, 2.1281938174015744], }, { "species": [{"element": "O", "occu": 1}], "abc": [0.5, 5.727981906470981e-49, -1.1457103901908975e-48], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 1, }, "label": "O", "xyz": [ 2.1281938174015744, 2.1571600857377124e-32, -3.2537534761711473e-32, ], }, { "species": [{"element": "O", "occu": 1}], "abc": [2.3421825782682186e-48, 0.5, -1.976290217125112e-35], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 1, }, "label": "O", "xyz": [ 1.6984690645080894e-32, 2.1281938174015744, -1.1970822132905438e-18, ], }, { "species": [{"element": "O", "occu": 1}], "abc": [2.1774700692994772e-48, 1.8441828973042882e-35, 0.5], "properties": { "selective_dynamics": [False, False, False], "spacegroup_kinds": 1, }, "label": "O", "xyz": [ -5.9291362150463945e-33, -1.1970822132905178e-18, 2.1281938174015744, ], }, ], } ) print(structure.properties) # note the space group is represented by a dictionary structure.to_json() # works structure.to_ase_atoms() # convert to ase atoms print(structure.properties) # uh oh! to_ase_atoms has a side effect! structure.to_json() # this throws an exception, as ase's `Spacegroup` object cannot be converted into json ``` **OUTPUT** ``` {'spacegroup': {'number': 225, 'setting': 1}, 'unit_cell': 'conventional'} {'spacegroup': Spacegroup(225, setting=1), 'unit_cell': 'conventional'} --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[5], line 137 135 structure.to_ase_atoms() # convert to ase atoms 136 print(structure.properties) # uh oh! to_ase_atoms has a side effect! --> 137 structure.to_json() # this throws an exception, as ase's `Spacegroup` object cannot be converted into json File ~/Documents/ff-pipe/.venv/lib/python3.12/site-packages/monty/json.py:239, in MSONable.to_json(self) 235 def to_json(self) -> str: 236 """ 237 Returns a json string representation of the MSONable object. 238 """ --> 239 return json.dumps(self, cls=MontyEncoder) File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/__init__.py:238, in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw) 232 if cls is None: 233 cls = JSONEncoder 234 return cls( 235 skipkeys=skipkeys, ensure_ascii=ensure_ascii, 236 check_circular=check_circular, allow_nan=allow_nan, indent=indent, 237 separators=separators, default=default, sort_keys=sort_keys, --> 238 **kw).encode(obj) File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/encoder.py:200, in JSONEncoder.encode(self, o) 196 return encode_basestring(o) 197 # This doesn't pass the iterator directly to ''.join() because the 198 # exceptions aren't as detailed. The list call should be roughly 199 # equivalent to the PySequence_Fast that ''.join() would do. --> 200 chunks = self.iterencode(o, _one_shot=True) 201 if not isinstance(chunks, (list, tuple)): 202 chunks = list(chunks) File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/encoder.py:258, in JSONEncoder.iterencode(self, o, _one_shot) 253 else: 254 _iterencode = _make_iterencode( 255 markers, self.default, _encoder, self.indent, floatstr, 256 self.key_separator, self.item_separator, self.sort_keys, 257 self.skipkeys, _one_shot) --> 258 return _iterencode(o, 0) File ~/Documents/ff-pipe/.venv/lib/python3.12/site-packages/monty/json.py:669, in MontyEncoder.default(self, o) 667 d = self._update_name_object_map(o) 668 else: --> 669 raise TypeError( 670 f"Object of type {o.__class__.__name__} is not JSON serializable" 671 ) 673 if "@module" not in d: 674 d["@module"] = str(o.__class__.__module__) TypeError: Object of type Spacegroup is not JSON serializable ``` ### Expected Behavior The second call to `to_json` should not raise an exception. In addition, `Structure.to_ase_atoms()` should be side effect free. ### Minimal example ```Python See above. ``` ### Relevant files to reproduce this bug _No response_
{ "login": "Andrew-S-Rosen", "id": 8674072, "node_id": "MDQ6VXNlcjg2NzQwNzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Andrew-S-Rosen", "html_url": "https://github.com/Andrew-S-Rosen", "followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers", "following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}", "gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions", "organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs", "repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos", "events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}", "received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4289/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4289/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4290
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4290/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4290/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4290/events
https://github.com/materialsproject/pymatgen/pull/4290
2,853,924,322
PR_kwDOACgets6LQekH
4,290
Migrate some type annotation tweaks from #4100
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-14T14:53:42
2025-02-18T17:10:29
2025-02-18T17:09:33Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Migrate some type annotation tweaks from #4100, make it easier to review - Fix #4286
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4290/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4290/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4290", "html_url": "https://github.com/materialsproject/pymatgen/pull/4290", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4290.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4290.patch", "merged_at": "2025-02-18T17:09:33Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4291
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4291/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4291/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4291/events
https://github.com/materialsproject/pymatgen/pull/4291
2,854,365,083
PR_kwDOACgets6LSAX1
4,291
Remove deprecated memory units from `core`
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-14T17:35:37
2025-02-18T17:10:17
2025-02-18T17:09:19Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Remove deprecated memory units from `core`
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4291/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4291/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4291", "html_url": "https://github.com/materialsproject/pymatgen/pull/4291", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4291.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4291.patch", "merged_at": "2025-02-18T17:09:19Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4292
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4292/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4292/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4292/events
https://github.com/materialsproject/pymatgen/pull/4292
2,858,622,405
PR_kwDOACgets6LgFUc
4,292
Fix for `plotly` `PDPlotter`/`ChemicalPotentialDiagram.get_plot()`
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Great. Thanks!" ]
2025-02-17T19:11:42
2025-02-18T17:09:07
2025-02-18T17:09:02Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Fixes https://github.com/materialsproject/pymatgen/issues/4272 `titlefont` has been deprecated in `plotly` v6, refactored to `title.font`. This updates to use the new syntax, and requires a bump in `plotly` requirement from `>=4.5,<6` to `>=5`.
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4292/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4292/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4292", "html_url": "https://github.com/materialsproject/pymatgen/pull/4292", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4292.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4292.patch", "merged_at": "2025-02-18T17:09:02Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4293
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4293/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4293/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4293/events
https://github.com/materialsproject/pymatgen/issues/4293
2,860,823,124
I_kwDOACgets6qhLJU
4,293
Wrong reassignment of translations for edges in __mul__ method of StructureGraph object
{ "login": "trioxane", "id": 36969022, "node_id": "MDQ6VXNlcjM2OTY5MDIy", "avatar_url": "https://avatars.githubusercontent.com/u/36969022?v=4", "gravatar_id": "", "url": "https://api.github.com/users/trioxane", "html_url": "https://github.com/trioxane", "followers_url": "https://api.github.com/users/trioxane/followers", "following_url": "https://api.github.com/users/trioxane/following{/other_user}", "gists_url": "https://api.github.com/users/trioxane/gists{/gist_id}", "starred_url": "https://api.github.com/users/trioxane/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/trioxane/subscriptions", "organizations_url": "https://api.github.com/users/trioxane/orgs", "repos_url": "https://api.github.com/users/trioxane/repos", "events_url": "https://api.github.com/users/trioxane/events{/privacy}", "received_events_url": "https://api.github.com/users/trioxane/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Another example with errors in redefining translations is as follows:\n\n```\nerror_structure = {\n '@module': 'pymatgen.analysis.graphs',\n '@class': 'StructureGraph',\n 'structure': {'@module': 'pymatgen.core.structure',\n '@class': 'Structure',\n 'charge': 0.0,\n 'lattice': {'matrix': [[1.57, -2.719319767883137, 0.0],\n [1.57, 2.719319767883137, 0.0],\n [0.0, 0.0, 12.3]],\n 'pbc': (True, True, True),\n 'a': 3.1399999999999997,\n 'b': 3.1399999999999997,\n 'c': 12.3,\n 'alpha': 90.0,\n 'beta': 90.0,\n 'gamma': 119.99999999999999,\n 'volume': 105.02556807518252},\n 'sites': [{'species': [{'element': 'Mo', 'occu': 1.0}],\n 'abc': [0.6666666666666667, 0.33333333333333337, 0.0],\n 'xyz': [1.5700000000000003, -0.9064399226277124, 0.0],\n 'label': 'Mo',\n 'properties': {}},\n {'species': [{'element': 'S', 'occu': 1.0}],\n 'abc': [0.3333333333333333, 0.6666666666666666, 0.878],\n 'xyz': [1.5699999999999998, 0.9064399226277123, 10.7994],\n 'label': 'S',\n 'properties': {}},\n {'species': [{'element': 'S', 'occu': 1.0}],\n 'abc': [0.3333333333333333, 0.6666666666666667, 0.12199999999999989],\n 'xyz': [1.5700000000000003, 0.9064399226277126, 1.5005999999999986],\n 'label': 'S',\n 'properties': {}}]},\n 'graphs': {'directed': True,\n 'multigraph': True,\n 'graph': [('edge_weight_name', None),\n ('edge_weight_units', None),\n ('name', '100042_connectivity')],\n 'nodes': [{'element': 'Mo', 'EN': 0.000155, 'id': 0},\n {'element': 'S', 'EN': 0.000514, 'id': 1},\n {'element': 'S', 'EN': 0.000514, 'id': 2}],\n 'adjacency': [[{'to_jimage': (1, 0, 0),\n 'weight': 0.86803,\n 'id': 2,\n 'key': 0},\n {'to_jimage': (0, -1, 0),\n 'weight': 0.86803,\n 'id': 2,\n 'key': 1},\n {'to_jimage': (0, 0, 0),\n 'weight': 0.86803,\n 'id': 2,\n 'key': 2},\n {'to_jimage': (1, 0, -1),\n 'weight': 0.86803,\n 'id': 1,\n 'key': 0},\n {'to_jimage': (0, 0, -1),\n 'weight': 0.86803,\n 'id': 1,\n 'key': 1},\n {'to_jimage': (0, -1, -1),\n 'weight': 0.86803,\n 'id': 1,\n 'key': 2}],\n [{'to_jimage': (1, 0, 0),\n 'weight': 0.05547,\n 'id': 1,\n 'key': 0},\n {'to_jimage': (0, 1, 0),\n 'weight': 0.05547,\n 'id': 1,\n 'key': 1},\n {'to_jimage': (1, 1, 0),\n 'weight': 0.05547,\n 'id': 1,\n 'key': 2}],\n [{'to_jimage': (0, 1, 0),\n 'weight': 0.05547,\n 'id': 2,\n 'key': 0},\n {'to_jimage': (1, 0, 0),\n 'weight': 0.05547,\n 'id': 2,\n 'key': 1},\n {'to_jimage': (1, 1, 0),\n 'weight': 0.05547,\n 'id': 2,\n 'key': 2}]]}}\n\n\nG = StructureGraph.from_dict(error_structure)\n\ng_new = G * [1, 1, 2]\n\nfor i, comp in enumerate(get_structure_components(g_new, inc_orientation=True, inc_site_ids=True)):\n d, hkl, sub_g = comp['dimensionality'], comp['orientation'], comp['structure_graph']\n print(i, f'{d}D', f'orientation:{hkl}', comp['site_ids'], sub_g.structure.composition.formula.replace(\" \", \"\"))\n print('edge translations:', set([edata[2] for edata in sub_g.graph.edges(data='to_jimage')]))\n```\n\nThe output of the code is:\n\n```\n0 2D orientation:(0, 0, 1) (0, 2, 4) Mo1S2\nedge translations: {(0, -1, -1), (1, 1, 0), (1, 0, -1), (0, 1, 0), (0, 0, 0), (0, -1, 0), (1, 0, 0), (0, 0, -1)}\n1 3D orientation:None (1, 3, 5) Mo1S2\nedge translations: {(1, 1, 0), (-1, 0, 1), (0, 1, 0), (0, 0, 0), (0, -1, 0), (1, 0, 0), (0, 1, 1)}\n```\n\nIn this case after translations redefinition, we still have the translations in c direction for edges of the component 1 inside\nunit cell. Also, in this case the layer dimensionality is identified as 3D, which, again is an error.\n", "The same error is replicated with newer pymatgen 2025.1.24; python 3.12.2; Ubuntu 22.04.5 LTS" ]
2025-02-18T15:33:42
2025-03-04T14:26:01
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.9.13 ### Pymatgen version 2023.2.22 ### Operating system version Windows 11 ### Current behavior When I multiply StructureGraph object and create supercell, the edges of the graph are not relabeled properly. In the example we have a layer inside unit cell. The layer lies in (001) plane on the edges of the unit cell. After multiplying the StructureGraph object we end up with a cell with two layers - one layer completely inside, and the other one again on the edges. These two layers are the two components of the resulting multiplied StructureGraph. The output of the code snippet provided below on my machine is as follows: ``` 0 2D orientation:(0, 0, 1) (0, 2, 4, 6, 9, 11, 13, 15) In4Se4 contacts translations: {(1, 0, -1), (0, 1, 0), (0, 0, 0), (0, -1, 0), (0, 0, -1)} 1 2D orientation:(1, 0, 1) (1, 3, 5, 7, 8, 10, 12, 14) In4Se4 contacts translations: {(0, 0, 0), (0, -1, 0), (0, 1, 0), (-1, 0, 1)} ``` ### Expected Behavior Had the redefinition of the edges been done properly, I would not have obtained in at least one component - the layer which is now _completely inside_ unit cell - the translation in c direction. In this case the component 0 lies on the edges, while the component 1 is inside unit cell. Though, we see that some contacts still have wrong translations (shown in bold), but there shouldn't be any contacts for this particular component 1 in c direction at all. Moreover, the component 0 and component 1 after multiplication intersect (component orientations highlighted in bold italic), which is an obvious error, because no changes in the axes orientation had been introduced and both layers should lie in the (001) plane. 0 2D orientation:**_(0, 0, 1)_** (0, 2, 4, 6, 9, 11, 13, 15) In4Se4 contacts translations: {(1, 0, -1), (0, 1, 0), (0, 0, 0), (0, -1, 0), (0, 0, -1)} 1 2D orientation:**_(1, 0, 1)_** (1, 3, 5, 7, 8, 10, 12, 14) In4Se4 contacts translations: {(0, 0, 0), (0, -1, 0), (0, 1, 0), **(-1, 0, 1)**} ### Minimal example ```Python error_structure = { '@module': 'pymatgen.analysis.graphs', '@class': 'StructureGraph', 'structure': {'@module': 'pymatgen.core.structure', '@class': 'Structure', 'charge': 0.0, 'lattice': {'matrix': [[0.0, 12.0301, 0.0], [4.2055, 0.0, 0.0], [0.0, -3.2438295947800757, -8.647616177885613]], 'pbc': (True, True, True), 'a': 12.0301, 'b': 4.2055, 'c': 9.236000000000002, 'alpha': 90.0, 'beta': 110.56170000000002, 'gamma': 90.0, 'volume': 437.50526128324185}, 'sites': [{'species': [{'element': 'In', 'occu': 1.0}], 'abc': [0.8848999999999999, 0.0, 0.01094999999999996], 'xyz': [0.0, 10.609915555937157, -0.09469139714784712], 'label': 'In'}, {'species': [{'element': 'In', 'occu': 1.0}], 'abc': [0.6150999999999999, 0.5, 0.9890499999999999], 'xyz': [2.10275, 4.1914048492827645, -8.552924780737765], 'label': 'In'}, {'species': [{'element': 'In', 'occu': 1.0}], 'abc': [0.3849, 0.5, 0.01094999999999996], 'xyz': [2.10275, 4.594865555937158, -0.09469139714784712], 'label': 'In'}, {'species': [{'element': 'In', 'occu': 1.0}], 'abc': [0.11509999999999995, 0.0, 0.9890499999999999], 'xyz': [0.0, -1.8236451507172344, -8.552924780737765], 'label': 'In'}, {'species': [{'element': 'Se', 'occu': 1.0}], 'abc': [0.8467, 0.5, 0.18095], 'xyz': [2.10275, 9.598914704824544, -1.5647861473884017], 'label': 'Se'}, {'species': [{'element': 'Se', 'occu': 1.0}], 'abc': [0.6533, 0.0, 0.81905], 'xyz': [0.0, 5.202405700395378, -7.0828300304972105], 'label': 'Se'}, {'species': [{'element': 'Se', 'occu': 1.0}], 'abc': [0.34669999999999995, 0.0, 0.18095], 'xyz': [0.0, 3.5838647048245442, -1.5647861473884017], 'label': 'Se'}, {'species': [{'element': 'Se', 'occu': 1.0}], 'abc': [0.1533, 0.5, 0.81905], 'xyz': [2.10275, -0.8126442996046213, -7.0828300304972105], 'label': 'Se'}]}, 'graphs': {'directed': True, 'multigraph': True, 'graph': [('edge_weight_name', None), ('edge_weight_units', None), ('name', None)], 'nodes': [{'element': 'In', 'EN': 0.000248, 'id': 0}, {'element': 'In', 'EN': 0.000248, 'id': 1}, {'element': 'In', 'EN': 0.000248, 'id': 2}, {'element': 'In', 'EN': 0.000248, 'id': 3}, {'element': 'Se', 'EN': 0.000516, 'id': 4}, {'element': 'Se', 'EN': 0.000516, 'id': 5}, {'element': 'Se', 'EN': 0.000516, 'id': 6}, {'element': 'Se', 'EN': 0.000516, 'id': 7}], 'adjacency': [[{'to_jimage': (0, 0, -1), 'weight': 0.49956, 'id': 5, 'key': 0}, {'to_jimage': (0, -1, 0), 'weight': 0.45953, 'id': 4, 'key': 0}, {'to_jimage': (0, 0, 0), 'weight': 0.45953, 'id': 4, 'key': 1}, {'to_jimage': (1, 0, -1), 'weight': 0.65324, 'id': 3, 'key': 0}], [{'to_jimage': (0, 1, 0), 'weight': 0.45953, 'id': 5, 'key': 0}, {'to_jimage': (0, 0, 0), 'weight': 0.45953, 'id': 5, 'key': 1}, {'to_jimage': (0, 0, 1), 'weight': 0.49956, 'id': 4, 'key': 0}, {'to_jimage': (0, 0, 1), 'weight': 0.65324, 'id': 2, 'key': 0}], [{'to_jimage': (0, 0, -1), 'weight': 0.49956, 'id': 7, 'key': 0}, {'to_jimage': (0, 0, 0), 'weight': 0.45953, 'id': 6, 'key': 0}, {'to_jimage': (0, 1, 0), 'weight': 0.45953, 'id': 6, 'key': 1}], [{'to_jimage': (0, 0, 0), 'weight': 0.45953, 'id': 7, 'key': 0}, {'to_jimage': (0, -1, 0), 'weight': 0.45953, 'id': 7, 'key': 1}, {'to_jimage': (0, 0, 1), 'weight': 0.49956, 'id': 6, 'key': 0}], [], [], [], []]}} G = StructureGraph.from_dict(error_structure) g_new = G * [1, 1, 2] for i, comp in enumerate(get_structure_components(g_new, inc_orientation=True, inc_site_ids=True)): d, hkl, sub_g = comp['dimensionality'], comp['orientation'], comp['structure_graph'] print(i, f'{d}D', f'orientation:{hkl}', comp['site_ids'], sub_g.structure.composition.formula.replace(" ", "")) print('edge translations:', set([edata[2] for edata in sub_g.graph.edges(data='to_jimage')])) ``` ### Relevant files to reproduce this bug _No response_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4293/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4293/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4294
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4294/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4294/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4294/events
https://github.com/materialsproject/pymatgen/pull/4294
2,863,240,894
PR_kwDOACgets6Lvp1u
4,294
Bump nokogiri from 1.16.5 to 1.18.3 in /docs
{ "login": "dependabot[bot]", "id": 49699333, "node_id": "MDM6Qm90NDk2OTkzMzM=", "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dependabot%5Bbot%5D", "html_url": "https://github.com/apps/dependabot", "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers", "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos", "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[ { "id": 1532985663, "node_id": "MDU6TGFiZWwxNTMyOTg1NjYz", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/dependencies", "name": "dependencies", "color": "0366d6", "default": false, "description": "Dependency issues and PRs" }, { "id": 7549756566, "node_id": "LA_kwDOACgets8AAAABwgAklg", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ruby", "name": "ruby", "color": "ce2d2d", "default": false, "description": "Pull requests that update Ruby code" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-19T12:48:48
2025-03-03T21:17:56
2025-03-03T21:17:54Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.5 to 1.18.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/releases">nokogiri's releases</a>.</em></p> <blockquote> <h2>v1.18.3 / 2025-02-18</h2> <h3>Security</h3> <ul> <li>[CRuby] Vendored libxml2 is updated to <a href="https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6">v2.13.6</a> to address CVE-2025-24928 and CVE-2024-56171. See <a href="https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vvfq-8hwr-qm4m">GHSA-vvfq-8hwr-qm4m</a> for more information.</li> </ul> <!-- raw HTML omitted --> <pre><code>cab20305133078a8f6b60cf96311b48319175038cc7772e5ec586ff624cb7838 nokogiri-1.18.3-aarch64-linux-gnu.gem acb256bb3213a180b1ed84a49c06d5d4c6c1da26f33bc9681f1fece4dab09a79 nokogiri-1.18.3-aarch64-linux-musl.gem ce088965cd424b8e752d82087dcf017069d55791f157098ed1f671d966857610 nokogiri-1.18.3-arm64-darwin.gem 37b73a55e0d1e8a058a24abb16868903e81cb4773049739c532b864f87236b1b nokogiri-1.18.3-arm-linux-gnu.gem 09407970cd13736cf87e975fae69c13e1178bab0313d07b35580ee4dd3650793 nokogiri-1.18.3-arm-linux-musl.gem 6b9fc3b14fd0cedd21f6cad8cf565123ba7401e56b5d0aec180c23cdca28fd5a nokogiri-1.18.3.gem 236078c5f80ffc3d49c223fa98933d970543455403f9d672ca0aa5a6178a84fe nokogiri-1.18.3-java.gem 216be1cb454c4657fc64747e5ae32b2ab4015843183766f238e4f4a62fb1f6be nokogiri-1.18.3-x64-mingw-ucrt.gem d729406bb5a7b1bbe7ed3c0922336dd2c46085ed444d6de2a0a4c33950a4edea nokogiri-1.18.3-x86_64-darwin.gem 3c7ad5cee39855ed9c746065f39b584b9fd2aaff61df02d0f85ba8d671bbe497 nokogiri-1.18.3-x86_64-linux-gnu.gem 8aaecc22c0e5f12dac613e15f9a04059c3ec859d6f98f493cc831bd88fe8e731 nokogiri-1.18.3-x86_64-linux-musl.gem </code></pre> <!-- raw HTML omitted --> <h2>v1.18.2 / 2024-01-19</h2> <h3>Fixed</h3> <ul> <li>When performing a CSS selector query, an XML document's root namespace declarations should not be applied to wildcard selectors (<code>&quot;*&quot;</code>). Fixes a bug introduced in v1.17.0. (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3411">#3411</a>) <a href="https://github.com/flavorjones"><code>@​flavorjones</code></a></li> </ul> <!-- raw HTML omitted --> <pre><code>74e0f9a7487a30a2957f46c5113d58f836436b033c9906e0bc6fee9d8cdafabf nokogiri-1.18.2-aarch64-linux-gnu.gem 99bcea596a80eaee99f2bae2596275641ea688262c1da32b4e90db6159e86477 nokogiri-1.18.2-aarch64-linux-musl.gem 8288ec7a296e2510ca9bd053c0c5989f11260f8c07bc3e9afbafa536f7077281 nokogiri-1.18.2-arm64-darwin.gem 6fb0246b69f2c589a69254e82bc2a40aa238c4f977fd7903e283341a92935729 nokogiri-1.18.2-arm-linux-gnu.gem dcdd4d10ed2743f0d8c887825700c3a8506aea1aa415917ac50ccc01597c51a3 nokogiri-1.18.2-arm-linux-musl.gem 93791cfb33186fe077eb9e1b8a6855b5621e328f81f565334572fa398366f8bf nokogiri-1.18.2.gem eefdf9f0d6086173d3488cf7a736732ee13fb6674ef15643478c20502a67bf37 nokogiri-1.18.2-java.gem 894514572fa7503ce9210e51a7f8a9a35f34f154d6406cec1ac148c3ce1536a3 nokogiri-1.18.2-x64-mingw-ucrt.gem 7fca165e5ee87e9b6b3f1377180376afc0c8652ed2a3d761f472f0e3d3a1c651 nokogiri-1.18.2-x86_64-darwin.gem 9330ced4a976604865c2a76ce158e2bc608fa83999552e85a32ec06f85f427db nokogiri-1.18.2-x86_64-linux-gnu.gem 1cd7786ed15c76958d6a8f9a864df6208fecd624c340eb4ed211fbea60328f02 nokogiri-1.18.2-x86_64-linux-musl.gem </code></pre> <!-- raw HTML omitted --> <h2>v1.18.1 / 2024-12-29</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/blob/v1.18.3/CHANGELOG.md">nokogiri's changelog</a>.</em></p> <blockquote> <h2>v1.18.3 / 2025-02-18</h2> <h3>Security</h3> <ul> <li>[CRuby] Vendored libxml2 is updated <a href="https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6">v2.13.6</a> to address CVE-2025-24928 and CVE-2024-56171. Nokogiri's maintainers believe these vulnerabilities do not affect users of Nokogiri, but we advise upgrading at your earliest convenience anyway.</li> </ul> <h2>v1.18.2 / 2024-01-19</h2> <h3>Fixed</h3> <ul> <li>When performing a CSS selector query, an XML document's root namespace declarations should not be applied to wildcard selectors (<code>&quot;*&quot;</code>). Fixes a bug introduced in v1.17.0. (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3411">#3411</a>) <a href="https://github.com/flavorjones"><code>@​flavorjones</code></a></li> </ul> <h2>v1.18.1 / 2024-12-29</h2> <h3>Fixed</h3> <ul> <li>[CRuby] XML::SAX::ParserContext keeps a reference to the input to avoid a potential use-after-free issue that's existed since v1.4.0 (2009). (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3395">#3395</a>) <a href="https://github.com/flavorjones"><code>@​flavorjones</code></a></li> </ul> <h2>v1.18.0 / 2024-12-25</h2> <h3>Notable Changes</h3> <h4>Ruby</h4> <p>This release introduces native gem support for Ruby 3.4.</p> <p>This release ends support for Ruby 3.0, for which <a href="https://www.ruby-lang.org/en/downloads/branches/">upstream support ended 2024-04-23</a>.</p> <p>This release ships separate precompiled GNU and Musl gems for all linux platforms. Previously both GNU and Musl target systems could use and install the same gem, e.g., the platform gem for <code>x86_64-linux</code>. Now, however, the precompiled gem platforms would be <code>x86_64-linux-gnu</code> and <code>x86_64-linux-musl</code>. So long as you're on <code>bundler &gt;= 2.5.6</code> this should be seamless other than perhaps needing to update the platforms in your &quot;Gemfile.lock&quot;.</p> <p>This release drops precompiled native platform gems for <code>x86-linux</code> and <code>x86-mingw32</code>. <strong>These platforms are still supported.</strong> Users on these platforms must install the &quot;ruby platform&quot; gem which requires a compiler toolchain. See <a href="https://nokogiri.org/tutorials/installing_nokogiri.html#installing-the-ruby-platform-gem">Installing the <code>ruby</code> platform gem</a> in the installation docs. (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3369">#3369</a>, <a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3081">#3081</a>)</p> <h3>Improved</h3> <ul> <li>[CRuby] CSS and XPath queries are faster now that <code>Node#xpath</code>, <code>Node#css</code>, and related functions are using a faster XPathContext initialization process. We benchmarked a 1.9x improvement for a 6kb file. Big thanks to <a href="https://github.com/nwellnhof"><code>@​nwellnhof</code></a> for helping with this one. (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3378">#3378</a>, superseded by <a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3389">#3389</a>) <a href="https://github.com/flavorjones"><code>@​flavorjones</code></a></li> </ul> <h2>v1.17.2 / 2024-12-12</h2> <h3>Fixed</h3> <ul> <li>[JRuby] Fixed an issue where <code>Node#dup</code> when called with the <code>new_parent_doc</code> parameter was not decorating the node with the document's <code>Node</code> decorators. <a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3372">#3372</a> <a href="https://github.com/flavorjones"><code>@​flavorjones</code></a></li> </ul> <h2>v1.17.1 / 2024-12-10</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/sparklemotion/nokogiri/commit/fd3ca2e22df67fd25fd5c25c466f6896b6547cb8"><code>fd3ca2e</code></a> version bump to v1.18.3</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/a8c526adf17716cf115e78995c815fc65f5937a2"><code>a8c526a</code></a> dep: update libxml2 to v2.13.6 (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3437">#3437</a>)</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/0847cf86885ea5d25ccc9d3ff1c4c097f2891a60"><code>0847cf8</code></a> ci: tired of waiting for gnome mirrors</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/11945c82df6fca8827c2914e585e8e3a7027dcb5"><code>11945c8</code></a> dep: update libxml2 to v2.13.6</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/aa54fa59544ceb224d3fe6e3a53d05d5c937b15b"><code>aa54fa5</code></a> version bump to v1.18.2</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/0fb5541c95596fa67ea1ef60df9ad740fbcda672"><code>0fb5541</code></a> backport: fix(css-selector): default XML namespace should not be applied to w...</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/8ef2e918e7121a0773d3f777e9abe415180368a4"><code>8ef2e91</code></a> ci: bump windows test images from &quot;head&quot; to &quot;3.4&quot;</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/c10fd7a02e5f13e7889587141e8522b2d864a7c6"><code>c10fd7a</code></a> dev: so tired of psych not building on various things</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/83787496149d2ff2203892951a44e835181c1558"><code>8378749</code></a> fix(css-selector): default XML namespace is not applied to wildcard</li> <li><a href="https://github.com/sparklemotion/nokogiri/commit/b112e18a4851eca1d40dcc7e755653dc32ea885d"><code>b112e18</code></a> prefactor: restructure css-to-xpath tests</li> <li>Additional commits viewable in <a href="https://github.com/sparklemotion/nokogiri/compare/v1.16.5...v1.18.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&previous-version=1.16.5&new-version=1.18.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/materialsproject/pymatgen/network/alerts). </details>
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4294/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4294/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4294", "html_url": "https://github.com/materialsproject/pymatgen/pull/4294", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4294.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4294.patch", "merged_at": "2025-03-03T21:17:54Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4295
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4295/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4295/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4295/events
https://github.com/materialsproject/pymatgen/pull/4295
2,863,749,103
PR_kwDOACgets6LxZET
4,295
Pass `kwargs` to `IStructure.to` method in JSON format
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-19T15:50:56
2025-03-03T21:19:13
2025-03-03T21:17:41Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Pass `kwargs` to `IStructure.to` method in JSON format, #3018 **Rationale:** Allow more fine grained control of `json.dumps` behaviour when needed (without changing current behaviour AFAIK), also consistent with other formats
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4295/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4295/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4295", "html_url": "https://github.com/materialsproject/pymatgen/pull/4295", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4295.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4295.patch", "merged_at": "2025-03-03T21:17:41Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4296
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4296/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4296/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4296/events
https://github.com/materialsproject/pymatgen/pull/4296
2,863,775,214
PR_kwDOACgets6LxetK
4,296
Make dict representation of `SymmetrizedStructure` MSONable
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks @DanielYang59, and thanks for flagging it as breaking. Could you clarify what is actually breaking here? As far as I can see it's just the extra keys in the dict representation?\r\n\r\nIf breaking, could you also make sure the PR includes an update to the [compatibility page](https://github.com/materialsproject/pymatgen/blob/master/pyproject.toml) to make sure people are notified. Thanks!", "Hi @mkhorton thanks for reviewing!\r\n\r\n> Could you clarify what is actually breaking here? As far as I can see it's just the extra keys in the dict representation?\r\n\r\nYes AFAIK the breaking change would be the change of dict representation (which could also be considered a fix, but I assume it's better safe than sorry)." ]
2025-02-19T16:01:24
2025-03-17T13:44:31
2025-03-17T13:39:56Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Make dict representation of `SymmetrizedStructure` MSONable, to fix #3018 - [x] Unit test
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4296/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4296/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4296", "html_url": "https://github.com/materialsproject/pymatgen/pull/4296", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4296.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4296.patch", "merged_at": "2025-03-17T13:39:56Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4297
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4297/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4297/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4297/events
https://github.com/materialsproject/pymatgen/pull/4297
2,864,307,423
PR_kwDOACgets6LzRCn
4,297
Bugfix: Structure/ase.Atoms interconversion side effects
{ "login": "wolearyc", "id": 5248349, "node_id": "MDQ6VXNlcjUyNDgzNDk=", "avatar_url": "https://avatars.githubusercontent.com/u/5248349?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wolearyc", "html_url": "https://github.com/wolearyc", "followers_url": "https://api.github.com/users/wolearyc/followers", "following_url": "https://api.github.com/users/wolearyc/following{/other_user}", "gists_url": "https://api.github.com/users/wolearyc/gists{/gist_id}", "starred_url": "https://api.github.com/users/wolearyc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wolearyc/subscriptions", "organizations_url": "https://api.github.com/users/wolearyc/orgs", "repos_url": "https://api.github.com/users/wolearyc/repos", "events_url": "https://api.github.com/users/wolearyc/events{/privacy}", "received_events_url": "https://api.github.com/users/wolearyc/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks, @wolearyc! Happy to merge this as-is. I fixed your failing tests by updating your branch." ]
2025-02-19T20:11:45
2025-02-28T18:03:15
2025-02-28T18:03:15Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary This PR resolves #4289. There were bugs in `pymatgen.io.ase.AseAtomsAdaptor` in which `Structure` and `ase.Atoms` objects were modified when converted into one another. Specifically, `Atoms.info` and `Structure.properties` shared memory, leading to side effects. Minor changes: - `AseAtomsAdaptor` now uses `deepcopy` when converting `Atoms.info` to `Structure.properties` and vice versa 3d477472f93b4ee4ad9cc47fe827a59b9e3d912f - Added tests to check for side effects and check space group dictionary <-> `ase.spacegroup.Spacegroup` interconversion 1730f29eb617f15ce13a8977104d18c3dfb871bb ## Checklist - [ ] Google format doc strings added. Check with `ruff`. - [ ] Type annotations included. Check with `mypy`. - [x] Tests added for new features/fixes. - [x] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172)) **(N/A)**
{ "login": "Andrew-S-Rosen", "id": 8674072, "node_id": "MDQ6VXNlcjg2NzQwNzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Andrew-S-Rosen", "html_url": "https://github.com/Andrew-S-Rosen", "followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers", "following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}", "gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions", "organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs", "repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos", "events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}", "received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4297/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4297/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4297", "html_url": "https://github.com/materialsproject/pymatgen/pull/4297", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4297.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4297.patch", "merged_at": "2025-02-28T18:03:15Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4298
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4298/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4298/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4298/events
https://github.com/materialsproject/pymatgen/issues/4298
2,866,821,409
I_kwDOACgets6q4Dkh
4,298
[Question]: Usage of Graph Algorithms and Any Slowdowns?
{ "login": "nv-rliu", "id": 137829296, "node_id": "U_kgDOCDcbsA", "avatar_url": "https://avatars.githubusercontent.com/u/137829296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nv-rliu", "html_url": "https://github.com/nv-rliu", "followers_url": "https://api.github.com/users/nv-rliu/followers", "following_url": "https://api.github.com/users/nv-rliu/following{/other_user}", "gists_url": "https://api.github.com/users/nv-rliu/gists{/gist_id}", "starred_url": "https://api.github.com/users/nv-rliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nv-rliu/subscriptions", "organizations_url": "https://api.github.com/users/nv-rliu/orgs", "repos_url": "https://api.github.com/users/nv-rliu/repos", "events_url": "https://api.github.com/users/nv-rliu/events{/privacy}", "received_events_url": "https://api.github.com/users/nv-rliu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-20T17:22:48
2025-02-20T17:22:48
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
Hi there, I'm interested in understanding if `pymatgen` depends on any graph algorithms from its usage of NetworkX? If so, - What algorithms are used for what purpose? - What graph sizes are they being used with? - Have users experienced any slowdowns or issues with algorithms provided by NetworkX? (Speed, algorithm availability, etc) Furthermore, would users be interested in accelerated nx algorithms via a GPU backend? This would involve zero code change. Any insight into this topic would be greatly appreciated! Thank you.
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4298/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4298/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4299
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4299/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4299/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4299/events
https://github.com/materialsproject/pymatgen/pull/4299
2,869,420,486
PR_kwDOACgets6MEg4h
4,299
Update inequality in `get_linear_interpolated_value`
{ "login": "kavanase", "id": 51478689, "node_id": "MDQ6VXNlcjUxNDc4Njg5", "avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kavanase", "html_url": "https://github.com/kavanase", "followers_url": "https://api.github.com/users/kavanase/followers", "following_url": "https://api.github.com/users/kavanase/following{/other_user}", "gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}", "starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kavanase/subscriptions", "organizations_url": "https://api.github.com/users/kavanase/orgs", "repos_url": "https://api.github.com/users/kavanase/repos", "events_url": "https://api.github.com/users/kavanase/events{/privacy}", "received_events_url": "https://api.github.com/users/kavanase/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Also there was a pre-commit `codespell` failure due to a variable name in `local_env` which was fixed in https://github.com/materialsproject/pymatgen/pull/4299/commits/8fdea1637b7c6ae933102d769ded02d1ca23163e ", "This also adds some very small updates to make the behaviour of `DOS.get_interpolated_gap` and `Dos.get_interpolated_gap` fully consistent" ]
2025-02-21T16:00:10
2025-02-25T07:28:23
2025-02-25T07:28:23Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
This is a small but important fix for the `get_linear_interpolated_value` function in `pymatgen.util.coord`, used in various places within the codebase. This function works by finding the first index in `x_values` that is greater than / equal to `x`, and then uses this index and the previous (`idx-1`) with `x_values` and `y_values` to interpolate: https://github.com/materialsproject/pymatgen/blob/v2025.2.18/src/pymatgen/util/coord.py#L136-L147 The issue is that if the _first_ index in `x_values` is equal to `x`, this causes the ValueError to be thrown (as `indices[0]==0`); where it thinks that the input `x` to interpolate is outside the interpolable range. Changing the inequality to `>` rather than `>=` resolves this issue. MWE: ``` from pymatgen.util.coord import get_linear_interpolated_value get_linear_interpolated_value([0.0001, 0.0002], [1,2], 0.0001) ``` Current `pymatgen` `master`: <img width="750" alt="image" src="https://github.com/user-attachments/assets/bf687cd5-58e0-4af9-8d78-dce680c8b5d0" /> Where we can see "`x=0.0001 is out of range of provided x_values (0.0001, 0.0002)`" does not make sense. This branch: <img width="514" alt="image" src="https://github.com/user-attachments/assets/13615bc3-4665-49ed-b58c-586b030a334b" /> And confirming the error is still correctly thrown with an `x` value that is actually outside the range: <img width="747" alt="image" src="https://github.com/user-attachments/assets/7ed73f11-9d3c-4459-8481-ab160345fb27" />
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4299/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4299/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4299", "html_url": "https://github.com/materialsproject/pymatgen/pull/4299", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4299.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4299.patch", "merged_at": "2025-02-25T07:28:23Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4301
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4301/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4301/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4301/events
https://github.com/materialsproject/pymatgen/issues/4301
2,873,343,316
I_kwDOACgets6rQ71U
4,301
ENAUG in modern MP VASP sets should likely be removed
{ "login": "Andrew-S-Rosen", "id": 8674072, "node_id": "MDQ6VXNlcjg2NzQwNzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Andrew-S-Rosen", "html_url": "https://github.com/Andrew-S-Rosen", "followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers", "following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}", "gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions", "organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs", "repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos", "events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}", "received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-23T17:24:03
2025-02-23T17:45:21
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Pymatgen version 2025.2.18 ### Current behavior @esoteric-ephemera, @rkingsbury: In [MP24RelaxSet.yaml](https://github.com/materialsproject/pymatgen/blob/1b8c5f8d80ce598b7d56f8bcbef6f0de47c33a66/src/pymatgen/io/vasp/MP24RelaxSet.yaml#L9) and [MPSCANRelaxSet.yaml](https://github.com/materialsproject/pymatgen/blob/master/src/pymatgen/io/vasp/MPSCANRelaxSet.yaml), `ENAUG` is set to 1360. However, ENAUG has no effect if PREC is set to Accurate (as is the case here). It is also deprecated. See [ENAUG in the VASP manual](https://www.vasp.at/wiki/index.php/ENAUG). This parameter should probably be removed, at least for the newer MP24RelaxSet. Edit: I now realize I also mentioned this before at https://github.com/materialsproject/foundation/pull/26#issuecomment-2106065711. Apologies for the duplicate, but it's likely still relevant.
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4301/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4301/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4302
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4302/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4302/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4302/events
https://github.com/materialsproject/pymatgen/issues/4302
2,874,894,264
I_kwDOACgets6rW2e4
4,302
Ok, I it is not a bug
{ "login": "epatyukova", "id": 22679301, "node_id": "MDQ6VXNlcjIyNjc5MzAx", "avatar_url": "https://avatars.githubusercontent.com/u/22679301?v=4", "gravatar_id": "", "url": "https://api.github.com/users/epatyukova", "html_url": "https://github.com/epatyukova", "followers_url": "https://api.github.com/users/epatyukova/followers", "following_url": "https://api.github.com/users/epatyukova/following{/other_user}", "gists_url": "https://api.github.com/users/epatyukova/gists{/gist_id}", "starred_url": "https://api.github.com/users/epatyukova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/epatyukova/subscriptions", "organizations_url": "https://api.github.com/users/epatyukova/orgs", "repos_url": "https://api.github.com/users/epatyukova/repos", "events_url": "https://api.github.com/users/epatyukova/events{/privacy}", "received_events_url": "https://api.github.com/users/epatyukova/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-24T13:01:39
2025-02-24T13:08:09
2025-02-24T13:07:22Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.7 ### Pymatgen version Version: 2024.11.13 ### Operating system version _No response_ ### Current behavior I download the structure from JARVIS dft_3d, let's take the structure JVASP-23862 (NaCl) Jarvis atoms: {'lattice_mat': [[3.4360963088789007, -2.8895741e-09, 1.983831700551504], [1.1453654335686507, 3.239583076001878, 1.9838317005515027], [-8.1729468e-09, -5.7791469e-09, 3.9676624294149256]], 'coords': [[0.0, 0.0, 0.0], [2.290735, 1.61979, 3.96766]], 'elements': ['Na', 'Cl'], 'abc': [3.967665, 3.967661, 3.96766], 'angles': [60.0, 60.0, 59.9999], 'cartesian': True, 'props': ['', '']} Now we create structure=Structure(lattice=atoms['lattice_mat'],species=atoms['elements'],coords=atoms['coords']) And print structure: Structure Summary Lattice abc : 3.967662543614852 3.9676628761583004 3.9676624294149256 angles : 59.99999574138315 59.9999929688563 59.99999808509698 volume : 44.166111595020936 A : 3.4360963088789007 -2.8895741e-09 1.983831700551504 B : 1.1453654335686507 3.239583076001878 1.9838317005515027 C : -8.1729468e-09 -5.7791469e-09 3.9676624294149256 pbc : True True True PeriodicSite: Na (0.0, 0.0, 0.0) [0.0, 0.0, 0.0] PeriodicSite: Cl (9.726, 5.247, 23.5) [2.291, 1.62, 3.968] You can see that what were cartesian coordinates in Jarvis became fractional coordinates in pymatgen!! ### Expected Behavior PeriodicSite: Cl (2.291, 1.62, 3.968) [..., ..., ...] ### Minimal example ```Python ``` ### Relevant files to reproduce this bug _No response_
{ "login": "epatyukova", "id": 22679301, "node_id": "MDQ6VXNlcjIyNjc5MzAx", "avatar_url": "https://avatars.githubusercontent.com/u/22679301?v=4", "gravatar_id": "", "url": "https://api.github.com/users/epatyukova", "html_url": "https://github.com/epatyukova", "followers_url": "https://api.github.com/users/epatyukova/followers", "following_url": "https://api.github.com/users/epatyukova/following{/other_user}", "gists_url": "https://api.github.com/users/epatyukova/gists{/gist_id}", "starred_url": "https://api.github.com/users/epatyukova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/epatyukova/subscriptions", "organizations_url": "https://api.github.com/users/epatyukova/orgs", "repos_url": "https://api.github.com/users/epatyukova/repos", "events_url": "https://api.github.com/users/epatyukova/events{/privacy}", "received_events_url": "https://api.github.com/users/epatyukova/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4302/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4302/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4303
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4303/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4303/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4303/events
https://github.com/materialsproject/pymatgen/pull/4303
2,876,797,411
PR_kwDOACgets6MYung
4,303
Fix mcl kpoints
{ "login": "dgaines2", "id": 38781226, "node_id": "MDQ6VXNlcjM4NzgxMjI2", "avatar_url": "https://avatars.githubusercontent.com/u/38781226?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dgaines2", "html_url": "https://github.com/dgaines2", "followers_url": "https://api.github.com/users/dgaines2/followers", "following_url": "https://api.github.com/users/dgaines2/following{/other_user}", "gists_url": "https://api.github.com/users/dgaines2/gists{/gist_id}", "starred_url": "https://api.github.com/users/dgaines2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dgaines2/subscriptions", "organizations_url": "https://api.github.com/users/dgaines2/orgs", "repos_url": "https://api.github.com/users/dgaines2/repos", "events_url": "https://api.github.com/users/dgaines2/events{/privacy}", "received_events_url": "https://api.github.com/users/dgaines2/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "Thanks for catching this @dgaines2! A fairly subtle bug, I hope there are not more present. Perhaps a good excuse to go back over these to be sure. Out of interest, what was the third-party software you noticed the bug in?\r\n\r\nIncluding a screenshot from [the paper](https://arxiv.org/pdf/1004.2974) for documentary purposes:\r\n\r\n<img width=\"543\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a1a56297-8fd4-4ed1-a3da-4ae1b9faf3a6\" />", "Thanks for reviewing this! The third-party software is [sumo](https://smtg-bham.github.io/sumo/)", "Thanks." ]
2025-02-25T03:32:21
2025-04-24T17:05:49
2025-04-20T19:37:52Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Fixed errors in two of the k-points for the MCL reciprocal lattice (according to Table 16 in Setyawan-Curtarolo 2010) M2 and D1 aren't included in the recommended k-point path, but third-party software that plots k-point paths using pymatgen labelled M2 in the path instead of M1 due to it being the "same" k-point.
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4303/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4303/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4303", "html_url": "https://github.com/materialsproject/pymatgen/pull/4303", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4303.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4303.patch", "merged_at": "2025-04-20T19:37:52Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4304
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4304/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4304/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4304/events
https://github.com/materialsproject/pymatgen/pull/4304
2,877,360,092
PR_kwDOACgets6MamNk
4,304
`MagneticStructureEnumerator`: Expose `max_orderings` as a keyword argument
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-25T07:24:47
2025-02-25T18:04:22
2025-02-25T18:04:20Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
This was previously obscured by a hard-coded `num_orderings` class attribute.
{ "login": "mkhorton", "id": 2976580, "node_id": "MDQ6VXNlcjI5NzY1ODA=", "avatar_url": "https://avatars.githubusercontent.com/u/2976580?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mkhorton", "html_url": "https://github.com/mkhorton", "followers_url": "https://api.github.com/users/mkhorton/followers", "following_url": "https://api.github.com/users/mkhorton/following{/other_user}", "gists_url": "https://api.github.com/users/mkhorton/gists{/gist_id}", "starred_url": "https://api.github.com/users/mkhorton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mkhorton/subscriptions", "organizations_url": "https://api.github.com/users/mkhorton/orgs", "repos_url": "https://api.github.com/users/mkhorton/repos", "events_url": "https://api.github.com/users/mkhorton/events{/privacy}", "received_events_url": "https://api.github.com/users/mkhorton/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4304/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4304/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4304", "html_url": "https://github.com/materialsproject/pymatgen/pull/4304", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4304.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4304.patch", "merged_at": "2025-02-25T18:04:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4305
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4305/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4305/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4305/events
https://github.com/materialsproject/pymatgen/issues/4305
2,885,349,129
I_kwDOACgets6r-u8J
4,305
Default `fmt` of `IStructure.to` doesn't agree with docstring
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-27T19:00:33
2025-03-03T21:17:24
2025-03-03T21:17:23Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
As per the `IStructure.to` docstring: https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/core/structure.py#L2920-L2932 The default `fmt` should be `json` when `filename` is not provided. However: ```python from pymatgen.core import Structure, Lattice structure = Structure( lattice=Lattice.cubic(3), species=("Fe", "Fe"), coords=((0, 0, 0), (0.5, 0.5, 0.5)), ) structure.to() ``` Would throw an error as the `fmt` is empty string instead of JSON: ``` Traceback (most recent call last): File "/Users/yang/developer/pymatgen/debug/test_structure_to.py", line 10, in <module> structure.to() ~~~~~~~~~~~~^^ File "/Users/yang/developer/pymatgen/src/pymatgen/core/structure.py", line 3028, in to raise ValueError(f"Format not specified and could not infer from {filename=}") ValueError: Format not specified and could not infer from filename='' ``` https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/core/structure.py#L3026-L3029
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4305/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4305/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4306
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4306/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4306/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4306/events
https://github.com/materialsproject/pymatgen/pull/4306
2,885,363,580
PR_kwDOACgets6M2AZq
4,306
`IStructure.to` default to JSON when `filename` not specified
{ "login": "DanielYang59", "id": 80093591, "node_id": "MDQ6VXNlcjgwMDkzNTkx", "avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DanielYang59", "html_url": "https://github.com/DanielYang59", "followers_url": "https://api.github.com/users/DanielYang59/followers", "following_url": "https://api.github.com/users/DanielYang59/following{/other_user}", "gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}", "starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions", "organizations_url": "https://api.github.com/users/DanielYang59/orgs", "repos_url": "https://api.github.com/users/DanielYang59/repos", "events_url": "https://api.github.com/users/DanielYang59/events{/privacy}", "received_events_url": "https://api.github.com/users/DanielYang59/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-02-27T19:06:42
2025-03-03T21:18:29
2025-03-03T21:17:23Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summay - `IStructure.to` default to JSON when `filename` not specified, to close #4305
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4306/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4306/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4306", "html_url": "https://github.com/materialsproject/pymatgen/pull/4306", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4306.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4306.patch", "merged_at": "2025-03-03T21:17:22Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4307
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4307/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4307/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4307/events
https://github.com/materialsproject/pymatgen/issues/4307
2,887,763,825
I_kwDOACgets6sH8dx
4,307
ELFCAR data field names do not make sense
{ "login": "Andrew-S-Rosen", "id": 8674072, "node_id": "MDQ6VXNlcjg2NzQwNzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Andrew-S-Rosen", "html_url": "https://github.com/Andrew-S-Rosen", "followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers", "following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}", "gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}", "starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions", "organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs", "repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos", "events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}", "received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 5563699492, "node_id": "LA_kwDOACgets8AAAABS59RJA", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux", "name": "ux", "color": "28DEA4", "default": false, "description": "User experience" } ]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "I have confirmed that @mkhorton is correct in that the total and diff are spin up and spin down, respectively, unlike the CHGCAR." ]
2025-02-28T17:53:48
2025-03-02T02:55:34
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Pymatgen version 2025.2.18 ### Current behavior As @mkhorton has aptly noted: https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/io/vasp/outputs.py#L3944-L3947 https://github.com/materialsproject/pymatgen/blob/b5d03d7e313c4933ccad27ac0037cba4a1538351/src/pymatgen/io/vasp/outputs.py#L3973-L3976 This is pretty self-explanatory. The keys "total" and "diff" are not intuitive or appropriate names for spin up or spin down, especially when we have dedicated keys for those used throughout Pymatgen. I am not making the change (yet) because I am not 100% certain that the current description is accurate. I assume it is based on the docstring, but I'd like to actually confirm this.
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4307/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4307/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4308
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4308/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4308/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4308/events
https://github.com/materialsproject/pymatgen/issues/4308
2,888,426,130
I_kwDOACgets6sKeKS
4,308
Monthly issue metrics report
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-03-01T02:33:04
2025-03-01T02:33:04
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
# Issue Metrics | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | | Time to first response | 2 days, 7:56:57 | 3 days, 6:18:38 | 3 days, 10:48:27 | | Time to close | 8 days, 3:31:15 | 7 days, 14:11:34 | 14 days, 23:51:30 | | Time to answer | None | None | None | | Metric | Count | | --- | ---: | | Number of items that remain open | 9 | | Number of items closed | 3 | | Number of most active mentors | 0 | | Total number of items created | 12 | | Title | URL | Author | Time to first response | Time to close | Time to answer | | --- | --- | --- | --- | --- | --- | | ELFCAR data field names do not make sense | https://github.com/materialsproject/pymatgen/issues/4307 | [Andrew-S-Rosen](https://github.com/Andrew-S-Rosen) | None | None | None | | Default `fmt` of `IStructure.to` doesn't agree with docstring | https://github.com/materialsproject/pymatgen/issues/4305 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | Ok, I it is not a bug | https://github.com/materialsproject/pymatgen/issues/4302 | [epatyukova](https://github.com/epatyukova) | None | 0:05:43 | None | | ENAUG in modern MP VASP sets should likely be removed | https://github.com/materialsproject/pymatgen/issues/4301 | [Andrew-S-Rosen](https://github.com/Andrew-S-Rosen) | None | None | None | | [Question]: Usage of Graph Algorithms and Any Slowdowns? | https://github.com/materialsproject/pymatgen/issues/4298 | [nv-rliu](https://github.com/nv-rliu) | None | None | None | | Wrong reassignment of translations for edges in __mul__ method of StructureGraph object | https://github.com/materialsproject/pymatgen/issues/4293 | [trioxane](https://github.com/trioxane) | None | None | None | | structure.to_ase_atoms() modifies structure.properties in place | https://github.com/materialsproject/pymatgen/issues/4289 | [wolearyc](https://github.com/wolearyc) | 3 days, 6:18:38 | 16 days, 20:16:29 | None | | typo in 'core/structure.py' | https://github.com/materialsproject/pymatgen/issues/4286 | [MoseyQAQ](https://github.com/MoseyQAQ) | 3 days, 11:55:54 | 7 days, 14:11:34 | None | | Replace `pybtex` or make it optional? | https://github.com/materialsproject/pymatgen/issues/4285 | [DanielYang59](https://github.com/DanielYang59) | None | None | None | | Python 3.13 support | https://github.com/materialsproject/pymatgen/issues/4284 | [janosh](https://github.com/janosh) | 5:36:18 | None | None | | Redefinition of the ASE Atoms class in pymatgen.io.ase is problematic with type checkers | https://github.com/materialsproject/pymatgen/issues/4282 | [tomdemeyere](https://github.com/tomdemeyere) | None | None | None | | Monthly issue metrics report | https://github.com/materialsproject/pymatgen/issues/4277 | [github-actions[bot]](https://github.com/github-actions[bot]) | None | None | None | _This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_ Search query used to find these items: `repo:materialsproject/pymatgen is:issue created:2025-02-01..2025-02-28 -reason:"not planned"`
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4308/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4308/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4309
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4309/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4309/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4309/events
https://github.com/materialsproject/pymatgen/issues/4309
2,888,977,404
I_kwDOACgets6sMkv8
4,309
`ImportError`: cannot import name `'SymmetryGroup'` from partially initialized module `'pymatgen.symmetry.groups'`
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 19613987, "node_id": "MDU6TGFiZWwxOTYxMzk4Nw==", "url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug", "name": "bug", "color": "9222c1", "default": true, "description": "" } ]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[ "depending on use case, viable workaround may be to use `from moyopy import SpaceGroupType` instead" ]
2025-03-01T15:38:07
2025-04-10T20:15:31
2025-04-10T20:15:31Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.13 ### Pymatgen version 2025.2.18 ### Operating system version macOS ### Current behavior ```py from pymatgen.symmetry.groups import SpaceGroup File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pymatgen/symmetry/groups.py", line 21, in <module> from pymatgen.core.operations import SymmOp File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pymatgen/core/__init__.py", line 17, in <module> from pymatgen.core.structure import IMolecule, IStructure, Molecule, PeriodicNeighbor, SiteCollection, Structure File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pymatgen/core/structure.py", line 44, in <module> from pymatgen.symmetry.maggroups import MagneticSpaceGroup File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pymatgen/symmetry/maggroups.py", line 17, in <module> from pymatgen.symmetry.groups import SymmetryGroup, in_array_list ImportError: cannot import name 'SymmetryGroup' from partially initialized module 'pymatgen.symmetry.groups' (most likely due to a circular import) (/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pymatgen/symmetry/groups.py) ``` ### Expected Behavior this same error showed up twice before in 2022 and 2023 - https://github.com/materialsproject/pymatgen/issues/3485 - https://github.com/materialsproject/pymatgen/issues/2470 worth adding a unit test to catch this so that it doesn't slip through a 4th time ### Minimal example ```Python from pymatgen.symmetry.groups import SpaceGroup ``` ### Relevant files to reproduce this bug showed up in https://github.com/janosh/pymatviz/pull/275
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4309/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4309/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4310
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4310/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4310/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4310/events
https://github.com/materialsproject/pymatgen/issues/4310
2,889,601,493
I_kwDOACgets6sO9HV
4,310
Fix `SpaceGroup.symbol` to return short HM symbol always (incl. monoclinic spacegroups)
{ "login": "janosh", "id": 30958850, "node_id": "MDQ6VXNlcjMwOTU4ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/janosh", "html_url": "https://github.com/janosh", "followers_url": "https://api.github.com/users/janosh/followers", "following_url": "https://api.github.com/users/janosh/following{/other_user}", "gists_url": "https://api.github.com/users/janosh/gists{/gist_id}", "starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/janosh/subscriptions", "organizations_url": "https://api.github.com/users/janosh/orgs", "repos_url": "https://api.github.com/users/janosh/repos", "events_url": "https://api.github.com/users/janosh/events{/privacy}", "received_events_url": "https://api.github.com/users/janosh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-03-02T15:02:33
2025-03-02T15:02:33
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
and update docs to say `SpaceGroup.symbol` gives short, not full HM symbols > question for @kaueltzen and @JaGeo: the `SpaceGroup.symbol` [is documented](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.groups.SpaceGroup.symbol) to return the full HM symbol but as reported in https://github.com/spglib/moyo/issues/83, it actually returns the short symbol for all but the 13 triclinic space groups. did you also notice this inconsistency? is there any reason for keeping that? > either way, @shyuep the docs need correcting and/or the attribute changed to actually return the full HM symbol _Originally posted by @janosh in [#3845](https://github.com/materialsproject/pymatgen/issues/3845#issuecomment-2692770779)_
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4310/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4310/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4311
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4311/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4311/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4311/events
https://github.com/materialsproject/pymatgen/pull/4311
2,892,043,666
PR_kwDOACgets6NMfWO
4,311
pre-commit autoupdate
{ "login": "pre-commit-ci[bot]", "id": 66853113, "node_id": "MDM6Qm90NjY4NTMxMTM=", "avatar_url": "https://avatars.githubusercontent.com/in/68672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D", "html_url": "https://github.com/apps/pre-commit-ci", "followers_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/followers", "following_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/repos", "events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/pre-commit-ci%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
[]
closed
false
{ "login": "", "id": 0, "node_id": "", "avatar_url": "", "gravatar_id": "", "url": "", "html_url": "", "followers_url": "", "following_url": "", "gists_url": "", "starred_url": "", "subscriptions_url": "", "organizations_url": "", "repos_url": "", "events_url": "", "received_events_url": "", "type": "", "user_view_type": "", "site_admin": false }
[]
null
[]
2025-03-03T18:53:44
2025-03-03T21:17:05
2025-03-03T21:17:03Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.9.9) - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.1...v1.15.0) - [github.com/RobertCraigie/pyright-python: v1.1.393 → v1.1.396](https://github.com/RobertCraigie/pyright-python/compare/v1.1.393...v1.1.396) <!--pre-commit.ci end-->
{ "login": "shyuep", "id": 577107, "node_id": "MDQ6VXNlcjU3NzEwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shyuep", "html_url": "https://github.com/shyuep", "followers_url": "https://api.github.com/users/shyuep/followers", "following_url": "https://api.github.com/users/shyuep/following{/other_user}", "gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}", "starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/shyuep/subscriptions", "organizations_url": "https://api.github.com/users/shyuep/orgs", "repos_url": "https://api.github.com/users/shyuep/repos", "events_url": "https://api.github.com/users/shyuep/events{/privacy}", "received_events_url": "https://api.github.com/users/shyuep/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4311/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4311/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4311", "html_url": "https://github.com/materialsproject/pymatgen/pull/4311", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4311.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4311.patch", "merged_at": "2025-03-03T21:17:03Z" }