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/4099
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4099/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4099/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4099/events
https://github.com/materialsproject/pymatgen/pull/4099
2,577,317,772
PR_kwDOACgets5-JfDv
4,099
Ion: bugfix for CO2(aq) reduced formula
{ "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 }
[]
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-10-10T01:57:56
2024-10-10T18:48:09
2024-10-10T18:48:08Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
My recent changes to `Ion` in #3991 introduced a problem in which the `reduced_formula` of `CO2(aq)` would incorrectly be shown as `C2O4(aq)`. Other properties such as `composition` etc were not affected. ``` >>> from pymatgen.core.ion import Ion >>> Ion.from_formula('CO2').composition Composition('C1 O2') >>> Ion.from_formula('CO2').formula 'C1 O2 (aq)' >>> Ion.from_formula('CO2').reduced_formula 'C2O4(aq)' >>> Ion.from_formula('C2O4[-2]').composition Composition('C2 O4') >>> Ion.from_formula('C2O4[-2]').formula 'C2 O4 -2' >>> Ion.from_formula('C2O4[-2]').reduced_formula 'C2O4[-2]' ``` This PR fixes the CO2(aq) problem and adds 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/4099/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/4099/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4099", "html_url": "https://github.com/materialsproject/pymatgen/pull/4099", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4099.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4099.patch", "merged_at": "2024-10-10T18:48:08Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4100
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4100/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4100/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4100/events
https://github.com/materialsproject/pymatgen/pull/4100
2,577,566,945
PR_kwDOACgets5-KPi3
4,100
Support python3.13
{ "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
[ "might close this one now as too many packages don't support python 3.13, feel free to take over this", "Also cannot recreate the `Windows fatal exception: access violation` failure on my Windows machine (https://github.com/pytest-dev/pytest/issues/7634)", "I'm pretty much stuck with the Windows runner failure, **help needed**\r\n\r\n- Cannot recreate locally with `pytest --splits 10 --group 1 --durations-path tests/files/.pytest-split-durations tests`\r\n- Cannot find much useful info, according to: https://github.com/pytest-dev/pytest/issues/12728 \r\n > this is certain to be a bug in one (or several) other libraries.\r\n\r\n As there're too many dependencies in `pymatgen`, it's super hard to identify which \"may\" have caused this failure", "Would close this and open a new PR once #4361 is merged, this PR has been around for too long and I cannot remember everything here (plus most changes are related to pybtex)" ]
2024-10-10T04:44:06
2025-04-17T20:00:42
2025-04-17T20:00:24Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Support python 3.13, to close #4284 - [ ] Remove all `pybtex` check after #4361 - [ ] Need to fix the EOS test failure on Ubuntu 3.13 (seemingly related to numerical precision but cannot recreate locally) - [ ] Revert all platforms tested on Python 3.13 in `test.yml` test matrix (c9cc898301a7198488de660829a63ea62fafef3a) #### Optional dependencies that miss Python 3.13 support: - [ ] `openff-toolkit` (conda source) - [ ] `chgnet`
{ "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/4100/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/4100/timeline
null
true
true
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4100", "html_url": "https://github.com/materialsproject/pymatgen/pull/4100", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4100.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4100.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4101
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4101/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4101/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4101/events
https://github.com/materialsproject/pymatgen/pull/4101
2,577,733,496
PR_kwDOACgets5-Ku55
4,101
bump `chgnet` to support numpy 2, skip failing `matgl` test for `torch` 2.4.1
{ "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
[ "[The unit test failure](https://github.com/materialsproject/pymatgen/actions/runs/11269124025/job/31337138014?pr=4101):\r\n> E FileNotFoundError: Cannot find DGL C++ graphbolt library at /home/runner/micromamba/envs/pmg/lib/python3.12/site-packages/dgl/graphbolt/libgraphbolt_pytorch_2.4.1.so\r\n\r\nSeem to be related to DGL doesn't have that particular shared object for torch 2.4.1:\r\n```\r\n~/opt/miniconda3/envs/pymatgen/lib/python3.12/site-packages/dgl/graphbolt$ ls libgraphbolt_pytorch_2.*\r\nlibgraphbolt_pytorch_2.0.0.so libgraphbolt_pytorch_2.1.0.so libgraphbolt_pytorch_2.1.2.so libgraphbolt_pytorch_2.2.1.so\r\nlibgraphbolt_pytorch_2.0.1.so libgraphbolt_pytorch_2.1.1.so libgraphbolt_pytorch_2.2.0.so\r\n```\r\n\r\nshould be related to https://github.com/dmlc/dgl/issues/7247 and https://github.com/materialsvirtuallab/matgl/issues/296\r\n\r\n\r\n```\r\ndgl==2.1.0\r\nmatgl==1.1.3\r\n```", "Since chgnet is already implemented in matgl, I would rather we unify support for everything that matgl supports using matgl. ", "Great to know, thanks! But I don't any experience with matgl or chgnet, perhaps need someone with more expertise on this to migrate the implementation" ]
2024-10-10T06:13:02
2024-10-22T03:03:58
2024-10-22T02:41:39Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Bump `chgnet` to support Numpy2 ### Conflicting `torch` version - `chgnet 0.4.0` requires `torch > 2.4.1` to be NumPy2 compatible https://github.com/CederGroupHub/chgnet/pull/202#discussion_r1756944575 - `matgl` requires `torch <= 2.2.1` for `dgl` to work correctly https://github.com/materialsproject/pymatgen/pull/4101#issuecomment-2404278607 Should we skip two failing tests for `matgl` here as I assume this should be fixed from the `dgl` side? Input appreciated.
{ "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/4101/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/4101/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4101", "html_url": "https://github.com/materialsproject/pymatgen/pull/4101", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4101.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4101.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4102
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4102/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4102/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4102/events
https://github.com/materialsproject/pymatgen/pull/4102
2,578,166,448
PR_kwDOACgets5-ME_8
4,102
pin python 3.12 in CI and `requires-python`
{ "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
[ "The last set of tests never started. Thus, we are stuck here. Any thoughts, @DanielYang59 ?", "> The last set of tests never started. Thus, we are stuck here. \r\n\r\nI don't know the exact reason, ~~but my guess is the unstarted set is the cached set for our current config (python > 3.10 for Ubuntu). As the finished number of tests is exactly what we asked ` 42 successful, 1 skipped, and 10 expected checks `, the last 10 expected checks look like some kind of \"ghost\" from previous cache. The [check panel](https://github.com/materialsproject/pymatgen/pull/4102/checks), however, does reflect this real number of tests required.~~\r\n\r\nI didn't find any related reports in GitHub Community so I might open one later, https://github.com/orgs/community/discussions/141301", "@DanielYang59 @JaGeo 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. I saw the same thing in one of my projects. The only workaround I know is to temporarily remove that rule from the repo setting. ", "@ab5424 Bravo! you are the savior.\r\n\r\n> I think that the branch protection rules require a check under the name\r\n\r\nI don't have write access to the repo, but sounds like the branch protection rules are dynamically generated based the test matrix config **from the master branch**?\r\n\r\n> The only workaround I know is to temporarily remove that rule from the repo setting.\r\n\r\nMaintainers should be able to do a manual (force) merge not using auto-merge? @shyuep \r\n\r\n", "For some reason I'm still seeing \"ghost\" expected checks from other PR where the config should have been updated on master branch, perhaps the branch protection rule is hard coding to expect `ubuntu-latest, >3.10`? I cannot check myself as I don't have access " ]
2024-10-10T09:06:01
2024-12-24T12:17:44
2024-10-21T20:58:32Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Pin Python 3.12 in CI for now, as it seems a lot of dependencies don't support Python 3.13 yet #4100
{ "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/4102/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/4102/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4102", "html_url": "https://github.com/materialsproject/pymatgen/pull/4102", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4102.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4102.patch", "merged_at": "2024-10-21T20:58:32Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4103
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4103/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4103/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4103/events
https://github.com/materialsproject/pymatgen/pull/4103
2,579,466,913
PR_kwDOACgets5-QPRE
4,103
Support to aims format from Structure instance
{ "login": "ansobolev", "id": 2968993, "node_id": "MDQ6VXNlcjI5Njg5OTM=", "avatar_url": "https://avatars.githubusercontent.com/u/2968993?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ansobolev", "html_url": "https://github.com/ansobolev", "followers_url": "https://api.github.com/users/ansobolev/followers", "following_url": "https://api.github.com/users/ansobolev/following{/other_user}", "gists_url": "https://api.github.com/users/ansobolev/gists{/gist_id}", "starred_url": "https://api.github.com/users/ansobolev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ansobolev/subscriptions", "organizations_url": "https://api.github.com/users/ansobolev/orgs", "repos_url": "https://api.github.com/users/ansobolev/repos", "events_url": "https://api.github.com/users/ansobolev/events{/privacy}", "received_events_url": "https://api.github.com/users/ansobolev/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!" ]
2024-10-10T17:45:19
2024-10-15T10:29:47
2024-10-10T18:35:49Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary This pull request adds support for reading and writing files in FHI-aims `geometry.in` format to the `Structure` objects. Major changes: - Support for reading `geometry.in` file in `Structure.from_file` and `Structure.from_str` methods - Support for writing FHI-aims formatted file in `Structure.to` method ## 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/4103/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/4103/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4103", "html_url": "https://github.com/materialsproject/pymatgen/pull/4103", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4103.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4103.patch", "merged_at": "2024-10-10T18:35:49Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4104
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4104/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4104/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4104/events
https://github.com/materialsproject/pymatgen/pull/4104
2,582,321,414
PR_kwDOACgets5-YxZo
4,104
VASP Bugfixes: Volumetric data and XDATCAR parsing for monatomic structures
{ "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 have time. I had to make some version changes to linting / testing in CI to get the tests to set up correctly and run (newer version of mypy throws a lot of errors that should be handled separately and the linux build failed because of py3.13)", "Thanks. This looks good to me. Merged." ]
2024-10-11T23:23:35
2024-11-15T18:08:49
2024-10-14T18:37:42Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Two bug fixes: - For VASP 6.4.2 and up, all POSCAR-style strings include both the POTCAR symbol (e.g., `Mg_pv` rather than the elemental symbol `Mg`) and part of the POTCAR hash (`Si/79d9987ad87` rather than `Si`). While the hashing is already accounted for, the underscore was not. Fixed here, impacts CONTCAR and all volumetric data (CHGCAR, LOCPOT, AECCAR*) - For any monatomic XDATCAR where the title of the POSCAR substring is the same as the single chemical species, the XDATCAR parsing functionality of pymatgen doesn't work. This PR fixes that behavior, adds a test for it, and cleans up the XDATCAR parsing a bit
{ "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/4104/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/4104/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4104", "html_url": "https://github.com/materialsproject/pymatgen/pull/4104", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4104.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4104.patch", "merged_at": "2024-10-14T18:37:42Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4105
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4105/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4105/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4105/events
https://github.com/materialsproject/pymatgen/pull/4105
2,582,840,086
PR_kwDOACgets5-aBSL
4,105
Replace deprecated `ExpCellFilter` with `FrechetCellFilter`
{ "login": "ab5424", "id": 57258530, "node_id": "MDQ6VXNlcjU3MjU4NTMw", "avatar_url": "https://avatars.githubusercontent.com/u/57258530?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ab5424", "html_url": "https://github.com/ab5424", "followers_url": "https://api.github.com/users/ab5424/followers", "following_url": "https://api.github.com/users/ab5424/following{/other_user}", "gists_url": "https://api.github.com/users/ab5424/gists{/gist_id}", "starred_url": "https://api.github.com/users/ab5424/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ab5424/subscriptions", "organizations_url": "https://api.github.com/users/ab5424/orgs", "repos_url": "https://api.github.com/users/ab5424/repos", "events_url": "https://api.github.com/users/ab5424/events{/privacy}", "received_events_url": "https://api.github.com/users/ab5424/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 this @ab5424, appreciate you expanding the type hint too!", "Still issues with these ghost tests", "I minor head up though, the `ExpCellFilter` -> `FrechetCellFilter` change is more than an API migration, but involved behaviour change (sounds more like a bug fix), see [the implementation note](https://wiki.fysik.dtu.dk/ase/_modules/ase/filters.html) of `FrechetCellFilter`:\r\n> The initial implementation of ExpCellFilter gave inconsistent gradients\r\n for cell variables (matrix log of the deformation tensor). If you would\r\n like to keep the previous behavior, please use ExpCellFilter.\r\n\r\nI don't have enough knowledge in this regard to make meaningful comment though, just a gentle warning.\r\n", "@DanielYang59 Yes, results might be different but better. Thus, it is an important change." ]
2024-10-12T11:08:48
2024-10-22T21:47:17
2024-10-22T03:05:20Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - Replace deprecated `ase` `ExpCellFilter` with `FrechetCellFilter` for structure relaxation. - `pre-commit` complained about outdated configuration so I updated it. ## 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/4105/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4105/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4105", "html_url": "https://github.com/materialsproject/pymatgen/pull/4105", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4105.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4105.patch", "merged_at": "2024-10-22T03:05:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4106
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4106/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4106/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4106/events
https://github.com/materialsproject/pymatgen/issues/4106
2,582,961,124
I_kwDOACgets6Z9Nvk
4,106
Replace POTCAR in MPRelaxSet
{ "login": "TDKOLI", "id": 106288229, "node_id": "U_kgDOBlXUZQ", "avatar_url": "https://avatars.githubusercontent.com/u/106288229?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TDKOLI", "html_url": "https://github.com/TDKOLI", "followers_url": "https://api.github.com/users/TDKOLI/followers", "following_url": "https://api.github.com/users/TDKOLI/following{/other_user}", "gists_url": "https://api.github.com/users/TDKOLI/gists{/gist_id}", "starred_url": "https://api.github.com/users/TDKOLI/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TDKOLI/subscriptions", "organizations_url": "https://api.github.com/users/TDKOLI/orgs", "repos_url": "https://api.github.com/users/TDKOLI/repos", "events_url": "https://api.github.com/users/TDKOLI/events{/privacy}", "received_events_url": "https://api.github.com/users/TDKOLI/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
[ "Yes this impacts compatibility with the Materials Project entries. You can use the `MPScanRelaxSet` which uses the PBE_54 pseudopotentials and will be compatible with the newer materials project r2SCAN data", "Ok, thank you. I see. " ]
2024-10-12T12:46:24
2024-10-14T17:05:57
2024-10-14T17:05:57Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Feature Requested When users run MPGGARelax or any other workflow requiring MPRelaxSet, and the structures contain elements like tungsten (W), they encounter a "POTCAR not found" error. This issue arises because the newer PBE 54 pseudopotential set no longer includes W_pv, which is still expected by MPRelaxSet. However, I am unsure if replacing W_pv with the newer W potential affects the compatibility of the results with those generated by the Materials Project. ### Proposed Solution Update MPRelaxSet ### Relevant Information _No response_
{ "login": "TDKOLI", "id": 106288229, "node_id": "U_kgDOBlXUZQ", "avatar_url": "https://avatars.githubusercontent.com/u/106288229?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TDKOLI", "html_url": "https://github.com/TDKOLI", "followers_url": "https://api.github.com/users/TDKOLI/followers", "following_url": "https://api.github.com/users/TDKOLI/following{/other_user}", "gists_url": "https://api.github.com/users/TDKOLI/gists{/gist_id}", "starred_url": "https://api.github.com/users/TDKOLI/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TDKOLI/subscriptions", "organizations_url": "https://api.github.com/users/TDKOLI/orgs", "repos_url": "https://api.github.com/users/TDKOLI/repos", "events_url": "https://api.github.com/users/TDKOLI/events{/privacy}", "received_events_url": "https://api.github.com/users/TDKOLI/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4106/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/4106/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4107
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4107/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4107/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4107/events
https://github.com/materialsproject/pymatgen/pull/4107
2,583,693,702
PR_kwDOACgets5-cJKk
4,107
Properly test `ase` not installed error, use single `skip` mark for module level test skip
{ "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-10-13T06:19:25
2024-10-22T02:06:54
2024-10-21T20:56:22Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Properly test `ase` not installed error, the original test would not actually run because `ase` is installed in CI (ideally the test should be independent of whether that package is installed or not) - Also fix not installed test for `seekpath` in `io.pwmat.inputs` - Use module level skip when package not available
{ "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/4107/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/4107/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4107", "html_url": "https://github.com/materialsproject/pymatgen/pull/4107", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4107.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4107.patch", "merged_at": "2024-10-21T20:56:22Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4108
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4108/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4108/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4108/events
https://github.com/materialsproject/pymatgen/issues/4108
2,585,455,312
I_kwDOACgets6aGurQ
4,108
pmg plot --dos ... errs in matplotlib call
{ "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 reporting this, this should be related to the change in return type from figure to axes in #3237. I would fix this." ]
2024-10-14T09:47:55
2024-10-21T20:52:56
2024-10-21T20:52:56Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.12.7 ### Pymatgen version 2024.10.3 ### Operating system version _No response_ ### Current behavior ```bash pmg plot -d vasprun.xml --out_file dos.png ``` yields ```bash Traceback (most recent call last): File "/home/yantar92/Downloads/Nio.DOS/.venv/bin/pmg", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/yantar92/Downloads/Nio.DOS/.venv/lib/python3.12/site-packages/pymatgen/cli/pmg.py", line 448, in main return args.func(args) ^^^^^^^^^^^^^^^ File "/home/yantar92/Downloads/Nio.DOS/.venv/lib/python3.12/site-packages/pymatgen/cli/pmg_plot.py", line 107, in plot plt.savefig(args.out_file) ^^^^^^^^^^^ AttributeError: 'Axes' object has no attribute 'savefig' ``` ### Expected Behavior The DOS plot is generated. ### Minimal example ```Python pip install matplotlib cd /path/to/vasp/results pmg plot -d vasprun.xml --out_file dos.png ``` I suspect that my Matplotlib Version: 3.9.2 might have changes in the API. ### 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/4108/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/4108/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4109
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4109/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4109/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4109/events
https://github.com/materialsproject/pymatgen/pull/4109
2,585,503,098
PR_kwDOACgets5-hFbb
4,109
Fix `savefig` in `pmg.cli.plot`
{ "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-10-14T10:06:01
2024-10-22T02:09:25
2024-10-21T20:52:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix `savefig` in pmg.cli.plot, to close #4108 - [x] Add unit test - [x] Confirm `matplotlib` versions (oldest supported matplotlib 3.8 works) - Split tests for `cli` module - Fix `test_pkg` to use the `src` layout path
{ "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/4109/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/4109/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4109", "html_url": "https://github.com/materialsproject/pymatgen/pull/4109", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4109.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4109.patch", "merged_at": "2024-10-21T20:52:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4110
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4110/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4110/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4110/events
https://github.com/materialsproject/pymatgen/pull/4110
2,585,724,960
PR_kwDOACgets5-h1Am
4,110
Remove all `no_type_check` mark, fix new `mypy` error in `1.12.0`
{ "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-10-14T11:24:33
2024-11-02T03:02:58
2024-10-21T20:57:41Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Remove all `no_type_check` mark, follow up #4109 - Fix new `mypy` errors in CI after [the `1.12.0` release](https://github.com/python/mypy/releases/tag/v1.12.0)
{ "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/4110/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/4110/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4110", "html_url": "https://github.com/materialsproject/pymatgen/pull/4110", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4110.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4110.patch", "merged_at": "2024-10-21T20:57:41Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4111
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4111/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4111/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4111/events
https://github.com/materialsproject/pymatgen/pull/4111
2,588,468,088
PR_kwDOACgets5-qSov
4,111
Add support for `use_structure_charge` keyword in FHI-aims input generator
{ "login": "ansobolev", "id": 2968993, "node_id": "MDQ6VXNlcjI5Njg5OTM=", "avatar_url": "https://avatars.githubusercontent.com/u/2968993?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ansobolev", "html_url": "https://github.com/ansobolev", "followers_url": "https://api.github.com/users/ansobolev/followers", "following_url": "https://api.github.com/users/ansobolev/following{/other_user}", "gists_url": "https://api.github.com/users/ansobolev/gists{/gist_id}", "starred_url": "https://api.github.com/users/ansobolev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ansobolev/subscriptions", "organizations_url": "https://api.github.com/users/ansobolev/orgs", "repos_url": "https://api.github.com/users/ansobolev/repos", "events_url": "https://api.github.com/users/ansobolev/events{/privacy}", "received_events_url": "https://api.github.com/users/ansobolev/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
[ "Looks good to me!", "Thanks." ]
2024-10-15T11:25:30
2024-10-22T09:40:52
2024-10-21T20:55:12Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary This PR adds support of `use_structure_charge` keyword to a base FHI-aims input generator to make it more consistent with VASP and `atomate2` common defect workflows. Major changes: - support of `use_structure_charge` keyword to a base FHI-aims input generator ## 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/4111/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/4111/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4111", "html_url": "https://github.com/materialsproject/pymatgen/pull/4111", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4111.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4111.patch", "merged_at": "2024-10-21T20:55:12Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4112
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4112/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4112/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4112/events
https://github.com/materialsproject/pymatgen/issues/4112
2,589,594,357
I_kwDOACgets6aWhL1
4,112
Vampire_interface (pymatgen/analysis/magnetism/heisenberg.py:323:)
{ "login": "ghlam14", "id": 103369846, "node_id": "U_kgDOBilMdg", "avatar_url": "https://avatars.githubusercontent.com/u/103369846?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghlam14", "html_url": "https://github.com/ghlam14", "followers_url": "https://api.github.com/users/ghlam14/followers", "following_url": "https://api.github.com/users/ghlam14/following{/other_user}", "gists_url": "https://api.github.com/users/ghlam14/gists{/gist_id}", "starred_url": "https://api.github.com/users/ghlam14/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghlam14/subscriptions", "organizations_url": "https://api.github.com/users/ghlam14/orgs", "repos_url": "https://api.github.com/users/ghlam14/repos", "events_url": "https://api.github.com/users/ghlam14/events{/privacy}", "received_events_url": "https://api.github.com/users/ghlam14/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-10-15T18:47:27
2024-11-12T18:02:07
2024-11-12T18:02:07Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version python 3.10 ### Pymatgen version 2024.10.3 ### Operating system version ubuntu 20.04lts ### Current behavior pymatgen/analysis/magnetism/heisenberg.py:323: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. temp_df = pd.concat([ex_mat, ex_row], ignore_index=True) /home/ssd/.local/lib/python3.10/site-packages/pymatgen/analysis/magnetism/heisenberg.py:328: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. ex_mat = pd.concat([ex_mat, ex_row], ignore_index=True) ### Expected Behavior pymatgen/analysis/magnetism/heisenberg.py:323: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. temp_df = pd.concat([ex_mat, ex_row], ignore_index=True) /home/ssd/.local/lib/python3.10/site-packages/pymatgen/analysis/magnetism/heisenberg.py:328: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. ex_mat = pd.concat([ex_mat, ex_row], ignore_index=True) ### 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/4112/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/4112/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4113
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4113/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4113/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4113/events
https://github.com/materialsproject/pymatgen/pull/4113
2,591,802,407
PR_kwDOACgets5-04qu
4,113
Fix arg passing in `inverse` property of `SymmOp`
{ "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-10-16T12:52:36
2024-10-22T02:07:04
2024-10-21T20:54:56Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix arg passing in `inverse` property of `SymmOp`, to fix #4023 - Replace some `np.array` with `np.asarray` for efficiency where we don't rely on creating a copy
{ "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/4113/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/4113/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4113", "html_url": "https://github.com/materialsproject/pymatgen/pull/4113", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4113.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4113.patch", "merged_at": "2024-10-21T20:54:56Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4114
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4114/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4114/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4114/events
https://github.com/materialsproject/pymatgen/issues/4114
2,593,386,431
I_kwDOACgets6ak--_
4,114
`io.pwscf.PWInput.from_file()` incorrectly reads decimal numbers and the `K_POINTS` card in `automatic` mode
{ "login": "jsukpark", "id": 12984115, "node_id": "MDQ6VXNlcjEyOTg0MTE1", "avatar_url": "https://avatars.githubusercontent.com/u/12984115?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jsukpark", "html_url": "https://github.com/jsukpark", "followers_url": "https://api.github.com/users/jsukpark/followers", "following_url": "https://api.github.com/users/jsukpark/following{/other_user}", "gists_url": "https://api.github.com/users/jsukpark/gists{/gist_id}", "starred_url": "https://api.github.com/users/jsukpark/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jsukpark/subscriptions", "organizations_url": "https://api.github.com/users/jsukpark/orgs", "repos_url": "https://api.github.com/users/jsukpark/repos", "events_url": "https://api.github.com/users/jsukpark/events{/privacy}", "received_events_url": "https://api.github.com/users/jsukpark/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
[ "Seems there is one more bug in parsing `K_POINTS` card, adding that to this issue" ]
2024-10-17T01:38:04
2024-10-21T20:54:32
2024-10-21T20:54:32Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version 2024.10.3 ### Operating system version Ubuntu 22.04.5 LTS ### Current behavior The `io.pwscf.PWInput.from_file()` method fails to correctly parse: - decimal numbers written in scientific notation with exponent part prefixed with `e` or `E` (note that as of QE v7.3, `pw.x` can still parse such cases correctly; i.e., exponent prefix need not be `d`), and - the `K_POINTS` card with mode set to `automatic`. **Example input file `scf.in`:** ``` &CONTROL calculation = 'scf', / &SYSTEM ecutwfc = 100, ibrav = 0, nat = 2, ntyp = 1, / &ELECTRONS conv_thr = 2e-12, ! same behavior with 2E-12 / ATOMIC_SPECIES C 12.0107 C.upf ATOMIC_POSITIONS crystal C 0.2500000000 0.2500000000 0.2500000000 C -0.0000000000 -0.0000000000 0.0000000000 K_POINTS automatic 4 4 4 1 1 1 CELL_PARAMETERS angstrom -1.786119886 0.000000000 1.786119886 -0.000000000 1.786119886 1.786119886 -1.786119886 1.786119886 0.000000000 ``` **Current behavior:** ``` >>> from pymatgen.io.pwscf import PWInput >>> pwi = PWInput.from_file("scf.in") >>> print(pwi.sections["electrons"]["conv_thr"]) 2.0 >>> print(pwi.kpoints_grid, pwi.kpoints_shift) (1, 1, 1) (0, 0, 0) ``` ### Expected Behavior I expect both the `conv_thr` value and the `K_POINTS` card in the above example input file to be parsed correctly. ``` >>> from pymatgen.io.pwscf import PWInput >>> pwi = PWInput.from_file("scf.in") >>> print(pwi.sections["electrons"]["conv_thr"]) 2e-12 >>> print(pwi.kpoints_grid, pwi.kpoints_shift) (4, 4, 4) (1, 1, 1) ``` ### Minimal example ```Python contents = """&CONTROL calculation = 'scf', / &SYSTEM ecutwfc = 100, ibrav = 0, nat = 2, ntyp = 1, / &ELECTRONS conv_thr = 2e-12, ! same behavior with 2E-12 / ATOMIC_SPECIES C 12.0107 C.upf ATOMIC_POSITIONS crystal C 0.2500000000 0.2500000000 0.2500000000 C -0.0000000000 -0.0000000000 0.0000000000 K_POINTS automatic 4 4 4 1 1 1 CELL_PARAMETERS angstrom -1.786119886 0.000000000 1.786119886 -0.000000000 1.786119886 1.786119886 -1.786119886 1.786119886 0.000000000 """ with open("scf.in", "w") as fp: fp.write(contents) from pymatgen.io.pwscf import PWInput pwi = PWInput.from_file("scf.in") print(pwi.sections["electrons"]["conv_thr"]) # Prints "2.0", should print "2e-12" print(pwi.kpoints_grid, pwi.kpoints_shift) # Prints "(1, 1, 1) (0, 0, 0)", should print "(4, 4, 4) (1, 1, 1)" ``` ### 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/4114/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/4114/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4115
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4115/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4115/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4115/events
https://github.com/materialsproject/pymatgen/pull/4115
2,593,393,947
PR_kwDOACgets5-53uc
4,115
Bugfix: Parsing bugs in `io.pwscf.PWInput`
{ "login": "jsukpark", "id": 12984115, "node_id": "MDQ6VXNlcjEyOTg0MTE1", "avatar_url": "https://avatars.githubusercontent.com/u/12984115?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jsukpark", "html_url": "https://github.com/jsukpark", "followers_url": "https://api.github.com/users/jsukpark/followers", "following_url": "https://api.github.com/users/jsukpark/following{/other_user}", "gists_url": "https://api.github.com/users/jsukpark/gists{/gist_id}", "starred_url": "https://api.github.com/users/jsukpark/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jsukpark/subscriptions", "organizations_url": "https://api.github.com/users/jsukpark/orgs", "repos_url": "https://api.github.com/users/jsukpark/repos", "events_url": "https://api.github.com/users/jsukpark/events{/privacy}", "received_events_url": "https://api.github.com/users/jsukpark/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." ]
2024-10-17T01:46:36
2024-10-21T20:54:35
2024-10-21T20:54:31Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary A quick regexp fixes + strengthened test cases to close #4114
{ "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/4115/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/4115/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4115", "html_url": "https://github.com/materialsproject/pymatgen/pull/4115", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4115.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4115.patch", "merged_at": "2024-10-21T20:54:31Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4116
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4116/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4116/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4116/events
https://github.com/materialsproject/pymatgen/pull/4116
2,593,490,202
PR_kwDOACgets5-6LhP
4,116
bump `networkx` to 2.7 to fix intermittent CI failure when `torch` install failed: `ImportError: cannot import name 'Mapping' from 'collections'`
{ "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
[ "Happened again in https://github.com/materialsproject/pymatgen/actions/runs/11383942907/job/31670629571", "Looks like networkx 2.7 [causes test failure in MacOS CI](https://github.com/materialsproject/pymatgen/actions/runs/11432515352/job/31803122891) (if `torch` install failed of course), might need to bump it even further, sorry for the overlook (I tested on Ubuntu and thought MacOS would behave more or less the same):\r\n```\r\n> P = np.array(basis_change, dtype=float).T[0]\r\nE TypeError: MatrixBase.__array__() takes 1 positional argument but 2 were given\r\n```\r\n\r\n", "Okay I was wrong here, it has nothing to do with `networkx 2.7`, it's `sympy 1.2` that causing this failure, and looks like we need to bump `sympy` to `>=1.3` to avoid this, I would do this in #4128.\r\n\r\n```\r\n>>> python3 --version\r\nPython 3.11.10\r\n\r\n>>> pip freeze | grep networkx\r\nnetworkx==2.7\r\n\r\n>>> pip install sympy==1.2\r\n>>> pytest tests/symmetry/test_maggroups.py\r\n\r\nFFFFFFF [100%]\r\n=============================================================================== FAILURES ================================================================================\r\n... (all failed)\r\n7 failed in 0.81s\r\n\r\n\r\n>>> pip install sympy==1.3\r\n\r\n....... [100%]\r\n\r\n(14 durations < 0.005s hidden. Use -vv to show these durations.)\r\n7 passed in 1.30s\r\n```\r\n\r\n" ]
2024-10-17T03:08:29
2024-10-22T05:46:56
2024-10-21T20:52:35Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Bump `networkx` to resolve [the following intermittent CI failure](https://github.com/materialsproject/pymatgen/actions/runs/11377302114/job/31651207689): ``` ../../../micromamba/envs/pmg/lib/python3.11/site-packages/networkx/__init__.py:100: in <module> import networkx.classes.filters ../../../micromamba/envs/pmg/lib/python3.11/site-packages/networkx/classes/__init__.py:1: in <module> from .graph import Graph ../../../micromamba/envs/pmg/lib/python3.11/site-packages/networkx/classes/graph.py:23: in <module> from collections import Mapping E ImportError: cannot import name 'Mapping' from 'collections' (/Users/runner/micromamba/envs/pmg/lib/python3.11/collections/__init__.py) ``` networkx `3.4.1` is usually installed in CI: > Collecting networkx (from torch==2.2.1) Downloading networkx-3.4.1-py3-none-any.whl.metadata (6.3 kB) But it might [fall back to very old versions (`networkx 2.2`) if torch install is unsuccessful](https://github.com/materialsproject/pymatgen/actions/runs/11377302114/job/31651207689), leading to above import failure, as after Python 3.10 the `Mapping `class has been moved to the [collections.abc](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping) module. : > Downloading torch-2.2.1-cp311-none-macosx_11_0_arm64.whl (59.7 MB) ━━━━━━━━━━━━╸ 18.9/59.7 MB 113.1 MB/s eta 0:00:01 > + networkx==2.2 --- For **networkx 2.3**, I got the following (with Python 3.12.7): ``` venv312/lib/python3.12/site-packages/networkx/algorithms/dag.py:23: in <module> from fractions import gcd E ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.12/fractions.py) ``` **2.4-2.5 (2.6 yanked):** ``` venv312/lib/python3.12/site-packages/networkx/readwrite/graphml.py:345: in GraphML (np.float16, "float"), (np.float_, "float"), venv312/lib/python3.12/site-packages/numpy/__init__.py:397: in __getattr__ raise AttributeError( E AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'? ``` 2.7 seems to be the oldest working version at this moment.
{ "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/4116/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/4116/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4116", "html_url": "https://github.com/materialsproject/pymatgen/pull/4116", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4116.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4116.patch", "merged_at": "2024-10-21T20:52:35Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4117
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4117/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4117/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4117/events
https://github.com/materialsproject/pymatgen/pull/4117
2,594,383,971
PR_kwDOACgets5-861J
4,117
Migrate `ext.COD` from `mysql` to REST 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.", "No problem, thanks for reviewing and for original bringing up the idea to migrate to REST API" ]
2024-10-17T11:03:58
2024-10-22T02:08:11
2024-10-21T20:54:02Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Migrate `ext.COD` from `mysql` to REST API, to close #4016 - [**Deprecation**] Deprecate `timeout` arg from `get_structure_by_id` method and use a single class level `timeout` - [x] suppress timeout error in CI
{ "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/4117/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/4117/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4117", "html_url": "https://github.com/materialsproject/pymatgen/pull/4117", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4117.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4117.patch", "merged_at": "2024-10-21T20:54:02Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4118
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4118/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4118/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4118/events
https://github.com/materialsproject/pymatgen/pull/4118
2,594,611,793
PR_kwDOACgets5-9ppQ
4,118
Support Pymatgen Species object in aims
{ "login": "ansobolev", "id": 2968993, "node_id": "MDQ6VXNlcjI5Njg5OTM=", "avatar_url": "https://avatars.githubusercontent.com/u/2968993?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ansobolev", "html_url": "https://github.com/ansobolev", "followers_url": "https://api.github.com/users/ansobolev/followers", "following_url": "https://api.github.com/users/ansobolev/following{/other_user}", "gists_url": "https://api.github.com/users/ansobolev/gists{/gist_id}", "starred_url": "https://api.github.com/users/ansobolev/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ansobolev/subscriptions", "organizations_url": "https://api.github.com/users/ansobolev/orgs", "repos_url": "https://api.github.com/users/ansobolev/repos", "events_url": "https://api.github.com/users/ansobolev/events{/privacy}", "received_events_url": "https://api.github.com/users/ansobolev/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-10-17T12:36:36
2024-10-22T09:41:25
2024-10-22T02:39:35Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary As of now, the basis set for the site in FHI-aims input files got chosen according to the site element. This PR enables the support of Species object when present in the structure, which should make setting up heterogeneous calculations with FHI-aims and Pymatgen easier. Major changes: - Support for `species_string` in `SpeciesDefaults` class added - Simplified creating string representation for `geometry.in` file, adding support for `species_string` there as well
{ "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/4118/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/4118/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4118", "html_url": "https://github.com/materialsproject/pymatgen/pull/4118", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4118.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4118.patch", "merged_at": "2024-10-22T02:39:35Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4119
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4119/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4119/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4119/events
https://github.com/materialsproject/pymatgen/issues/4119
2,594,639,289
I_kwDOACgets6apw25
4,119
VaspInput setter and Incar.check_params() are inconsistent
{ "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 reporting this, I believe the warning on `GGA=PS` is owing to: https://github.com/materialsproject/pymatgen/blob/4f7aa35f15cb17a89209b955903c64b39e2fa922/src/pymatgen/io/vasp/inputs.py#L988\r\n\r\nI.e. any keyword not included inside the following and is not `boolean/float/int` (`str`) would be capitalized: https://github.com/materialsproject/pymatgen/blob/4f7aa35f15cb17a89209b955903c64b39e2fa922/src/pymatgen/io/vasp/inputs.py#L876-L932\r\n\r\n---\r\n\r\nThe warning on `ENCUT=550` should be owing to the incorrect classification of it into `int_keys` instead of `float_keys`: https://github.com/materialsproject/pymatgen/blob/4f7aa35f15cb17a89209b955903c64b39e2fa922/src/pymatgen/io/vasp/inputs.py#L910-L924\r\n\r\nI believe [it should be a float](https://www.vasp.at/wiki/index.php/ENCUT):\r\n> ENCUT = [real] \r\n\r\n", "With Version: 2024.10.22, I am still getting\r\n\r\n```\r\n/net/home/plgrid/plgyantar92/groupdir/functional-input.py:70: BadIncarWarning: Cannot find ZAB_VDW in the list of INCAR tags\r\n vasp_input.incar.check_params()\r\n/net/home/plgrid/plgyantar92/groupdir/functional-input.py:70: BadIncarWarning: GGA: Cannot find Ml in the list of values\r\n vasp_input.incar.check_params()\r\n```", "Hi thanks for following up. I just have a look and I believe it's a separate issue related to #4042, i.e. we need to update the `incar_parameters.json` record.\r\n\r\n`ZAB_VDW` is currently not in the recorded INCAR tags, and `GGA` doesn't have `ML` in the recording yet: https://github.com/materialsproject/pymatgen/blob/3ee17e2c346dea6e9248eb04c989e58880914650/src/pymatgen/io/vasp/incar_parameters.json#L191-L218\r\n\r\nBut currently I don't have a better way other than doing that manually (which would be very inefficiently) given the amount of possible INCAR tags and their values. Updating the tags should be easier with: https://github.com/materialsproject/pymatgen/blob/3ee17e2c346dea6e9248eb04c989e58880914650/src/pymatgen/io/vasp/help.py#L68-L83\r\n\r\nBut updating the values is a bit tricky so I assume we need to helper script to do this? Would you be interested? If not I'm happy to get my hands on this a bit later :)\r\n", "> But updating the values is a bit tricky so I assume we need to helper script to do this? Would you be interested? If not I'm happy to get my hands on this a bit later :)\r\n\r\n```python\r\n @classmethod\r\n def get_incar_tags(cls) -> list[str]:\r\n \"\"\"Get a list of all INCAR tags from the VASP wiki.\"\"\"\r\n url = (\"https://www.vasp.at/wiki/api.php?\"\r\n \"action=query&list=categorymembers\"\r\n \"&cmtitle=Category:INCAR_tag\"\r\n \"&cmlimit=500&format=json\")\r\n response = requests.get(url, timeout=60)\r\n response_dict = json.loads(response.text)\r\n\r\n def extract_titles(data):\r\n \"\"\"Extract keywords from from Wikimedia response data.\r\n See https://www.vasp.at/wiki/api.php?action=help&modules=query\r\n Returns: List of keywords as strings.\r\n \"\"\"\r\n return [category_data['title'] for category_data\r\n in data['query']['categorymembers']]\r\n\r\n tags = extract_titles(response_dict)\r\n while 'continue' in response_dict:\r\n response = requests.get(\r\n url + f\"&cmcontinue={response_dict['continue']['cmcontinue']}\",\r\n timeout=60\r\n )\r\n response_dict = json.loads(response.text)\r\n tags = tags + extract_titles(response_dict)\r\n\r\n return tags\r\n```\r\nI can make it into pull request if you wish.", "> I can make it into pull request if you wish.\r\n\r\nThat would be hugely appreciated! You might have misread my previous comment https://github.com/materialsproject/pymatgen/issues/4119#issuecomment-2432250673\r\n\r\nCurrent we already have a method to get the (tags/keywords/parameters): https://github.com/materialsproject/pymatgen/blob/0e65d35ae0b1df964639a48067b1a525979eec84/src/pymatgen/io/vasp/help.py#L68-L70\r\n\r\n---\r\n\r\nWhat we need is something to update the values, which is a bit tricky. Currently VASP wiki doesn't seem to provide an API to get possible values of a tag directly (do they?), and the webpage format seems pretty inconsistent and probably make scraping infeasible (I'm not a web scraping expert and I wish I'm wrong here).\r\n\r\nFor example the [ALGO tag page](https://www.vasp.at/wiki/index.php/ALGO) seems to list all possible values at the start:\r\n<img width=\"1318\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a65bbb83-237d-4589-9728-822dd3d3af3e\">\r\n\r\nHowever the [GGA tag](https://www.vasp.at/wiki/index.php/GGA) only listed a small portion and left the rest inside a table: \r\n<img width=\"775\" alt=\"image\" src=\"https://github.com/user-attachments/assets/883a0336-2ded-4d5e-ae3c-5d5e26dcb1ed\">\r\n", "> What we need is something to update the values, which is a bit tricky. Currently VASP wiki doesn't seem to provide an API to get possible values of a tag directly (do they?),\r\n\r\nI do not see anything either.\r\n\r\n> the webpage format seems pretty inconsistent and probably make scraping infeasible (I'm not a web scraping expert and I wish I'm wrong here).\r\n\r\nScaping is possible, but awkward. One will need to write the scaper specifically for this page and add a number of asserts to catch incompatible changes (those are unlikely in practice though).\r\n\r\nI looked into the source of the page at https://www.vasp.at/wiki/index.php?title=GGA&action=edit\r\nand it looks like they define the tag list simply within a table, not using a template (template would make scaping much easier).\r\n\r\nIt should be still possible to write a dedicated scraper, via pymediawiki + wikitexparser, but non-standard pages like the one for GGA will need to have a specially tailored handler.\r\n\r\nI think that the most productive course of action here would be asking VASP maintainers to list all the possible keys in their TAGDEF template (the template defining GGA = PE | ... line) for this page and maybe for other pages with the same problem.", "> I think that the most productive course of action here would be asking VASP maintainers to list all the possible keys in their TAGDEF template\r\n\r\nIt sounds like the best option to me, not sure what is the best approach to reach out though, perhaps through [the VASP forum](https://www.vasp.at/forum/)?\r\n", "Yup, the forum. I see no better options on https://www.vasp.at/wiki/index.php/The_VASP_Manual#Support", "Following up on this since I just encountered exact same issue, but for different keyword: `IMAGES`. It is not listed in `proc_val` and cast as str (AFAIU), but `IMAGES` should be int, according to incar_parameters.json (and VASP wiki).\r\n\r\nI am wondering if incar_parameters.json can be used to populate `proc_val` key/type associations.", "> I am wondering if incar_parameters.json can be used to populate proc_val key/type associations.\r\n\r\nThis absolutely makes sense, currently we have type recording in both `proc_val` method and `incar_parameters.json`, but both are not really updated/validated. But I guess currently the biggest issue is that we don't have a programmatic way to retrieve such entries from VASP wiki.\r\n\r\n> I think that the most productive course of action here would be asking VASP maintainers to list all the possible keys in their TAGDEF template (the template defining GGA = PE | ... line) for this page and maybe for other pages with the same problem.\r\n\r\nDid you have time to reach out to them and request such feactures maybe? I might have a closer look later and see if I could find some interface to do the job :) I lean less towards scraping unless we don't have a better option maybe\r\n", "> Did you have time to reach out to them and request such feactures maybe?\r\n\r\nIt is on my todo list, but not a high priority. I will follow up if I post something on the forum." ]
2024-10-17T12:46:59
2024-12-19T08:13:47
2024-10-21T19:05:19Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version 2024.7.18 ### Operating system version _No response_ ### Current behavior When I set INCAR parametrs via `vasp_input['INCAR']['PARAM']=value`, they do not always pass `Incar.check_params()` checks. Using the example below, I am getting: ``` ...: BadIncarWarning: ENCUT: 550 is not a float vasp_input.incar.check_params() ...: BadIncarWarning: GGA: Cannot find Ps in the list of values vasp_input.incar.check_params() ``` ### Expected Behavior Setting the parameters passes the checks. ### Minimal example ```Python from pymatgen.io.vasp.inputs import VaspInput vasp_input = VaspInput.from_directory('.') vasp_input['INCAR']['GGA'] = "MK" vasp_input['INCAR']['GGA'] ``` ### Relevant files to reproduce this bug I used the following INCAR ``` ALGO = Normal ENCUT = 550 ISMEAR = 0 NCORE = 16 SIGMA = 0.04 SYSTEM = C.hexagonal.191 ``` Other requried inputs may be anything.
{ "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/4119/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/4119/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4120
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4120/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4120/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4120/events
https://github.com/materialsproject/pymatgen/issues/4120
2,595,606,238
I_kwDOACgets6atc7e
4,120
`AseAtomsAdaptor` conversions fail to preserve 1D or 2D PBC
{ "login": "jsukpark", "id": 12984115, "node_id": "MDQ6VXNlcjEyOTg0MTE1", "avatar_url": "https://avatars.githubusercontent.com/u/12984115?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jsukpark", "html_url": "https://github.com/jsukpark", "followers_url": "https://api.github.com/users/jsukpark/followers", "following_url": "https://api.github.com/users/jsukpark/following{/other_user}", "gists_url": "https://api.github.com/users/jsukpark/gists{/gist_id}", "starred_url": "https://api.github.com/users/jsukpark/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jsukpark/subscriptions", "organizations_url": "https://api.github.com/users/jsukpark/orgs", "repos_url": "https://api.github.com/users/jsukpark/repos", "events_url": "https://api.github.com/users/jsukpark/events{/privacy}", "received_events_url": "https://api.github.com/users/jsukpark/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-10-17T19:50:52
2024-10-17T20:09:06
2024-10-17T20:09:06Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version 2024.10.3 ### Operating system version Ubuntu 22.04.5 LTS ### Current behavior The `get_atoms()` and `get_structure()` methods defined in `pymatgen.io.ase.AseAtomsAdaptor` class both set PBC of output objects to `True` (i.e., periodic in all 3 directions) when given a periodic structure/atoms input, thereby failing to preserve 1D PBC (e.g., `pbc = (True, False, False)`) or 2D PBC (e.g., `pbc = (True, True, False)`). ### Expected Behavior Given a structure containing a lattice/cell defined with an arbitrary PBC, I expect both `pymatgen.io.ase.AseAtomsAdaptor.get_atoms()` and `pymatgen.io.ase.AseAtomsAdaptor.get_structure()` methods to preserve the input argument PBC values in their respective outputs. ### Minimal example ```Python import numpy as np from pymatgen.core import Structure, Lattice from ase import Atoms from pymatgen.io.ase import AseAtomsAdaptor # Create Structure and Atoms instances with identical info structure_src = Structure( lattice=Lattice(np.eye(3), pbc=(True, True, False)), species=['C', 'C'], coords=np.array([[0.0, 0.0, 0.0], [.25, .25, .25]]), ) atoms_src = Atoms( symbols=['C', 'C'], positions=np.array([[0.0, 0.0, 0.0], [.25, .25, .25]]), cell=np.eye(3), pbc=(True, True, False), ) # Convert structure_dst = AseAtomsAdaptor.get_structure(atoms_src) atoms_dst = AseAtomsAdaptor.get_atoms(structure_src) print("Structure PBC expected:", structure_src.lattice.pbc) # (True, True, False) print("Structure PBC observed:", structure_dst.lattice.pbc) # (True, True, True) print("Atoms PBC expected:", atoms_src.get_pbc()) # [ True True False] print("Atoms PBC observed:", atoms_dst.get_pbc()) # [ True True True] ``` ### 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/4120/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/4120/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4121
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4121/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4121/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4121/events
https://github.com/materialsproject/pymatgen/pull/4121
2,595,611,095
PR_kwDOACgets5_AyvM
4,121
Bugfix: Preserve PBC info in `AseAtomsAdaptor`
{ "login": "jsukpark", "id": 12984115, "node_id": "MDQ6VXNlcjEyOTg0MTE1", "avatar_url": "https://avatars.githubusercontent.com/u/12984115?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jsukpark", "html_url": "https://github.com/jsukpark", "followers_url": "https://api.github.com/users/jsukpark/followers", "following_url": "https://api.github.com/users/jsukpark/following{/other_user}", "gists_url": "https://api.github.com/users/jsukpark/gists{/gist_id}", "starred_url": "https://api.github.com/users/jsukpark/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jsukpark/subscriptions", "organizations_url": "https://api.github.com/users/jsukpark/orgs", "repos_url": "https://api.github.com/users/jsukpark/repos", "events_url": "https://api.github.com/users/jsukpark/events{/privacy}", "received_events_url": "https://api.github.com/users/jsukpark/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." ]
2024-10-17T19:53:32
2024-10-17T20:09:06
2024-10-17T20:09:05Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary The `get_atoms()` and `get_structure()` methods of the `pymatgen.io.ase.AseAtomsAdaptor` class now preserve PBC value of their input. Intended to close #4120
{ "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/4121/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/4121/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4121", "html_url": "https://github.com/materialsproject/pymatgen/pull/4121", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4121.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4121.patch", "merged_at": "2024-10-17T20:09:05Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4122
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4122/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4122/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4122/events
https://github.com/materialsproject/pymatgen/pull/4122
2,596,307,690
PR_kwDOACgets5_C8Eb
4,122
Make `Incar` keys case insensitive, fix init `Incar` from dict val processing for str/float/int
{ "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
[ "ping the true expert @esoteric-ephemera in case you have any comments (perhaps deserve a separate PR):\r\n\r\n- ~~Do we want to cast INCAR keys to upper case (to be consistent with VASP behaviour, but potentially breaking)~~\r\n- ~~Do we want to automatically filter duplicated INCAR keys (with a warning of course), again to be consistent with VASP behaviour (this should be resolved by casting keys to upper, as we cannot have duplicated keys in dict)~~\r\n- Wondering why do we capitalize values for unknown string keys? https://github.com/materialsproject/pymatgen/blob/32d9bebbebf24043bdf56683333053dcb1980d23/src/pymatgen/io/vasp/inputs.py#L988\r\n\r\nThanks in advance :)", "> Do we want to cast INCAR keys to upper case (to be consistent with VASP behaviour, but potentially breaking)\r\n\r\nWhy do this exactly? FORTRAN (unless you use specific compiler options) is case insensitive, and most FORTRAN code, VASP included, is case insensitive. `aLgO = aLL` should mean the same thing as `ALGO = ALL` to VASP\r\n\r\n> Do we want to automatically filter duplicated INCAR keys (with a warning of course), again to be consistent with VASP behaviour (this should be resolved by casting keys to upper, as we cannot have duplicated keys in dict)\r\n\r\nI would just throw a user warning. Because of how VASP parses an INCAR, I'm pretty sure you can write the same tag multiple times, and the bottom-most value is the one that's accepted\r\n\r\n> Wondering why do we capitalize values for unknown string keys? \r\n\r\nProbably just convention, again because FORTRAN is case insensitive\r\n\r\nAlso for the `check_incar` stuff: keep in mind that FORTRAN is very strictly typed. Even if I write `ENCUT = 500` in the INCAR, fortran will enforce this to be double precision because ENCUT is declared as a double", "I btw recently had issues with updating the incar. I would have expected that sigma and SIGMA would simply modify SIGMA but they did not. Instead, i had two different sigmas in the incar. I did not have time to investigate but it was a very recent pymatgen version", "@JaGeo did VASP parse them as different variables or just take the one defined furthest down the INCAR?", "Yes, all tags are case insensitive. I don't think the Incar class actually checks. So if you set `sigma` and `SIGMA`, you end up with two sigma tags. The easiest solution is to automatically capitalize the key in setitem for Incar. I would use Camelcase for the values for Incar (even though it makes no difference where VASP is concerned). Usually VASP just looks at the first letter. E.g., ALGO = Accurate and ALGO=A means the same thing.", "> Probably just convention, again because FORTRAN is case insensitive\r\n\r\nThanks that makes sense, and I don't think we need to change this as it wouldn't have any side effect.\r\n\r\n> I'm pretty sure you can write the same tag multiple times, and the bottom-most value is the one that's accepted\r\n\r\n> did VASP parse them as different variables or just take the one defined furthest down the INCAR?\r\n\r\nI believe VASP parses the first occurrence (can you confirm it's the bottom one? @esoteric-ephemera ), but I could be wrong here. I tested with INCAR:\r\n```\r\nencut = 500\r\nENCUT = 400\r\n``` \r\n\r\nAnd `grep ENCUT vasprun.xml` would return: `<i name=\"ENCUT\"> 500.00000000</i>`", "@DanielYang59 @esoteric-ephemera Yes, it took the first one as far as I remember. \r\n\r\n@shyuep i might be wrong but I thought i modelled the lobsterin class after the incar at the time and i think it checked at some point. In any case, it would be great if this would be checked again (e.g., via Camelcase). \r\nEDIT: ah, already implemented 😀", "> Why do this exactly?\r\n\r\n> I don't think the Incar class actually checks. So if you set sigma and SIGMA, you end up with two sigma tags. The easiest solution is to automatically capitalize the key in setitem for Incar. \r\n\r\nI proposed that we cast Incar keys to upper case internally in order to prevent such duplicate and make other internal checking/handling easier.\r\n\r\nAlso the reason I personally prefer upper case over others (capitalize/lower) being:\r\n- Most (if not all) our internal recordings (`incar_parameters.json`, and all kinds of recordings inside `vasp.inputs` class) use upper case, so we don't need to update them all\r\n- VASP internally cast all keys to upper case when parsing (see the top comment in VASP source code `drdatab.F`)\r\n- VASP wiki also use upper case, so I assume it's more or less a convention?\r\n", "@JaGeo I just fix the upper case keys problem and added a test. It should no longer be a problem. As far as I can tell, the values are already properly capitalize and there is a test.", "Thanks for the helpful discussion and the quick fix @shyuep \r\n\r\nI would finish the remaining part of this PR", "@shyuep Thanks for the fast fix!", "Just mention this in case you have any comments, it seems [the `ML_MODE` tag](https://www.vasp.at/wiki/index.php/ML_MODE) (which I never used) is an exception of the case insensitivity, added in #3625: https://github.com/materialsproject/pymatgen/blob/ed8542d8ebf18c0fa49e6d87386a52072bc31559/src/pymatgen/io/vasp/inputs.py#L932\r\n\r\nPer the above VASP wiki:\r\n> Warning: If any option other than the above is chosen or there is a spelling error (be careful to write everything in upper case or lower case letters) the code will exit with an error. ", "Thanks.", "No problem, thanks for the helpful discussion everyone", "I think that one special key is SYSTEM - it is usually free text and capitalizing it can be awkward.", "> I think that one special key is SYSTEM - it is usually free text and capitalizing it can be awkward.\r\n\r\nThat's a good point to me. \r\n\r\n\r\nUpdate: I released comparing two INCARs (especially to check if they produce the same result) through directly `==` may not make sense as the VASP default value handling, so it should be preferred to use `diff` for a manually inspection.\r\n\r\n\r\n<del>Meanwhile, I think the `__eq__` for `Incar/Kpoint` (perhaps `diff` as well? I don't have a strong opinion on `diff` though) should be overwritten to ignore the comment/`SYSTEM` for similar reason (docstring should be updated to reflect this behaviour of course). </del>\r\n" ]
2024-10-18T03:28:51
2024-10-26T11:42:11
2024-10-21T19:05:18Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix `Incar.check_params` handling of case sensitivity, to fix #4119, also add unit tests - [x] Issue warning if duplicated keys found when init `Incar` ### Make more operations (get/update/setdefault) in `Incar` case insensitive - [x] Init `Incar` from dict (also the `from_dict` method) doesn't seem to use setter method, might be better off subclass UserDict - [x] Update Incar class docstring to record the change in behaviour - [x] Test other dict methods like update/setdefault/... ### Init `Incar` from dict doesn't call setter method, leading to unprocessed str/float/int value - [x] Setter method only trigger `proc_val` when val is string, leading to inconsistent behaviour when init from dict for int/float - [x] Setter method not triggered on `update` method when subclassing builtin `dict`, leading to val not passing through `proc_val` when init from dict
{ "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/4122/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/4122/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4122", "html_url": "https://github.com/materialsproject/pymatgen/pull/4122", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4122.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4122.patch", "merged_at": "2024-10-21T19:05:18Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4123
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4123/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4123/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4123/events
https://github.com/materialsproject/pymatgen/pull/4123
2,597,908,305
PR_kwDOACgets5_H4gt
4,123
fix: preserve site properties over cell transform
{ "login": "Lattay", "id": 24568527, "node_id": "MDQ6VXNlcjI0NTY4NTI3", "avatar_url": "https://avatars.githubusercontent.com/u/24568527?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Lattay", "html_url": "https://github.com/Lattay", "followers_url": "https://api.github.com/users/Lattay/followers", "following_url": "https://api.github.com/users/Lattay/following{/other_user}", "gists_url": "https://api.github.com/users/Lattay/gists{/gist_id}", "starred_url": "https://api.github.com/users/Lattay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lattay/subscriptions", "organizations_url": "https://api.github.com/users/Lattay/orgs", "repos_url": "https://api.github.com/users/Lattay/repos", "events_url": "https://api.github.com/users/Lattay/events{/privacy}", "received_events_url": "https://api.github.com/users/Lattay/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" ]
2024-10-18T16:05:50
2024-10-21T20:51:12
2024-10-21T20:51:08Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Make sure site properties are properly transferred from the original cell to the primitive or refined one. ## Summary Major changes: - fix 1: in `SpacegroupAnalyzer.get_refined_cell`, the flag `keep_site_properties` (used notably by `get_conventional_standard_structure`) would not behave as expected before because it used `number` returned by `spglib.refine_cell` to index into the `properties` (`properties` has one element per site, but `number` indexes into `_unique_species` which has one element per occupied irreducible position). - fix 2: I noticed the same pattern in `SpacegroupAnalyzer.find_primitive` You can verify that the new tests wouldn't pass before the change to `SpacegroupAnalyzer`. ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [-] (no relevant changes) 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/4123/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/4123/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4123", "html_url": "https://github.com/materialsproject/pymatgen/pull/4123", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4123.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4123.patch", "merged_at": "2024-10-21T20:51:08Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4124
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4124/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4124/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4124/events
https://github.com/materialsproject/pymatgen/pull/4124
2,597,915,949
PR_kwDOACgets5_H6J7
4,124
doc: make the test procedure explicit
{ "login": "Lattay", "id": 24568527, "node_id": "MDQ6VXNlcjI0NTY4NTI3", "avatar_url": "https://avatars.githubusercontent.com/u/24568527?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Lattay", "html_url": "https://github.com/Lattay", "followers_url": "https://api.github.com/users/Lattay/followers", "following_url": "https://api.github.com/users/Lattay/following{/other_user}", "gists_url": "https://api.github.com/users/Lattay/gists{/gist_id}", "starred_url": "https://api.github.com/users/Lattay/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lattay/subscriptions", "organizations_url": "https://api.github.com/users/Lattay/orgs", "repos_url": "https://api.github.com/users/Lattay/repos", "events_url": "https://api.github.com/users/Lattay/events{/privacy}", "received_events_url": "https://api.github.com/users/Lattay/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 don't think we need to do both:\r\n- either we install pymatgen in editable mode to make the test files available (as test files are not included inside the distribution), OR\r\n- if for whatever reason you don't want to install in editable mode (test the distribution content for example), set `PMG_TEST_FILES_DIR` to point to the test file directory \r\n", "You are supposed to install pymatgen in editable mode if you are a dev." ]
2024-10-18T16:10:23
2024-10-19T16:06:45
2024-10-19T16:06:45Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The most common usual workflow with `pytest` is just `pip install . && pytest`, but this doesn't apply to pymatgen because of the test files. Since I had to dig (just a bit) in the sources to get `pytest` to run I figured I could help the next contributor by making it clear how to point to the files using an environment variable.
{ "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/4124/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/4124/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4124", "html_url": "https://github.com/materialsproject/pymatgen/pull/4124", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4124.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4124.patch", "merged_at": "2024-10-19T16:06:45Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4125
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4125/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4125/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4125/events
https://github.com/materialsproject/pymatgen/issues/4125
2,599,513,999
I_kwDOACgets6a8W-P
4,125
Add CUDA functionality to `parse_lammps_dumps` to allow for NVIDIA GPU support when analyzing large dump files.
{ "login": "kimiaGF", "id": 89272851, "node_id": "MDQ6VXNlcjg5MjcyODUx", "avatar_url": "https://avatars.githubusercontent.com/u/89272851?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kimiaGF", "html_url": "https://github.com/kimiaGF", "followers_url": "https://api.github.com/users/kimiaGF/followers", "following_url": "https://api.github.com/users/kimiaGF/following{/other_user}", "gists_url": "https://api.github.com/users/kimiaGF/gists{/gist_id}", "starred_url": "https://api.github.com/users/kimiaGF/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kimiaGF/subscriptions", "organizations_url": "https://api.github.com/users/kimiaGF/orgs", "repos_url": "https://api.github.com/users/kimiaGF/repos", "events_url": "https://api.github.com/users/kimiaGF/events{/privacy}", "received_events_url": "https://api.github.com/users/kimiaGF/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-10-19T19:22:52
2024-10-19T19:25:33
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Feature Requested I'd like to add GPU support for NVIDIA A100 GPUs for using `parse_lammps_dumps` from `pymatgen.io.lammps.outputs`. ### Proposed Solution Use `cudf` instead of `pandas` to read and parse LAMMPS dump file. ### Relevant Information Can increase efficiency of LAMMPS dump file reading significantly.
{ "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/4125/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/4125/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4126
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4126/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4126/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4126/events
https://github.com/materialsproject/pymatgen/issues/4126
2,599,944,567
I_kwDOACgets6a-AF3
4,126
Question about conventional cell standards defined by `get_conventional_standard_structure` in pymatgen.
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/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
[ "Dear @hongyi-zhao ,\r\n\r\nI think the different kpath scheme implementations have been made as a part of this publication: https://doi.org/10.1038/s41524-020-00383-7\r\n\r\nHistorically, MP used the scheme by 'setyawan_curtarolo first. That's why the prinitive and content cells are implemented like this. I assume implementing the different conventional cell types simply wasn't necessary for the publication above at the time.\r\n\r\nI am not aware of any plans to extend this. Tagging @mkhorton @tschaume @munrojm to see if they might know/remember more.\r\n\r\nPS: Most of the developments in pymatgen are part of projects/publications and pull requests are made for such specific projects.", "Btw, https://github.com/materialsproject/pymatgen/blob/v2024.10.3/src/pymatgen/symmetry/bandstructure.py#L27-L391 also clearly says that the convention from setyawan_curtarolo is used as a starting point for the generation of all 3 schema in this class." ]
2024-10-20T04:06:06
2024-10-20T08:26:02
2024-10-20T08:26:02Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Hello pymatgen developers, I've been examining the documentation for [`get_conventional_standard_structure`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.analyzer.SpacegroupAnalyzer.get_conventional_standard_structure) and [`HighSymmKpath`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath), and I've noticed a discrepancy that I'd like to understand better. In [`HighSymmKpath`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath), there are three options for the `path_type` parameter: - 'setyawan_curtarolo' - 'hinuma' - 'latimer_munro' These different conventions allow for flexibility in generating high symmetry paths. However, in [`get_conventional_standard_structure`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.analyzer.SpacegroupAnalyzer.get_conventional_standard_structure), the method seems to use only one standard, defined by [Setyawan & Curtarolo (2010)](https://doi.org/10.1016/j.commatsci.2010.05.010). The documentation states: > The standards are defined in Setyawan, W., & Curtarolo, S. (2010). High-throughput electronic band structure calculations: Challenges and tools. Computational Materials Science, 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010 My question is: Why doesn't [`get_conventional_standard_structure`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.analyzer.SpacegroupAnalyzer.get_conventional_standard_structure) offer similar options for different conventions, as seen in [`HighSymmKpath`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath)? Would it be beneficial to implement multiple standards for conventional cell generation, allowing users to choose between different conventions (e.g., Setyawan & Curtarolo, Hinuma et al., and Latimer & Munro) similar to how [`HighSymmKpath`](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath) operates? I'm curious about the rationale behind this design decision and whether there are plans to expand the options for conventional cell standards in future versions of pymatgen. Thank you for your time and consideration. Best regards, Zhao
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4126/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/4126/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4127
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4127/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4127/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4127/events
https://github.com/materialsproject/pymatgen/pull/4127
2,602,528,146
PR_kwDOACgets5_UetE
4,127
Fix gaussian input parser, and add test
{ "login": "sio-salt", "id": 105919668, "node_id": "U_kgDOBlA0tA", "avatar_url": "https://avatars.githubusercontent.com/u/105919668?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sio-salt", "html_url": "https://github.com/sio-salt", "followers_url": "https://api.github.com/users/sio-salt/followers", "following_url": "https://api.github.com/users/sio-salt/following{/other_user}", "gists_url": "https://api.github.com/users/sio-salt/gists{/gist_id}", "starred_url": "https://api.github.com/users/sio-salt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sio-salt/subscriptions", "organizations_url": "https://api.github.com/users/sio-salt/orgs", "repos_url": "https://api.github.com/users/sio-salt/repos", "events_url": "https://api.github.com/users/sio-salt/events{/privacy}", "received_events_url": "https://api.github.com/users/sio-salt/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" ]
2024-10-21T13:15:22
2024-10-22T00:42:37
2024-10-21T20:50:53Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - fix 1: In src/pymatgen/io/gaussian.py, within the from_str() method, the variable route_index is initially set to None and later assigned an integer representing the line number in the file. The code used `if route_index:` to check if route_index was set to a value other than None. However, when route_index is assigned 0, the condition if route_index: incorrectly evaluates to False. To fix this, I changed the condition to `if route_index is not None:`. This bug occurred when the Gaussian input file has no Link0 section and has the route section spanned multiple lines with only the first line starting with #, the parser did not read the file correctly. - fix 2: Added the test function test_from_str_no_link0() for a Gaussian input file that previously caused an error in from_str(). This test ensures that the parser correctly handles input files without a Link0 section and with multi-line route sections. - fix 3: Included example Gaussian input file for the .com extension used on Linux. This file, as described in Fix 1, has no Link0 section, has a multi-line route section, and only the first line of the route section starts with #. ## 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/4127/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/4127/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4127", "html_url": "https://github.com/materialsproject/pymatgen/pull/4127", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4127.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4127.patch", "merged_at": "2024-10-21T20:50:53Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4128
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4128/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4128/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4128/events
https://github.com/materialsproject/pymatgen/pull/4128
2,604,156,948
PR_kwDOACgets5_Zilu
4,128
bump `monty` to use the `monty.json` import speedup patch, add import time regression test, lazy load some rarely used but costly modules
{ "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
[ "Strange, I cannot [recreate this CI failure](https://github.com/materialsproject/pymatgen/actions/runs/11454074042/job/31867593537?pr=4128) on Ubuntu 22.04, python 3.12.7 (still trying) and h5py==3.11.0:\r\n\r\nMight be https://stackoverflow.com/questions/49317927/errno-101-netcdf-hdf-error-when-opening-netcdf-file\r\n\r\nhttps://github.com/Unidata/netcdf4-python/issues/1027\r\n\r\n", "@mkhorton Can I lazy import `sympy` (it's used by only one method `symmetry.settings.JonesFaithfulTransformation.parse_transformation_string` and would give us a ~15% speed up on import `core.Structure`)?\r\n", "> @mkhorton Can I lazy import `sympy` (it's used by only one method `symmetry.settings.JonesFaithfulTransformation.parse_transformation_string` and would give us a ~15% speed up on import `core.Structure`)?\r\n\r\nPlease! This method is very rarely used, lazy import preferred.", "Thank you for the profiling, let me know when ready for review.", "@mkhorton I believe this PR is already for view, let me know if you have any comment, thank you!\r\n\r\nCredit to @janosh for the motivation and helpful discussion!\r\n", "thanks a lot for your extensive profiling work @DanielYang59! i expected there would be a some low-hanging fruit but not nearly as much as you found. you went above and beyond here. 👍 \r\nwill be big help in resolving https://github.com/janosh/pymatviz/issues/209", "thanks @shyuep this hopefully would significantly speedup import " ]
2024-10-22T03:52:11
2024-11-14T03:35:11
2024-11-13T17:49:45Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Organize optional dependencies in `pyproject.toml` to avoid duplicate - Bump `sympy >= 1.3` to resolve https://github.com/materialsproject/pymatgen/pull/4116#issuecomment-2428308320 - Avoid `from numpy.testing import assert_allclose` in production code --- - bump `monty` to use [the latest json import speedup patch](https://github.com/materialsvirtuallab/monty/pull/713), partially fix #3793 - Have a quick look at other important modules (on cover those import other 3rd-party/non-core-pmg modules in this PR) and add import time test (profile: `python -X importtime -c "from pymatgen.core.structure import Structure" 2> pmg.log && tuna pmg.log`): - [x] core.bonds: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/50c868a2-5df4-4662-afd4-a68f4a70e8da"> - [x] core.composition: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/d90d517c-aea2-4196-ac92-ed6e8e5846d9"> - [x] core.interface (**need attention**) - [x] core.ion: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/272f5489-0942-4767-8793-99aa780516d9"> - [x] core.lattice: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/38978d49-5202-42ae-9a0c-a2dec86ba62a"> - [x] core.operations: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/c194a5a3-f8a5-4d21-bf5d-23984ce65341"> - [x] core.periodic_table: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/02a0fee0-588a-4688-ba53-e2b778b1a657"> - [x] core.sites: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/080fe0d6-66d3-412e-85ce-92a6d04a0b78"> - [x] core.spectrum: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/84f4550a-ce9b-42ad-8086-29a01f756a84"> - [x] core.structure - [x] core.surface: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/6adc138b-d224-4b42-b0cb-1778ede20d3f"> - [x] core.tensors: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/1142ebe6-c762-4929-ab95-d2b8f66eec5b"> - [x] core.trajectory (`AseAtomsAdaptor` lazy imported) - [x] io.vasp.inputs <img width="1475" alt="image" src="https://github.com/user-attachments/assets/67faa4fc-6126-4a1d-b79d-1cba30fcfd0b"> - [x] io.vasp.outputs: <img width="1475" alt="image" src="https://github.com/user-attachments/assets/7a0b705a-0458-482b-8e5f-e2247dc29d17"> - [For a follow up PR] looks like `scipy` across `core` need special attention
{ "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/4128/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4128/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4128", "html_url": "https://github.com/materialsproject/pymatgen/pull/4128", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4128.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4128.patch", "merged_at": "2024-11-13T17:49:45Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4130
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4130/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4130/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4130/events
https://github.com/materialsproject/pymatgen/issues/4130
2,608,605,461
I_kwDOACgets6bfCkV
4,130
Kpoints.from_file sometimes override the comment
{ "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 reporting this, yes I could confirm this. \r\n\r\nMeanwhile it seems comments are not passed for some other modes as well, I would fix this.\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/3ee17e2c346dea6e9248eb04c989e58880914650/src/pymatgen/io/vasp/inputs.py#L1594\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/3ee17e2c346dea6e9248eb04c989e58880914650/src/pymatgen/io/vasp/inputs.py#L1617" ]
2024-10-23T13:26:20
2024-10-25T21:25:23
2024-10-25T21:25:23Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version Version: 2024.10.22 ### Operating system version _No response_ ### Current behavior Given the following example KPOINTS file ``` pymatgen with grid density = 10000 / number of atoms 0 Gamma 19 19 6 ``` Upon reading it, I am getting kpt.comment value 'Automatic kpoint scheme' ### Expected Behavior I expect Kpoints object to capture the file comment and kpt.comment have the value "pymatgen with grid density = 10000 / number of atoms". ### Minimal example ```Python from pymatgen.io.vasp.inputs import Kpoints pt=Kpoints.from_file('KPOINTS') pt.comment ``` ### 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/4130/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/4130/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4131
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4131/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4131/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4131/events
https://github.com/materialsproject/pymatgen/pull/4131
2,608,716,842
PR_kwDOACgets5_nzMb
4,131
Fix comment pass in `Kpoints` constructors
{ "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
[ "@yantar92 Thanks again for reporting, am I missing anything here?\r\n\r\nUpdate: I changed my mind, I would change the methods to take a `comment` arg instead of hard coding the comments.", "> Thanks again for reporting, am I missing anything here?\r\n\r\nLooks reasonable from a quick glance. Thanks!", "No problem, thanks for checking" ]
2024-10-23T13:55:34
2024-10-27T03:15:53
2024-10-25T21:25:22Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix comment pass in `Kpoints` in auto/gamma/Monkhorst modes, to close #4130 - [x] Add 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/4131/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/4131/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4131", "html_url": "https://github.com/materialsproject/pymatgen/pull/4131", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4131.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4131.patch", "merged_at": "2024-10-25T21:25:22Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4132
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4132/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4132/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4132/events
https://github.com/materialsproject/pymatgen/issues/4132
2,609,056,654
I_kwDOACgets6bgwuO
4,132
assimilate method in SimpleVaspToComputedEntryDrone is not raising ValueError
{ "login": "igor-s-tan", "id": 95102697, "node_id": "U_kgDOBasm6Q", "avatar_url": "https://avatars.githubusercontent.com/u/95102697?v=4", "gravatar_id": "", "url": "https://api.github.com/users/igor-s-tan", "html_url": "https://github.com/igor-s-tan", "followers_url": "https://api.github.com/users/igor-s-tan/followers", "following_url": "https://api.github.com/users/igor-s-tan/following{/other_user}", "gists_url": "https://api.github.com/users/igor-s-tan/gists{/gist_id}", "starred_url": "https://api.github.com/users/igor-s-tan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/igor-s-tan/subscriptions", "organizations_url": "https://api.github.com/users/igor-s-tan/orgs", "repos_url": "https://api.github.com/users/igor-s-tan/repos", "events_url": "https://api.github.com/users/igor-s-tan/events{/privacy}", "received_events_url": "https://api.github.com/users/igor-s-tan/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 reporting this and your investigation. I could confirm this issue.\r\n\r\nOn top of the issue you discovered, there's another subtle bug in: https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/apps/borg/hive.py#L229-L239\r\n\r\nWhen `files` has no match, calling `files[0]` would trigger an IndexError, this should not be caught either.\r\n\r\n" ]
2024-10-23T15:39:18
2024-11-12T18:01:08
2024-11-12T18:01:08Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.3 ### Pymatgen version 2024.10.22 ### Operating system version Ubuntu 22.04 LTS ### Current behavior assimilate method in apps.borg.hive.SimpleVaspToComputedEntryDrone is not raising the ValueError when checking if all the necessary files are present ("INCAR", "POTCAR", "CONTCAR", "OSZICAR", "POSCAR"). Instead, the method returns None, i think it happens because the raise keyword is placed inside the try statement. ### Expected Behavior assimilate method should correctly detect the absence of required VASP files. ### Minimal example ```Python from pymatgen.apps.borg.hive import SimpleVaspToComputedEntryDrone drone = SimpleVaspToComputedEntryDrone() entry = drone.assimilate(".") print(entry) ``` ### 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/4132/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/4132/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4133
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4133/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4133/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4133/events
https://github.com/materialsproject/pymatgen/pull/4133
2,613,709,090
PR_kwDOACgets5_4kOI
4,133
Add min "thickness" check in `CifParser` to filter invalid structure which leads to infinite loop
{ "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
[ "@anyangml I hope this looks good to you, with this patch your example would terminate gracefully:\r\n```python\r\n/Users/yang/developer/pymatgen/src/pymatgen/io/cif.py:1318: UserWarning: No structure parsed for section 1 in CIF.\r\nlattice.volume=2.2009330203855426e-06 ų below threshold, double check your structure.\r\n warnings.warn(msg)\r\n/Users/yang/developer/pymatgen/src/pymatgen/io/cif.py:1322: UserWarning: Issues encountered while parsing CIF: No structure parsed for section 1 in CIF.\r\nlattice.volume=2.2009330203855426e-06 ų below threshold, double check your structure.\r\n warnings.warn(\"Issues encountered while parsing CIF: \" + \"\\n\".join(self.warnings))\r\nTraceback (most recent call last):\r\n File \"/Users/yang/developer/pymatgen/debug/recreate_cif.py\", line 15, in <module>\r\n read_file(\"./example.cif\")\r\n File \"/Users/yang/developer/pymatgen/debug/recreate_cif.py\", line 6, in read_file\r\n structure = cif.parse_structures(primitive=True)[0]\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/yang/developer/pymatgen/src/pymatgen/io/cif.py\", line 1325, in parse_structures\r\n raise ValueError(\"Invalid CIF file with no structures!\")\r\nValueError: Invalid CIF file with no structures!\r\n```\r\n", "@anyangml May I have your permission to include your cif file as a test file for `pymatgen` for such cases?", "> @anyangml May I have your permission to include your cif file as a test file for `pymatgen` for such cases?\r\n\r\nyes!", "Cool thanks!" ]
2024-10-25T10:26:50
2024-11-14T03:30:59
2024-11-13T17:49:17Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Add min thickness check in `CifParser` to filter invalid structure which leads to infinite loop, to fix #4028 - [x] Add 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/4133/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/4133/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4133", "html_url": "https://github.com/materialsproject/pymatgen/pull/4133", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4133.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4133.patch", "merged_at": "2024-11-13T17:49:17Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4134
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4134/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4134/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4134/events
https://github.com/materialsproject/pymatgen/pull/4134
2,613,758,170
PR_kwDOACgets5_4uJ-
4,134
Clean up `neighbors.pyx` variable name
{ "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-10-25T10:49:17
2024-10-26T02:02:17
2024-10-25T21:24:53Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Minor clean up `neighbors.pyx` variable name, remnant from #4028, **I don't expect any functional changes** - Use `unsigned int` (`npy_uint32`) over `int` for variables that we're certain would not be negative (counter, index when looping through "number of points/dimensions")
{ "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/4134/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/4134/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4134", "html_url": "https://github.com/materialsproject/pymatgen/pull/4134", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4134.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4134.patch", "merged_at": "2024-10-25T21:24:53Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4136
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4136/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4136/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4136/events
https://github.com/materialsproject/pymatgen/pull/4136
2,615,462,861
PR_kwDOACgets5_-NUh
4,136
Read INCAR `SYSTEM` as is, `check_params` use `proc_val`
{ "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
[ "@yantar92 Hope this looks good to you\r\n\r\nThe issue with `incar_parameters.json` is not completely resolved as we cannot reply on manual upgrade of tags and values, a script is certainly needed but I don't have time to work on this at this moment.\r\n", "> a script is certainly needed but I don't have time to work on this at this moment.\r\n\r\nhttps://github.com/materialsproject/pymatgen/issues/4119#issuecomment-2439617604-permalink", "I am merging this. In the end, we are using the 80/20 rule. VASP keys are always all caps. VASP values are a mess of different things (int, floats, case-insensitive strings, case-sensitive strings, etc.). For now, we will just use capitalize since that works for most of the cases, e.g., ALGO=Fast,Normal, etc. I get that BSE should be full caps since it is an acronym but since it makes no difference to actual functionality, we are going to live with it." ]
2024-10-26T02:25:03
2024-11-13T01:46:18
2024-11-12T18:08:52Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Manually update `incar_parameters.json`, to fix https://github.com/materialsproject/pymatgen/issues/4119#issuecomment-2431859839, need a more systematic script to update `incar_parameters.json` in the long run - `check_params` use `proc_val` - Remove some unnecessary casting in INCAR values as we're confident they are capitalized now - Avoid casing INCAR `SYSTEM` keyword, to fix https://github.com/materialsproject/pymatgen/pull/4122#issuecomment-2431216473
{ "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/4136/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/4136/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4136", "html_url": "https://github.com/materialsproject/pymatgen/pull/4136", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4136.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4136.patch", "merged_at": "2024-11-12T18:08:52Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4137
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4137/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4137/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4137/events
https://github.com/materialsproject/pymatgen/pull/4137
2,615,477,833
PR_kwDOACgets5_-PkH
4,137
Preprocess Structure Reduction Before Bulk Match
{ "login": "lan496", "id": 7272505, "node_id": "MDQ6VXNlcjcyNzI1MDU=", "avatar_url": "https://avatars.githubusercontent.com/u/7272505?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lan496", "html_url": "https://github.com/lan496", "followers_url": "https://api.github.com/users/lan496/followers", "following_url": "https://api.github.com/users/lan496/following{/other_user}", "gists_url": "https://api.github.com/users/lan496/gists{/gist_id}", "starred_url": "https://api.github.com/users/lan496/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lan496/subscriptions", "organizations_url": "https://api.github.com/users/lan496/orgs", "repos_url": "https://api.github.com/users/lan496/repos", "events_url": "https://api.github.com/users/lan496/events{/privacy}", "received_events_url": "https://api.github.com/users/lan496/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 @mkhorton, This PR aims to enhance the performance of `AflowPrototypeMatcher` with a similar approach to `StructureMatcher.group_structures` (see https://github.com/materialsproject/pymatgen/pull/2490). It might be of interest to you. Could you please review this PR?\r\n", "Merged. Thanks," ]
2024-10-26T03:01:55
2024-11-12T18:03:38
2024-11-12T18:03:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary The `AflowPrototypeMatcher` matches a structure against predefined AFLOW prototype structures using `StructureMatcher`. `StructureMatcher` requires preprocessing via lattice reduction and primitive-cell conversion. This commit optimizes performance by preprocessing AFLOW prototype structures during the initialization of `AflowPrototypeMatcher`. This change eliminates redundant processing when `AflowPrototypeMatcher.get_prototypes` is called multiple times. ## Benchmark I have checked the performance change by the following script, which calls `AflowPrototypeMatcher` with diamond-Si by 10 times. ```python # debug.py from __future__ import annotations from pymatgen.analysis.prototypes import AflowPrototypeMatcher from pymatgen.util.testing import PymatgenTest class TestAflowPrototypeMatcher(PymatgenTest): def test_prototype_matching(self): af = AflowPrototypeMatcher() struct = self.get_structure("Sn") for _ in range(10): prototype = af.get_prototypes(struct)[0] assert prototype["tags"] == { "aflow": "A_cF8_227_a", "mineral": "diamond", "pearson": "cF8", "strukturbericht": "A4", } if __name__ == '__main__': TestAflowPrototypeMatcher().test_prototype_matching() ``` The current master branch takes 20.4 s in total. `StructureMatcher._get_reduced_structure` takes most of the computational time. ![image](https://github.com/user-attachments/assets/b94e37d6-5480-4c00-a4b6-696671fbfffd) This PR takes 2.48 s for the same workload. Now, the heavy primitive-cell conversion is called only once. ![image](https://github.com/user-attachments/assets/e3b38028-c2e2-4f72-abc0-125aa5e1a461) These profiles are generated with cProfile and SnakeViz as follows ```shell python -m cProfile -s cumulative -o debug.prof debug.py ``` ## Checklist - [x] Google format doc strings added. Check with `ruff`. - [x] 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/4137/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/4137/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4137", "html_url": "https://github.com/materialsproject/pymatgen/pull/4137", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4137.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4137.patch", "merged_at": "2024-11-12T18:03:30Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4138
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4138/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4138/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4138/events
https://github.com/materialsproject/pymatgen/pull/4138
2,615,877,131
PR_kwDOACgets5__Ofm
4,138
Show `FutureWarning` and `DeprecationWarning` for `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
[]
2024-10-26T13:44:55
2024-11-13T01:44:34
2024-11-12T18:02:06Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Show `FutureWarning` and `DeprecationWarning` for `pytest`, https://docs.pytest.org/en/stable/how-to/capture-warnings.html - [x] Fix #4112 - [x] **For replacement of external APIs, double check the minimal version requirement** (scipy, phonopy and pandas) - [ ] Are there alternatives for deprecated `scipy` functions?
{ "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/4138/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/4138/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4138", "html_url": "https://github.com/materialsproject/pymatgen/pull/4138", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4138.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4138.patch", "merged_at": "2024-11-12T18:02:06Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4139
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4139/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4139/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4139/events
https://github.com/materialsproject/pymatgen/issues/4139
2,615,897,934
I_kwDOACgets6b629O
4,139
How to transform elastic constants after a change of basis with the help of pymatgen?
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/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
[ "Based on the related documentation [here](https://docs.materialsproject.org/methodology/materials-methodology/elasticity#derived-elastic-properties) and [here](https://materialsproject.github.io/atomate2/user/codes/vasp.html#elastic-constant), I got the following solution based on the method [here](https://pymatgen.org/pymatgen.core.html#pymatgen.core.tensors.Tensor.convert_to_ieee) in order to demonstrate some of the methodology conventions of simulating elasticity calculations adopted by [the materials project](https://docs.materialsproject.org/methodology/materials-methodology/elasticity#derived-elastic-properties). The details and parameter settings of the vasp calculations may not necessarily be consistent, so the final results cannot be directly and accurately compared with those in the Materials Project database.\r\n\r\nIn the following test, we use [the cif structure file from the legacy database](https://legacy.materialsproject.org/materials/mp-149/cif?type=primitive&download=true) to prepare the POSCAR, as shown below:\r\n\r\n```shell\r\n# Steps to do the test, using Si_mp-149_primitive.cif as an example:\r\n# Use your python venv accordingly:\r\n$ pyenv shell datasci \r\n$ python struct2conv.py -i Si_mp-149_primitive.cif -o Si_mp-149_conventional_standard.vasp\r\n$ mkdir Si_mp-149_conventional_standard && cd Si_mp-149_conventional_standard\r\n$ ln -sfr ../Si_mp-149_conventional_standard.vasp POSCAR\r\n$ (echo 101; echo DC)|vaspkit\r\n$ (echo 102; echo 2; echo 0.03)|vaspkit\r\n\r\n# Comment out the `NPAR` tag in INCAR and run the vasp calculation:\r\n$ mpirun -n 16 vasp_std\r\n\r\n# Extract the elastic tensor\r\n$ echo 203 |vaspkit\r\n\r\n# Convert elastic tensor to IEEE format\r\n$ python ../elastic2ieee.py\r\n```\r\nAll related necessary files and scripts are as follows:\r\n\r\n[elastic2ieee.zip](https://github.com/user-attachments/files/17542584/elastic2ieee.zip)\r\n\r\nSee below for the related discussions and tools:\r\n- https://www.vasp.at/forum/viewtopic.php?t=19829\r\n- https://github.com/libAtoms/matscipy/issues/271\r\n- https://github.com/materialsproject/pymatgen/discussions/4135\r\n- https://progs.coudert.name/elate" ]
2024-10-26T14:23:50
2024-11-05T14:11:46
2024-10-28T02:43:31Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Hi there, I have a question about transforming elastic constants when changing the basis/coordinate system. Does pymatgen provide functionality for this kind of transformation? Specifically, I want to: 1. Take a 6x6 elastic constant matrix in Voigt notation 2. Apply a basis transformation 3. Get the transformed elastic constants in the new basis Is there a built-in method to do this in pymatgen? If not, what would be the recommended way to implement this? Thanks in advance! Zhao P.S.: The following things seem to have something to do with this problem: 1. https://pymatgen.org/pymatgen.core.html#pymatgen.core.operations.SymmOp.transform_tensor 2. https://github.com/materialsproject/pymatgen/blob/0e65d35ae0b1df964639a48067b1a525979eec84/src/pymatgen/core/tensors.py#L406 But [the documentation link](http://pymatgen.org/_modules/pymatgen/core/tensors.html) shown [here](https://docs.materialsproject.org/methodology/materials-methodology/elasticity#symmetrization) is outdated: ![image](https://github.com/user-attachments/assets/aaa1310e-a186-4013-8dc9-1e022a60df2f)
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4139/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/4139/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4140
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4140/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4140/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4140/events
https://github.com/materialsproject/pymatgen/issues/4140
2,615,951,966
I_kwDOACgets6b7EJe
4,140
Poscar.from_file throws a cryptic error for VASP5-like POSCARs when POTCAR does not contain all the present elements
{ "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 reporting again. Yes I agree this error message is not semantic, and I'm happy to have a closer look later.\r\n\r\n> Ideally, I'd like Poscar.from_file fall back to using POSCAR symbols if POTCAR does not specify them all and throw a warning.\r\n\r\nI believe this \"not failing back to POSCAR symbol\" behaviour is intended when `check_for_potcar` is True.\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/0e65d35ae0b1df964639a48067b1a525979eec84/src/pymatgen/io/vasp/inputs.py#L233-L245\r\n\r\nIf you want to read a POSCAR with an incompatible POTCAR in the same directory, you may want to use `check_for_potcar=False` to turn off the POTCAR check.\r\n\r\n```python\r\nposcar = Poscar.from_file(\"./POSCAR\", check_for_potcar=False)\r\n```\r\n", "> If you want to read a POSCAR with an incompatible POTCAR in the same directory, you may want to use check_for_potcar=False to turn off the POTCAR check.\r\n\r\nUnfortunately, I have no such option.\r\n\r\nI think I need to elaborate on the _actual_ problem I encountered.\r\n\r\nMy code is the following\r\n\r\n```python\r\n # No VASP output found. Try to ingest VASP input.\r\n vasp_input = VaspInput.from_directory(self.directory)\r\n self.structure = vasp_input['POSCAR'].structure\r\n\r\n super().__post_init__()\r\n\r\n self.prev_incar = vasp_input['INCAR']\r\n self.prev_kpoints = vasp_input['KPOINTS']\r\n```\r\n\r\nAs you can see, I am not calling `Poscar.from_file` directly. I am using `VaspInput.from_directory`, which is then calling `Poscar.from_file` internally and throwing the observed error.\r\n\r\nThat's why I objected the existing behaviour and instead proposing throwing a warning and reading the POSCAR anyway (the POSCAR itself is perfectly valid).\r\n\r\nAnother option would be throwing some catchable error, so that I can at least handle this specific scenario via try/catch. For now, I cannot even do that because the observed error in indistinguishable from a real problem with POSCAR.", "Thanks for the input!\r\n\r\n> I am using VaspInput.from_directory, which is then calling Poscar.from_file internally and throwing the observed error.\r\n\r\nI believe this is intended to \"force\" user to make a VASP runner \"VASP input set\" and therefore POTCAR check is mandatory, I cannot think of any reason not to use a \"good\" POTCAR in this regard?\r\n\r\nI agree the error message should be clarified, but I don't have a good reason to change the default POTCAR checking behaviour of `VaspInput.from_directory` \r\n\r\n\r\n", "> I believe this is intended to \"force\" user to make a VASP runner \"VASP input set\" and therefore POTCAR check is mandatory, I cannot think of any reason not to use a \"good\" POTCAR in this regard?\r\n\r\nIn my case, there is an existing VASP input directory where the POSCAR is modified manually (well, using a custom script). Then, I wanted to re-generate the POTCAR according to the new POSCAR. I could read the files separately, but using VaspInput looked like a better option.\r\n\r\n> I agree the error message should be clarified, but I don't have a good reason to change the default POTCAR checking behaviour of VaspInput.from_directory\r\n\r\nYour call. Having a better error is good enough for my needs.", "> Your call. Having a better error is good enough for my needs.\r\n\r\nI'm not a maintainer, nor the person to unilaterally say no to a possible feature and you are free to open a separate PR if you believe this is a needed :)\r\n\r\n", "An alternative approach to turn off POTCAR checking globally might be the following (set `PMG_POTCAR_CHECKS` to False in your PMG config file):\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/io/vasp/inputs.py#L272-L276\r\n\r\nI believe this should work for your case.", "\r\n\r\nUpdate: I guess it's intended to overwrite elements by POTCAR, but I would enhance the warning message and error handling\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/io/vasp/inputs.py#L418-L428" ]
2024-10-26T15:44:23
2024-11-13T17:48:18
2024-11-13T17:48:18Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.7 ### Pymatgen version Version: 2024.10.22 ### Operating system version _No response_ ### Current behavior Consider the following scenario: 1. We have a POSCAR file in VASP5 format with, say, C and Na sites 2. We have an obsolete POTCAR file only specifying C potentials 3. We try to read the POSCAR using Poscar.from_file When I do try it, I get an error like: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yantar92/.venv/lib/python3.12/site-packages/pymatgen/io/vasp/inputs.py", line 282, in from_file return cls.from_str(file.read(), names, read_velocities=read_velocities) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/yantar92/.venv/lib/python3.12/site-packages/pymatgen/io/vasp/inputs.py", line 478, in from_str struct = Structure( ^^^^^^^^^^ File "/home/yantar92/.venv/lib/python3.12/site-packages/pymatgen/core/structure.py", line 3956, in __init__ super().__init__( File "/home/yantar92/.venv/lib/python3.12/site-packages/pymatgen/core/structure.py", line 1051, in __init__ raise StructureError(f"{len(species)=} != {len(coords)=}") pymatgen.core.structure.StructureError: len(species)=1 != len(coords)=721 ``` Such error is extremely hard to understand. I note that the error is not exactly a bug - docstring of from_file method does say that POTCAR symbols take priority by default. However, (1) it is very hard to understand what is going on from the error thrown; (2) the existing behaviour does not make much sense for VASP5 POSCARs where the symbol names are explicitly specified. ### Expected Behavior Ideally, I'd like Poscar.from_file fall back to using POSCAR symbols if POTCAR does not specify them all and throw a warning. ### Minimal example ```Python from pymatgen.io.vasp.inputs import Poscar, Potcar Poscar.from_file('POSCAR') ``` ### Relevant files to reproduce this bug [POSCAR.tar.gz](https://github.com/user-attachments/files/17531141/POSCAR.tar.gz) I cannot share the POTCAR file because of license terms, but here is the spec: ```python [PotcarSingle(symbol='C', functional='PBE', TITEL='PAW_PBE C 08Apr2002', VRHFIN='C: s2p2', n_valence_elec=4)] ```
{ "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/4140/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/4140/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4141
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4141/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4141/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4141/events
https://github.com/materialsproject/pymatgen/pull/4141
2,616,444,673
PR_kwDOACgets6AAhvz
4,141
VaspDoc.get_incar_tags: Use Mediawiki API
{ "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
[ "Thanks!" ]
2024-10-27T09:24:17
2024-10-29T00:06:01
2024-10-29T00:05:56Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
* src/pymatgen/io/vasp/help.py (VaspDoc.get_incar_tags): Use Mediawiki API instead of parsing the HTML source directly. The old approach is not stable against changes in the tag list because of the way URLs are constructed. pagefrom= parameters start from certain tag, which is not guaranteed to provide the complete tag list as the new tags are added before that tag given in pagefrom=. At the moment of writing this commit, PRECFOCK tag is already missed using the old approach. Following up: https://github.com/materialsproject/pymatgen/issues/4119#issuecomment-2439617604-permalink - [X] Install `pre-commit` hooks to auto-check types and linting before every commit
{ "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/4141/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/4141/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4141", "html_url": "https://github.com/materialsproject/pymatgen/pull/4141", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4141.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4141.patch", "merged_at": "2024-10-29T00:05:56Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4142
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4142/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4142/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4142/events
https://github.com/materialsproject/pymatgen/pull/4142
2,616,898,493
PR_kwDOACgets6ABkYE
4,142
Add a coerce formal charges method to openff code
{ "login": "orionarcher", "id": 27712051, "node_id": "MDQ6VXNlcjI3NzEyMDUx", "avatar_url": "https://avatars.githubusercontent.com/u/27712051?v=4", "gravatar_id": "", "url": "https://api.github.com/users/orionarcher", "html_url": "https://github.com/orionarcher", "followers_url": "https://api.github.com/users/orionarcher/followers", "following_url": "https://api.github.com/users/orionarcher/following{/other_user}", "gists_url": "https://api.github.com/users/orionarcher/gists{/gist_id}", "starred_url": "https://api.github.com/users/orionarcher/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/orionarcher/subscriptions", "organizations_url": "https://api.github.com/users/orionarcher/orgs", "repos_url": "https://api.github.com/users/orionarcher/repos", "events_url": "https://api.github.com/users/orionarcher/events{/privacy}", "received_events_url": "https://api.github.com/users/orionarcher/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
[ "Please add a unittest for the new method. Thanks." ]
2024-10-27T21:55:45
2024-11-16T16:42:52
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: Add a `coerce_formal_charges` method to the `pymatgen.io.openff` code, allowing molecules with formal charges to be more accurately parsed. ## 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": "", "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/4142/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/4142/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4142", "html_url": "https://github.com/materialsproject/pymatgen/pull/4142", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4142.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4142.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4143
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4143/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4143/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4143/events
https://github.com/materialsproject/pymatgen/pull/4143
2,617,221,427
PR_kwDOACgets6ACkTX
4,143
Improve element mismatch handling with POTCAR for `Poscar.from_file/str`
{ "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
[ "@yantar92 This situation seems a bit trickier than I thought (I don't have much experience handling an incompatible POTCAR). I'm still finding a cleaner way to handle this.\r\n\r\n`check_for_potcar` doesn't really check the content (elements matching) of a POTCAR, but more likely: \r\n1. check existence (by calling `Potcar.from_file`)\r\n2. Generate `default_names` which is the list of elements in POTCAR \r\nhttps://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/io/vasp/inputs.py#L278-L280\r\n\r\n---\r\n\r\nAnd it turns out it's the `default_names` generated from the incompatible POTCAR that caused the cryptic error: https://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/io/vasp/inputs.py#L418-L428\r\n\r\nIn your specific case, the `n_atoms` is `[1, 720]` (corresponding to your POSCAR) but the `default_names` is `[\"C\", ]` therefore there would be an `IndexError` raised but caught (I believe this is sort of intended, see the comment in the above code block)\r\n\r\nThis block also generates `atomic_symbols` as `[\"C\", ]`, and propagates to the `Structure` init and leads to the final exception we saw (as the lengths of `atomic_symbols` and `coords` mismatch).\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/io/vasp/inputs.py#L485-L492\r\n\r\n---\r\n\r\nAt this stage I believe not suppress the `IndexError` but re-raise as a semantic `ValueError` is the best solution (also confirmed this would not break any test so far), unless there're other cases that is not covered by tests?\r\n\r\n", "> At this stage I believe not suppress the IndexError but re-raise as a semantic ValueError is the best solution\r\n\r\nWell. Reading again through the code of Poscar.from_str, it looks like its default behaviour is very permissive - it even assigns arbitrary elements in some scenarios:\r\n\r\n> ... This will ensure at least a\r\n> unique element is assigned to each site and any analysis that does not\r\n> require specific elemental properties should work fine.\r\n\r\nThrowing a warning as you did is 100% helpful.\r\nWhether to throw a ValueError or not, I am not sure. Maybe you can ask the maintainers?", "Thanks for the comment.\r\n\r\n> Whether to throw a ValueError or not, I am not sure. Maybe you can ask the maintainers?\r\n\r\nI didn't fully understand the code when I left this comment, but I'm now pretty sure re-raising when not alter the original behaviour, only makes the error more understandable.\r\n\r\n---\r\n\r\nI rewrote the code logic to the following:\r\n\r\n```python\r\nif default_names is not None:\r\n # Use len(n_atoms) over len(symbols) as symbols is None for VASP 4 format\r\n if len(n_atoms) > len(default_names):\r\n raise ValueError(f\"{default_names=} (likely from POTCAR) has fewer elements than POSCAR {symbols}\")\r\n\r\n if symbols is None or default_names[: len(symbols)] != symbols:\r\n # After this VASP 4.x POSCAR would be converted to VASP 5/6 format\r\n vasp5or6_symbols = True\r\n\r\n atomic_symbols = []\r\n for idx, n_atom in enumerate(n_atoms):\r\n atomic_symbols.extend([default_names[idx]] * n_atom)\r\n\r\n warnings.warn(f\"Elements in POSCAR would be overwritten by {default_names=}\", stacklevel=2)\r\n```\r\n\r\nBasically there're three branches:\r\n- If the POTCAR (`default_names`) doesn't have enough elements, in the original code it could cause an `IndexError` which is suppressed. But this would leave a partially finished `atomic_symbols` which is then passed to `Structure` init and eventually leading to the cryptic error message you observed.\r\n- If the POTCAR has enough elements:\r\n - Elements would be overwritten if they're different, now a warning is inserted.\r\n - In the original implementation elements would be rewritten even if they're the same, this effectively does nothing but would now by skipped for efficiency.\r\n" ]
2024-10-28T03:50:41
2024-11-14T03:30:46
2024-11-13T17:48:17Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - The glob logic of POTCAR matching might need some attention, as files other than `POTCAR` might take higher priority than `POTCAR` - Suppress a lot of expected warning in VASP.inputs tests, to avoid warning pollution ### For element mismatch in POTCAR and POSCAR, to fix #4140: - If is able to overwrite, a warning would be issued (previously would silently overwrite) - If unable to overwrite as reported in #4140 (fewer elements in POTCAR than POSCAR), a more semantic value error would be raised
{ "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/4143/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/4143/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4143", "html_url": "https://github.com/materialsproject/pymatgen/pull/4143", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4143.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4143.patch", "merged_at": "2024-11-13T17:48:17Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4144
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4144/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4144/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4144/events
https://github.com/materialsproject/pymatgen/issues/4144
2,618,190,762
I_kwDOACgets6cDmuq
4,144
Some API from `scipy` is deprecated, no replacement inside `scipy`
{ "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
[ "Perhaps just copy the source code (and include the BSD license) as they're used only once. The original implementation just use `numpy`:\r\n\r\n\r\nhttps://github.com/scipy/scipy/blob/ea916c6f7f487bd53e98de082649d542cc6106ed/scipy/_lib/_finite_differences.py#L1-L144" ]
2024-10-28T11:48:51
2024-10-29T08:10:38
2024-10-29T05:01:42Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The following two code pieces use deprecated `scipy.misc` API, but `scipy` doesn't provide replacement. These API should have been removed ([1.12.0 was out in Jan 2024](https://pypi.org/project/scipy/#history)) but perhaps they postponed the removal? ```python import scipy.misc print(scipy.__version__) # 1.14.1 print(dir(scipy.misc)) # ['ascent', 'central_diff_weights', 'derivative', 'electrocardiogram', 'face'] ``` --- https://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/src/pymatgen/analysis/quasiharmonic.py#L302-L304 ``` scipy.misc.central_diff_weights is deprecated in SciPy v1.10.0; and will be completely removed in SciPy v1.12.0. You may consider using findiff: https://github.com/maroba/findiff or numdifftools: https://github.com/pbrod/numdifftools ``` https://github.com/materialsproject/pymatgen/blob/4b10dd3fb37d8012d46dee58678ac3a695845104/tests/analysis/elasticity/test_elastic.py#L468 ``` scipy.misc.central_diff_weights is deprecated in SciPy v1.10.0; and will be completely removed in SciPy v1.12.0. You may consider using findiff: https://github.com/maroba/findiff or numdifftools: https://github.com/pbrod/numdifftools ```
{ "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/4144/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/4144/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4145
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4145/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4145/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4145/events
https://github.com/materialsproject/pymatgen/pull/4145
2,618,370,800
PR_kwDOACgets6AGTrG
4,145
Fixed execution of packmol in relative path.
{ "login": "davidwaroquiers", "id": 3625296, "node_id": "MDQ6VXNlcjM2MjUyOTY=", "avatar_url": "https://avatars.githubusercontent.com/u/3625296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/davidwaroquiers", "html_url": "https://github.com/davidwaroquiers", "followers_url": "https://api.github.com/users/davidwaroquiers/followers", "following_url": "https://api.github.com/users/davidwaroquiers/following{/other_user}", "gists_url": "https://api.github.com/users/davidwaroquiers/gists{/gist_id}", "starred_url": "https://api.github.com/users/davidwaroquiers/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/davidwaroquiers/subscriptions", "organizations_url": "https://api.github.com/users/davidwaroquiers/orgs", "repos_url": "https://api.github.com/users/davidwaroquiers/repos", "events_url": "https://api.github.com/users/davidwaroquiers/events{/privacy}", "received_events_url": "https://api.github.com/users/davidwaroquiers/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." ]
2024-10-28T13:04:28
2024-10-29T00:04:07
2024-10-29T00:04:03Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - fix 1: One could not do packmol_input_set.run("randomdirectory"). Code would fail. This PR fixes this small issue. Added (actually adapted) a unit test to make sure it continues to work.
{ "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/4145/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/4145/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4145", "html_url": "https://github.com/materialsproject/pymatgen/pull/4145", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4145.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4145.patch", "merged_at": "2024-10-29T00:04:03Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4146
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4146/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4146/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4146/events
https://github.com/materialsproject/pymatgen/issues/4146
2,619,180,701
I_kwDOACgets6cHYad
4,146
Memory leak with `Chgcar.from_dict`
{ "login": "aryannsaha", "id": 44738654, "node_id": "MDQ6VXNlcjQ0NzM4NjU0", "avatar_url": "https://avatars.githubusercontent.com/u/44738654?v=4", "gravatar_id": "", "url": "https://api.github.com/users/aryannsaha", "html_url": "https://github.com/aryannsaha", "followers_url": "https://api.github.com/users/aryannsaha/followers", "following_url": "https://api.github.com/users/aryannsaha/following{/other_user}", "gists_url": "https://api.github.com/users/aryannsaha/gists{/gist_id}", "starred_url": "https://api.github.com/users/aryannsaha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/aryannsaha/subscriptions", "organizations_url": "https://api.github.com/users/aryannsaha/orgs", "repos_url": "https://api.github.com/users/aryannsaha/repos", "events_url": "https://api.github.com/users/aryannsaha/events{/privacy}", "received_events_url": "https://api.github.com/users/aryannsaha/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
[ "Here is a test with `memory_profiler`:\r\n\r\n```python\r\nfrom memory_profiler import profile\r\nfrom monty.serialization import loadfn\r\n\r\n@profile\r\ndef test():\r\n for _ in range(100):\r\n loadfn(\"mp-1000005.json.gz\")\r\n\r\nif __name__ == \"__main__\":\r\n test()\r\n```\r\n\r\nDoing one iteration:\r\n\r\n```\r\nLine # Mem usage Increment Occurrences Line Contents\r\n=============================================================\r\n 5 201.2 MiB 201.2 MiB 1 @profile\r\n 6 def test():\r\n 7 333.6 MiB 0.0 MiB 2 for _ in range(1):\r\n 8 333.6 MiB 132.4 MiB 1 loadfn(\"mp-1000005.json.gz\")\r\n```\r\n\r\nDoing 100 iterations:\r\n\r\n```\r\nLine # Mem usage Increment Occurrences Line Contents\r\n=============================================================\r\n 5 201.2 MiB 201.2 MiB 1 @profile\r\n 6 def test():\r\n 7 450.3 MiB -608.8 MiB 101 for _ in range(100):\r\n 8 450.3 MiB -359.7 MiB 100 loadfn(\"mp-1000005.json.gz\")\r\n```", "Chgcar inherits Volumetric data and that inherits from MSONable.from_dict. If there is a leak, it is in MSONable.", "Yup, I am looking into it. I also am not yet convinced this is a \"bug\" or just a quirk of Python. I'm going to close this issue and see if I can reproduce the behavior with the `MSONable` class." ]
2024-10-28T18:22:11
2024-10-28T22:48:58
2024-10-28T22:48:31Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.4 ### Pymatgen version 2024.10.27 ### Operating system version Linux ### Current behavior I'm working with Professor Andrew Rosen @Andrew-S-Rosen. We found what appears to be a memory leak associated with `Chgcar.from_dict`. Even when deleting the object from memory we still witness an increase in memory. ### Expected Behavior We expected to see no overall net increase in memory. ### Minimal example ```Python import gzip import json import tracemalloc import psutil from pymatgen.io.vasp.outputs import Chgcar # memory tracking functions and start def get_memory_usage(): """Get current process memory usage in MB""" process = psutil.Process() return process.memory_info().rss / (1024 * 1024) def log_memory(message, log_file="memory_usage_testRead.log"): """Log memory usage to file and print to console""" mem_usage = get_memory_usage() log_message = f"{message}: {mem_usage:.2f} MB\n" # Write to file with open(log_file, "a") as f: f.write(log_message) # Also print to console print(log_message, end="") # Start memory tracking tracemalloc.start() print(f"Initial memory usage: {get_memory_usage():.2f} MB") # Read in a CHGCAR several times for i in range(10): log_memory(f"Before gzip CHGCAR {i}") with gzip.open("mp-1000005.json.gz", "rt", encoding="utf-8") as g: chgcar_json = json.load(g) log_memory(f"After gzip CHGCAR {i}") log_memory(f"Before loading CHGCAR {i}") chgcar = Chgcar.from_dict(chgcar_json["data"]) log_memory(f"After loading CHGCAR {i}") del chgcar log_memory(f"After deleting CHGCAR {i}") print(f"Final memory usage: {get_memory_usage():.2f} MB") ``` ### Relevant files to reproduce this bug [mp-1000005.json.gz](https://github.com/user-attachments/files/17547198/mp-1000005.json.gz) ### Output ``` Initial memory usage: 161.57 MB Before gzip CHGCAR 0: 161.57 MB After gzip CHGCAR 0: 243.25 MB Before loading CHGCAR 0: 243.25 MB After loading CHGCAR 0: 250.32 MB After deleting CHGCAR 0: 250.32 MB Before gzip CHGCAR 1: 250.32 MB After gzip CHGCAR 1: 359.54 MB Before loading CHGCAR 1: 359.54 MB After loading CHGCAR 1: 359.64 MB After deleting CHGCAR 1: 359.64 MB Before gzip CHGCAR 2: 359.64 MB After gzip CHGCAR 2: 367.79 MB Before loading CHGCAR 2: 367.79 MB After loading CHGCAR 2: 367.89 MB After deleting CHGCAR 2: 367.89 MB Before gzip CHGCAR 3: 367.89 MB After gzip CHGCAR 3: 320.54 MB Before loading CHGCAR 3: 320.54 MB After loading CHGCAR 3: 320.54 MB After deleting CHGCAR 3: 320.54 MB Before gzip CHGCAR 4: 320.54 MB After gzip CHGCAR 4: 320.54 MB Before loading CHGCAR 4: 320.54 MB After loading CHGCAR 4: 320.54 MB After deleting CHGCAR 4: 320.54 MB Before gzip CHGCAR 5: 320.54 MB After gzip CHGCAR 5: 324.48 MB Before loading CHGCAR 5: 324.48 MB After loading CHGCAR 5: 324.48 MB After deleting CHGCAR 5: 324.48 MB Before gzip CHGCAR 6: 324.48 MB After gzip CHGCAR 6: 373.71 MB Before loading CHGCAR 6: 373.71 MB After loading CHGCAR 6: 373.71 MB After deleting CHGCAR 6: 373.71 MB Before gzip CHGCAR 7: 373.71 MB After gzip CHGCAR 7: 324.38 MB Before loading CHGCAR 7: 324.38 MB After loading CHGCAR 7: 324.38 MB After deleting CHGCAR 7: 324.38 MB Before gzip CHGCAR 8: 324.38 MB After gzip CHGCAR 8: 322.42 MB Before loading CHGCAR 8: 322.42 MB After loading CHGCAR 8: 322.42 MB After deleting CHGCAR 8: 322.42 MB Before gzip CHGCAR 9: 322.42 MB After gzip CHGCAR 9: 324.38 MB Before loading CHGCAR 9: 324.38 MB After loading CHGCAR 9: 324.38 MB After deleting CHGCAR 9: 324.38 MB Final memory usage: 324.38 MB ``` This was for a different CHGCAR file, but the same behavior is observed for many CHGCARs we tried. In production calculations, the memory usage continually increased, although here it tends to fluctuate after a notable initial increase.
{ "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/4146/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/4146/timeline
null
not_planned
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4147
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4147/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4147/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4147/events
https://github.com/materialsproject/pymatgen/pull/4147
2,619,242,267
PR_kwDOACgets6AJKqj
4,147
Bump rexml from 3.3.6 to 3.3.9 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
[]
2024-10-28T18:45:14
2024-10-29T00:03:47
2024-10-29T00:03:45Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.6 to 3.3.9. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/ruby/rexml/releases">rexml's releases</a>.</em></p> <blockquote> <h2>REXML 3.3.9 - 2024-10-24</h2> <h3>Improvements</h3> <ul> <li>Improved performance. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/210">GH-210</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li> <p>Fixed a parse bug for text only invalid XML.</p> <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/215">GH-215</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> <li> <p>Fixed a parse bug that <code>&amp;#0x...;</code> is accepted as a character reference.</p> </li> </ul> <h3>Thanks</h3> <ul> <li>NAITOH Jun</li> </ul> <h2>REXML 3.3.8 - 2024-09-29</h2> <h3>Improvements</h3> <ul> <li>SAX2: Improve parse performance. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/207">GH-207</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Fixed a bug that unexpected attribute namespace conflict error for the predefined &quot;xml&quot; namespace is reported. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/208">GH-208</a></li> <li>Patch by KITAITI Makoto</li> </ul> </li> </ul> <h3>Thanks</h3> <ul> <li> <p>NAITOH Jun</p> </li> <li> <p>KITAITI Makoto</p> </li> </ul> <h2>REXML 3.3.7 - 2024-09-04</h2> <h3>Improvements</h3> <ul> <li>Added local entity expansion limit methods <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/192">GH-192</a></li> <li><a href="https://redirect.github.com/ruby/rexml/issues/202">GH-202</a></li> <li>Reported by takuya kodama.</li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ruby/rexml/blob/master/NEWS.md">rexml's changelog</a>.</em></p> <blockquote> <h2>3.3.9 - 2024-10-24 {#version-3-3-9}</h2> <h3>Improvements</h3> <ul> <li>Improved performance. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/210">GH-210</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li> <p>Fixed a parse bug for text only invalid XML.</p> <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/215">GH-215</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> <li> <p>Fixed a parse bug that <code>&amp;#0x...;</code> is accepted as a character reference.</p> </li> </ul> <h3>Thanks</h3> <ul> <li>NAITOH Jun</li> </ul> <h2>3.3.8 - 2024-09-29 {#version-3-3-8}</h2> <h3>Improvements</h3> <ul> <li>SAX2: Improve parse performance. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/207">GH-207</a></li> <li>Patch by NAITOH Jun.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Fixed a bug that unexpected attribute namespace conflict error for the predefined &quot;xml&quot; namespace is reported. <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/208">GH-208</a></li> <li>Patch by KITAITI Makoto</li> </ul> </li> </ul> <h3>Thanks</h3> <ul> <li> <p>NAITOH Jun</p> </li> <li> <p>KITAITI Makoto</p> </li> </ul> <h2>3.3.7 - 2024-09-04 {#version-3-3-7}</h2> <h3>Improvements</h3> <ul> <li>Added local entity expansion limit methods <ul> <li><a href="https://redirect.github.com/ruby/rexml/issues/192">GH-192</a></li> <li><a href="https://redirect.github.com/ruby/rexml/issues/202">GH-202</a></li> <li>Reported by takuya kodama.</li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/ruby/rexml/commit/38eaa86ac7abe0d31cf49d8df57ad239fdeb80e9"><code>38eaa86</code></a> Add 3.3.9 entry</li> <li><a href="https://github.com/ruby/rexml/commit/ce59f2eb1aeb371fe1643414f06618dbe031979f"><code>ce59f2e</code></a> parser: fix a bug that &amp;#0x...; is accepted as a character reference</li> <li><a href="https://github.com/ruby/rexml/commit/a09646d395a07399cbf9bc3bc8d6d8bb1d13ecea"><code>a09646d</code></a> test: fix indent</li> <li><a href="https://github.com/ruby/rexml/commit/cf0fb9c9ca3dc0d725c8e4644aa0e728025f42ce"><code>cf0fb9c</code></a> Fix <code>IOSource#readline</code> for <code>@pending_buffer</code> (<a href="https://redirect.github.com/ruby/rexml/issues/215">#215</a>)</li> <li><a href="https://github.com/ruby/rexml/commit/1d0c362526f6e25e2abcd13e2fcefcc718c20e78"><code>1d0c362</code></a> Optimize <code>IOSource#read_until</code> method (<a href="https://redirect.github.com/ruby/rexml/issues/210">#210</a>)</li> <li><a href="https://github.com/ruby/rexml/commit/622011f25ac1519fd553d6c56da52d7eba14a787"><code>622011f</code></a> Bump version</li> <li><a href="https://github.com/ruby/rexml/commit/036d50851ce091c797db0b9ba3ed8e5a39c3918c"><code>036d508</code></a> test: avoid using needless non ASCII characters</li> <li><a href="https://github.com/ruby/rexml/commit/4197054a19e65511fb51983518a134a5c65aa840"><code>4197054</code></a> Add 3.3.8 entry</li> <li><a href="https://github.com/ruby/rexml/commit/78f8712dccad773a51dc5eef31c02d523e994570"><code>78f8712</code></a> Fix handling with &quot;xml:&quot; prefixed namespace (<a href="https://redirect.github.com/ruby/rexml/issues/208">#208</a>)</li> <li><a href="https://github.com/ruby/rexml/commit/2e1cd64f2f9c0667a840a0e31f9bb99f9e1c2b33"><code>2e1cd64</code></a> Optimize SAX2Parser#get_namespace (<a href="https://redirect.github.com/ruby/rexml/issues/207">#207</a>)</li> <li>Additional commits viewable in <a href="https://github.com/ruby/rexml/compare/v3.3.6...v3.3.9">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rexml&package-manager=bundler&previous-version=3.3.6&new-version=3.3.9)](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/4147/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/4147/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4147", "html_url": "https://github.com/materialsproject/pymatgen/pull/4147", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4147.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4147.patch", "merged_at": "2024-10-29T00:03:45Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4148
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4148/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4148/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4148/events
https://github.com/materialsproject/pymatgen/pull/4148
2,623,204,387
PR_kwDOACgets6AVxr8
4,148
WIP: Fix consideration of translation symmetry for some (extremely rare) edge cases in LobsterEnv
{ "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
[]
2024-10-30T08:00:19
2025-02-24T08:02:02
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - [ ] update documentation - [ ] completely solve the translation question (i.e., figuring out the direction and origin) - [ ] add a test case where this plays a role
{ "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/4148/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/4148/timeline
null
true
true
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4148", "html_url": "https://github.com/materialsproject/pymatgen/pull/4148", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4148.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4148.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4149
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4149/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4149/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4149/events
https://github.com/materialsproject/pymatgen/issues/4149
2,628,178,182
I_kwDOACgets6cptEG
4,149
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-11-01T02:33:43
2024-11-01T02:33:43
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
# Issue Metrics | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | | Time to first response | 11:32:34 | 2:26:24 | 1 day, 7:53:28 | | Time to close | 2 days, 14:34:21 | 2 days, 4:19:33 | 5 days, 8:02:11 | | Time to answer | None | None | None | | Metric | Count | | --- | ---: | | Number of items that remain open | 6 | | Number of items closed | 9 | | 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 | | --- | --- | --- | --- | --- | --- | | Some API from `scipy` is deprecated, no replacement inside `scipy` | https://github.com/materialsproject/pymatgen/issues/4144 | [DanielYang59](https://github.com/DanielYang59) | None | 17:12:51 | None | | Poscar.from_file throws a cryptic error for VASP5-like POSCARs when POTCAR does not contain all the present elements | https://github.com/materialsproject/pymatgen/issues/4140 | [yantar92](https://github.com/yantar92) | 11:44:38 | None | None | | How to transform elastic constants after a change of basis with the help of pymatgen? | https://github.com/materialsproject/pymatgen/issues/4139 | [hongyi-zhao](https://github.com/hongyi-zhao) | None | 1 day, 12:19:41 | None | | assimilate method in SimpleVaspToComputedEntryDrone is not raising ValueError | https://github.com/materialsproject/pymatgen/issues/4132 | [igor-s-tan](https://github.com/igor-s-tan) | None | None | None | | Kpoints.from_file sometimes override the comment | https://github.com/materialsproject/pymatgen/issues/4130 | [yantar92](https://github.com/yantar92) | 0:21:32 | 2 days, 7:59:03 | None | | Question about conventional cell standards defined by `get_conventional_standard_structure` in pymatgen. | https://github.com/materialsproject/pymatgen/issues/4126 | [hongyi-zhao](https://github.com/hongyi-zhao) | 3:09:53 | 4:19:56 | None | | Add CUDA functionality to `parse_lammps_dumps` to allow for NVIDIA GPU support when analyzing large dump files. | https://github.com/materialsproject/pymatgen/issues/4125 | [kimiaGF](https://github.com/kimiaGF) | None | None | None | | `AseAtomsAdaptor` conversions fail to preserve 1D or 2D PBC | https://github.com/materialsproject/pymatgen/issues/4120 | [jsukpark](https://github.com/jsukpark) | None | 0:18:14 | None | | VaspInput setter and Incar.check_params() are inconsistent | https://github.com/materialsproject/pymatgen/issues/4119 | [yantar92](https://github.com/yantar92) | 1:42:56 | 4 days, 6:18:20 | None | | `io.pwscf.PWInput.from_file()` incorrectly reads decimal numbers and the `K_POINTS` card in `automatic` mode | https://github.com/materialsproject/pymatgen/issues/4114 | [jsukpark](https://github.com/jsukpark) | None | 4 days, 19:16:28 | None | | Vampire_interface (pymatgen/analysis/magnetism/heisenberg.py:323:) | https://github.com/materialsproject/pymatgen/issues/4112 | [ghlam14](https://github.com/ghlam14) | None | None | None | | pmg plot --dos ... errs in matplotlib call | https://github.com/materialsproject/pymatgen/issues/4108 | [yantar92](https://github.com/yantar92) | 0:14:05 | 7 days, 11:05:01 | None | | Replace POTCAR in MPRelaxSet | https://github.com/materialsproject/pymatgen/issues/4106 | [TDKOLI](https://github.com/TDKOLI) | 2 days, 4:02:19 | 2 days, 4:19:33 | None | | Glob logic with `bader_analysis_from_path` is error-prone | https://github.com/materialsproject/pymatgen/issues/4089 | [Andrew-S-Rosen](https://github.com/Andrew-S-Rosen) | None | None | None | | Monthly issue metrics report | https://github.com/materialsproject/pymatgen/issues/4088 | [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-10-01..2024-10-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/4149/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/4149/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4150
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4150/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4150/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4150/events
https://github.com/materialsproject/pymatgen/pull/4150
2,629,947,910
PR_kwDOACgets6ArQgK
4,150
Added new Flag for `AutoOxiStateDecorationTransformation`
{ "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
[ "Merged. Thanks." ]
2024-11-01T22:09:45
2024-12-23T16:38:19
2024-11-12T18:04:27Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
# New flag for `AutoOxiStateDecorationTransformation` The situation we have in mind is `AutoOxiStateDecorationTransformation` -> `OrderDisorderedStructureTransformation` pipeline. The `OrderDisorderedStructureTransformation` expects oxidation numbers to help rank the structure guesses. However, if you have metallic systems, the sequences of transformation breaks. In those cases it's not super clear how the ordered structures should be ranked anyways unless you start invoking more sqs-type logic. For the simple case I think we can allow the users to come up with some quick and dirty guess for ordered structures so they can start computing stuff before they might move on to more fine-grained structure selection. Added a new `zeros_on_fail` flag. If True and and the `BVAnalyzer` fails to come up with a guess for the oxidation guess, we will set the all the oxidation states to zero.
{ "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/4150/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/4150/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4150", "html_url": "https://github.com/materialsproject/pymatgen/pull/4150", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4150.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4150.patch", "merged_at": "2024-11-12T18:04:27Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4151
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4151/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4151/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4151/events
https://github.com/materialsproject/pymatgen/pull/4151
2,630,156,075
PR_kwDOACgets6Ar4xW
4,151
Revert breaking `analysis.local_env` `default_op_params/cn_opt_params` rename
{ "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-02T03:19:33
2024-11-14T03:31:34
2024-11-13T17:53:46Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary - Reverse breaking `analysis.local_env` `default_op_params/cn_opt_params` rename, reported in https://github.com/materialsproject/pymatgen-analysis-defects/pull/206 and https://github.com/materialsproject/atomate2/pull/1030 - [x] Add unit test - Minor format tweak
{ "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/4151/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/4151/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4151", "html_url": "https://github.com/materialsproject/pymatgen/pull/4151", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4151.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4151.patch", "merged_at": "2024-11-13T17:53:46Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4153
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4153/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4153/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4153/events
https://github.com/materialsproject/pymatgen/pull/4153
2,633,835,080
PR_kwDOACgets6A2fG4
4,153
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-11-04T20:58:37
2024-11-12T18:01:20
2024-11-12T18:01:18Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.7.2) - [github.com/pre-commit/mirrors-mypy: v1.12.0 → v1.13.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.12.0...v1.13.0) - [github.com/adamchainz/blacken-docs: 1.19.0 → 1.19.1](https://github.com/adamchainz/blacken-docs/compare/1.19.0...1.19.1) - [github.com/kynan/nbstripout: 0.7.1 → 0.8.0](https://github.com/kynan/nbstripout/compare/0.7.1...0.8.0) - [github.com/RobertCraigie/pyright-python: v1.1.384 → v1.1.387](https://github.com/RobertCraigie/pyright-python/compare/v1.1.384...v1.1.387) <!--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/4153/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/4153/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4153", "html_url": "https://github.com/materialsproject/pymatgen/pull/4153", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4153.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4153.patch", "merged_at": "2024-11-12T18:01:18Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4154
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4154/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4154/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4154/events
https://github.com/materialsproject/pymatgen/pull/4154
2,635,374,676
PR_kwDOACgets6A7QT7
4,154
Fix `borg.hive.SimpleVaspToComputedEntryDrone.assimilate` ValueError when core file missing
{ "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-05T12:53:50
2024-11-13T01:44:18
2024-11-12T18:01:07Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix `borg.hive.SimpleVaspToComputedEntryDrone.assimilate` ValueError when core file missing, to fix #4132 - Add unit test - Improve type annotation
{ "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/4154/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/4154/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4154", "html_url": "https://github.com/materialsproject/pymatgen/pull/4154", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4154.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4154.patch", "merged_at": "2024-11-12T18:01:07Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4155
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4155/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4155/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4155/events
https://github.com/materialsproject/pymatgen/pull/4155
2,635,884,618
PR_kwDOACgets6A83rv
4,155
Add informative error message to `SymmetryUndeterminedError`
{ "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
[ "Appreciate the improvement, thanks @kavanase !", "Sorry for the delay in merging, auto-merge was broken and I hadn't realised. Should be fixed now." ]
2024-11-05T16:07:50
2024-11-17T23:25:00
2024-11-17T23:24:47Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
After pulling my hair out for a little while, trying to figure out why I was getting `SymmetryUndeterminedError`s when trying to initialise `SpacegroupAnalyzer` with a particular structure (which currently don't come with any message), I realised that `spglib.get_error_message()` can be called to get an error message for why no result was obtained. This is a small update to include the `spglib.get_error_message()` message in `SymmetryUndeterminedError`, so the user has some idea why it failed. In action: <img width="711" alt="image" src="https://github.com/user-attachments/assets/17ebbe2e-1571-4624-9d2a-3375eed9ff75"> <img width="741" alt="image" src="https://github.com/user-attachments/assets/f250b804-cd25-4bcb-8ab6-7d4540432a69">
{ "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/4155/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/4155/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4155", "html_url": "https://github.com/materialsproject/pymatgen/pull/4155", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4155.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4155.patch", "merged_at": "2024-11-17T23:24:47Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4158
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4158/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4158/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4158/events
https://github.com/materialsproject/pymatgen/issues/4158
2,643,731,180
I_kwDOACgets6dlCLs
4,158
tests use equality to compare floating point numbers
{ "login": "drew-parsons", "id": 26508288, "node_id": "MDQ6VXNlcjI2NTA4Mjg4", "avatar_url": "https://avatars.githubusercontent.com/u/26508288?v=4", "gravatar_id": "", "url": "https://api.github.com/users/drew-parsons", "html_url": "https://github.com/drew-parsons", "followers_url": "https://api.github.com/users/drew-parsons/followers", "following_url": "https://api.github.com/users/drew-parsons/following{/other_user}", "gists_url": "https://api.github.com/users/drew-parsons/gists{/gist_id}", "starred_url": "https://api.github.com/users/drew-parsons/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/drew-parsons/subscriptions", "organizations_url": "https://api.github.com/users/drew-parsons/orgs", "repos_url": "https://api.github.com/users/drew-parsons/repos", "events_url": "https://api.github.com/users/drew-parsons/events{/privacy}", "received_events_url": "https://api.github.com/users/drew-parsons/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 reporting, would fix this." ]
2024-11-08T11:20:50
2025-01-24T15:21:29
2025-01-24T15:21:28Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Floating point numbers (angles) are compared in transformation tests at https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/tests/transformations/test_advanced_transformations.py#L840 Using equality to compare floating point numbers inevitably fails e.g. https://buildd.debian.org/status/fetch.php?pkg=pymatgen&arch=amd64&ver=2024.10.29%2Bdfsg1-1&stamp=1731061592&raw=0 ``` # make sure that the orthorhombic supercell is different from the cubic cell assert not np.array_equal( supercell_generator_cubic.transformation_matrix, supercell_generator_orthorhombic.transformation_matrix, ) assert transformed_orthorhombic.lattice.abc != transformed_cubic.lattice.abc # only angels are expected to be the same because of force_90_degrees = True > assert transformed_cubic.lattice.angles == transformed_orthorhombic.lattice.angles E assert (89.999970160...0000000086139) == (89.999970160...0000000086142) E E At index 2 diff: 90.00000000086139 != 90.00000000086142 E Use -v to get more diff /<<PKGBUILDDIR>>/.pybuild/test_python3.12/tests/transformations/test_advanced_transformations.py:840: AssertionError ``` Floating point comparison needs to be used instead ``` assert_allclose(transformed_cubic.lattice.angles, lattice.angles) ```
{ "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/4158/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/4158/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4159
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4159/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4159/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4159/events
https://github.com/materialsproject/pymatgen/pull/4159
2,645,529,341
PR_kwDOACgets6BYpAL
4,159
Avoid using full equality (`==`) to compare float, avoid `assert_array_equal` compare float array
{ "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-09T03:04:29
2025-01-24T16:44:29
2025-01-24T15:21:27Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Avoid using full equality `==` to compare float, to fix #4158 - Avoid [`assert_array_equal` on int array](https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_array_equal.html): > Assert fails with numerical imprecision with floats: > Use [assert_allclose](https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_allclose.html#numpy.testing.assert_allclose) or one of the nulp (number of floating point values) functions for these cases instead: - Tweak `_proj` implementation, ~3x speedup - (Partially) Replace sequence of float comparison with `==` (list/tuple/dict ...): https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/tests/core/test_bonds.py#L56 - Other type/comment tweaks
{ "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/4159/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/4159/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4159", "html_url": "https://github.com/materialsproject/pymatgen/pull/4159", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4159.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4159.patch", "merged_at": "2025-01-24T15:21:27Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4160
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4160/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4160/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4160/events
https://github.com/materialsproject/pymatgen/pull/4160
2,645,870,841
PR_kwDOACgets6BZKnC
4,160
Clean up `io.vasp.outputs.Outcar` 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
[]
2024-11-09T09:41:40
2025-01-19T02:00:01
2025-01-18T16:23:16Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Clean up `io.vasp.outputs.Outcar` docstring/comment - Greatly enhance type annotation for parsers in `Outcar` with more specific types, clarify docstring: `Renders accessible from self.data` (the internal `self.data` dictionary) vs `Renders accessible from attributes` (instance attributes) - Other docstring/comment cleanups ### Others - Change `getattr` default value to `False` instead of `None` when used for condition 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/4160/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/4160/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4160", "html_url": "https://github.com/materialsproject/pymatgen/pull/4160", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4160.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4160.patch", "merged_at": "2025-01-18T16:23:16Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4161
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4161/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4161/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4161/events
https://github.com/materialsproject/pymatgen/issues/4161
2,646,330,588
I_kwDOACgets6du8zc
4,161
coordination_geometry int64 indices breaks on 32-bit systems
{ "login": "drew-parsons", "id": 26508288, "node_id": "MDQ6VXNlcjI2NTA4Mjg4", "avatar_url": "https://avatars.githubusercontent.com/u/26508288?v=4", "gravatar_id": "", "url": "https://api.github.com/users/drew-parsons", "html_url": "https://github.com/drew-parsons", "followers_url": "https://api.github.com/users/drew-parsons/followers", "following_url": "https://api.github.com/users/drew-parsons/following{/other_user}", "gists_url": "https://api.github.com/users/drew-parsons/gists{/gist_id}", "starred_url": "https://api.github.com/users/drew-parsons/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/drew-parsons/subscriptions", "organizations_url": "https://api.github.com/users/drew-parsons/orgs", "repos_url": "https://api.github.com/users/drew-parsons/repos", "events_url": "https://api.github.com/users/drew-parsons/events{/privacy}", "received_events_url": "https://api.github.com/users/drew-parsons/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 @drew-parsons thanks for reporting this and the analysis, sorry for the trouble caused.\r\n\r\nWe explicitly cast `int` to `int64` in a previous migration to NumPy 2.x #3992, as NumPy 2.x changed the default NumPy/Cython integer on 64-bit Windows platform to `int64` (was previously `int32`). Also `np.intp` was not used for the same reason (we want to consistently use `int64` onwards, over declaring fused type).\r\n\r\nThis decision was made with the assumption that very few, if any, users would still be running a 32-bit platform. However, it apparently you are using one. Currently, pymatgen’s CI does not cover 32-bit systems, and I don’t have access to one for testing. I’ll need to set up a 32-bit test environment to investigate this further later.\r\n\r\n", "Not using it personally, and you're right in practice there are probably few users (maybe some on Raspberry Pi). But the Debian project tries to support as many architectures as feasible, including a few 32-bit ones. Our build logs across the various architectures are listed at https://buildd.debian.org/status/package.php?p=pymatgen.\r\n\r\nDebian hasn't migrated to numpy 2 yet, so those needful updates are still ahead for us.", "> But the Debian project tries to support as many architectures as feasible, including a few 32-bit ones. \r\n\r\nYep I agree having better compatibility is almost always a good thing, as long as the price is not too high. I would have to look at this a bit later, thanks for sharing the info. ", "Okay I just set up a Debian 12 32-bit VM and I could recreate this, would try to fix this soon.\r\n```\r\n def _cg_csm_separation_plane_optim2(\r\n self,\r\n coordination_geometry,\r\n sepplane,\r\n local_plane,\r\n points_perfect=None,\r\n separation_indices=None,\r\n ):\r\n argref_separation = sepplane.argsorted_ref_separation_perm\r\n permutations = []\r\n permutations_symmetry_measures = []\r\n stop_search = False\r\n # TODO: do not do that several times ... also keep in memory\r\n if sepplane.ordered_plane:\r\n> inp = self.local_geometry.coords.take(separation_indices[1], axis=0)\r\nE TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'\r\n\r\n/home/yang/pymatgen/src/pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py:1979: TypeError\r\n\r\n4 failed, 20 passed, 2 skipped in 6.13s\r\n```" ]
2024-11-09T17:17:11
2024-12-11T02:03:15
2024-12-11T02:03:15Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.7 ### Pymatgen version 2024.10.29 ### Operating system version Debian unstable ### Current behavior pymatgen coordination geometry sets an explicit `int64` for separation indices at https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py#L1738 This breaks on 32-bit systems at https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py#L1979 ``` inp = self.local_geometry.coords.take(separation_indices[1], axis=0) ``` (also ll.1981,1989). On 32-bit systems array indices are int32 (or more precisely, `np.intp`). So using `int64` as the argument to the `take()` function results in an error ``` if sepplane.ordered_plane: > inp = self.local_geometry.coords.take(separation_indices[1], axis=0) E TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe' /<<PKGBUILDDIR>>/.pybuild/test_python3.12/pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py:1979: TypeError ``` Error logs can be found at https://buildd.debian.org/status/fetch.php?pkg=pymatgen&arch=armel&ver=2024.10.29%2Bdfsg1-1&stamp=1731068454&raw=0 also [armhf](https://buildd.debian.org/status/fetch.php?pkg=pymatgen&arch=armhf&ver=2024.10.29%2Bdfsg1-1&stamp=1731065422&raw=0), ### Expected Behavior The index type provided to `take()` needs to be compatible. Down-conversion could be down by changing l.1979 to ``` inp = self.local_geometry.coords.take(separation_indices[1].astype(np.intp), axis=0) ``` (likewise at the other 2 lines). Down conversion could be a problem if you really wanted to use 64-bit indexing on 32-bit systems, but perhaps that's unavoidable. One way of avoiding unexpected problems is to not use int64 in the first place, and define the separation indices at l.1738 as ``` _sep = [np.array(ss, dtype=np.intp) for ss in separation] ``` (in which case the `astype` patch at l.1979 would not be needed) ### Minimal example ```Python pytest-3 -v -k "test_real_systems or TestCoordinationGeometryFinder or test_from_structure_environments" tests/analysis/chemenv ``` ### 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/4161/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/4161/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4162
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4162/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4162/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4162/events
https://github.com/materialsproject/pymatgen/issues/4162
2,646,951,563
I_kwDOACgets6dxUaL
4,162
A few functions use unrounded `float` as `dict` keys
{ "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-10T07:35:48
2024-11-13T02:55:59
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Using `float` as `dict` keys can be prone to precision issues (especially when `float` is not rounded), a few functions operate on such `dict[float, Any]` (could be more not annotated): ### `core.bonds.obtain_all_bond_lengths` https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/core/bonds.py#L122-L137 ### `core.lattice.Lattie` https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/core/lattice.py#L545-L557 ### diffraction patterns https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/analysis/diffraction/neutron.py#L135 https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/analysis/diffraction/xrd.py#L199
{ "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/4162/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/4162/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4163
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4163/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4163/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4163/events
https://github.com/materialsproject/pymatgen/pull/4163
2,647,079,612
PR_kwDOACgets6BbM7q
4,163
Clarify `util.string.formula_double_format` return type, fix using `int` to round to nearest int
{ "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-10T10:32:11
2024-11-13T01:43:56
2024-11-12T18:00:48Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - [ ] Should `formula_double_format` return string instead of float? - Clarify `util.string.formula_double_format` return type as `Literal[""] | float` - Add types for `util.string` - **Bug fix**: `int` would not round to nearest int (but truncate decimal part): https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/util/string.py#L136-L137 https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/util/string.py#L129 - **Two minor behavior changes** for `formula_double_format`: 1. Use `isclose` to round float very close to `1`: ```diff - if ignore_ones and afloat == 1: + if ignore_ones and math.isclose(afloat, 1, abs_tol=tol): ``` 2. `tol` now includes the boundary (unit test added): ```diff - if abs(afloat - int(afloat)) < tol: + if math.isclose(afloat, round(afloat), abs_tol=tol): ``` ```python print(math.isclose(1, 1+1E-8, abs_tol=1E-8)) # True ```
{ "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/4163/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/4163/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4163", "html_url": "https://github.com/materialsproject/pymatgen/pull/4163", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4163.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4163.patch", "merged_at": "2024-11-12T18:00:48Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4164
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4164/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4164/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4164/events
https://github.com/materialsproject/pymatgen/pull/4164
2,647,332,662
PR_kwDOACgets6Bbl1q
4,164
Replace hard-coded `np.allclose/isclose` and `math.isclose` (for complex expression)
{ "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-10T15:17:21
2024-11-14T03:30:33
2024-11-13T17:45:49Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Replace some hard-coded `np.allclose/isclose` - Replace hard-coded `abs(a-b)<= tol` with`isclose` for **complex expressions**, **rationale**: - better readability as `isclose` is more declarative, especially for complex expressions like `if abs(p1 - pos2[idx]) > tolerance[idx] and abs(p1 - pos2[idx]) < 1 - tolerance[idx]:` - `isclose` is about 1.5x faster than `abs(a - b) <= abs_tol`, see following benchmark, presumably [`math` is implemented in C](https://github.com/python/cpython/blob/6ee542d491589b470ec7cdd353463ff9ff52d098/Modules/mathmodule.c#L3133-L3174) - more consistent edge case handling on the boundary (`isclose` always includes boundary) - [**WARNING**] For `abs(a - b) < abs_tol`, the behavior changes when `abs(a - b) == abs_tol` because `math.isclose` includes the boundary. However, this should be a **very rare edge case**. #### Simplify some math expressions - Avoid `int(round(x))` as `round(x)` already gives int, similar to `math.ceil/floor/gcd/...` - Replace `int(len(something) / positive_number)` with `len(something) // positive_number`, as the latter is more concise and 2x faster (WARNING: their behaviours are different for negative numbers) - Simplify comparison again zero: `abs(number - 0) [><]=? something`, simplify `1.0e-n` to `1e-n` - Avoid `from math import xxx` when `xxx` is used only very few times, to declutter namespace --- ### Speed comparison - [x] `math.isclose(a, b, abs_tol=abs_tol, rel_tol=0)` vs `abs(a - b) <= abs_tol` ``` Benchmark - math.isclose time: 0.028936 seconds Benchmark - Custom Compare time: 0.036071 seconds ``` <details> <summary> script(by GPT) </summary> ```python import math import time import random def custom_compare(a, b, abs_tol): """Custom comparison using absolute tolerance only.""" return abs(a - b) <= abs_tol def test_comparisons(abs_tolerance, num_tests): correct_count_isclose = 0 correct_count_custom = 0 for _ in range(num_tests): # Generate two random floats and a tolerance a = random.uniform(-1e6, 1e6) b = a + random.uniform(-abs_tolerance * 2, abs_tolerance * 2) # b is within absolute tolerance range of a # Using math.isclose with only absolute tolerance if math.isclose(a, b, abs_tol=abs_tolerance, rel_tol=0): correct_count_isclose += 1 # Using custom comparison if custom_compare(a, b, abs_tolerance): correct_count_custom += 1 return correct_count_isclose, correct_count_custom def benchmark_comparisons(abs_tolerance, num_iterations): a = random.uniform(-1e6, 1e6) b = a + random.uniform(-abs_tolerance * 2, abs_tolerance * 2) # Benchmark math.isclose start_isclose = time.perf_counter() for _ in range(num_iterations): math.isclose(a, b, abs_tol=abs_tolerance) end_isclose = time.perf_counter() # Benchmark custom comparison start_custom = time.perf_counter() for _ in range(num_iterations): custom_compare(a, b, abs_tolerance) end_custom = time.perf_counter() return (end_isclose - start_isclose), (end_custom - start_custom) if __name__ == "__main__": abs_tolerance = 1e-9 num_tests = 10000 num_iterations = 1000000 # Test correctness correct_count_isclose, correct_count_custom = test_comparisons(abs_tolerance, num_tests) print(f"Correctness Test - math.isclose: {correct_count_isclose}/{num_tests}") print(f"Correctness Test - Custom Compare: {correct_count_custom}/{num_tests}") # Benchmark performance time_isclose, time_custom = benchmark_comparisons(abs_tolerance, num_iterations) print(f"Benchmark - math.isclose time: {time_isclose:.6f} seconds") print(f"Benchmark - Custom Compare time: {time_custom:.6f} seconds") ``` </details> - [x] `np.allclose` vs `np.all(np.abs(array_a - array_b) <= abs_tol)` on 100x100 arrays It seems custom implementation is faster, might need special attention ``` Benchmark - np.allclose time: 0.148381 seconds Benchmark - Custom allclose time: 0.100266 seconds ``` <details> <summary> script (by GPT) </summary> ```python import numpy as np import time def custom_allclose(array_a, array_b, abs_tol): """Custom implementation of allclose using absolute tolerance.""" return np.all(np.abs(array_a - array_b) <= abs_tol) def benchmark_np_allclose_and_custom(abs_tol, num_iterations): # Benchmark numpy.allclose start_np_allclose = time.perf_counter() for _ in range(num_iterations): # Generate two random 100x100 arrays for each iteration array_a = np.random.uniform(-1e6, 1e6, (100, 100)) array_b = array_a + np.random.uniform(-abs_tol * 2, abs_tol * 2, (100, 100)) # Ensure b is within tolerance of a np.allclose(array_a, array_b, atol=abs_tol, rtol=0) end_np_allclose = time.perf_counter() # Benchmark custom allclose start_custom_allclose = time.perf_counter() for _ in range(num_iterations): # Generate two random 100x100 arrays for each iteration array_a = np.random.uniform(-1e6, 1e6, (100, 100)) array_b = array_a + np.random.uniform(-abs_tol * 2, abs_tol * 2, (100, 100)) # Ensure b is within tolerance of a custom_allclose(array_a, array_b, abs_tol) end_custom_allclose = time.perf_counter() return (end_np_allclose - start_np_allclose), (end_custom_allclose - start_custom_allclose) if __name__ == "__main__": abs_tolerance = 1e-9 num_iterations = 1000 # Run the benchmark time_np_allclose, time_custom_allclose = benchmark_np_allclose_and_custom(abs_tolerance, num_iterations) print(f"Benchmark - np.allclose time: {time_np_allclose:.6f} seconds") print(f"Benchmark - Custom allclose time: {time_custom_allclose:.6f} seconds") ``` </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/4164/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/4164/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4164", "html_url": "https://github.com/materialsproject/pymatgen/pull/4164", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4164.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4164.patch", "merged_at": "2024-11-13T17:45:49Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4165
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4165/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4165/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4165/events
https://github.com/materialsproject/pymatgen/issues/4165
2,648,294,170
I_kwDOACgets6d2cMa
4,165
[BUG] Missing `()` in `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
[]
2024-11-11T06:21:03
2025-01-28T20:28:39
2025-01-28T20:28:39Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Seemingly missing `()` in 744c7db9780a301e2f5fcdf1948a1b7a4d36a404: https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/electronic_structure/boltztrap.py#L1457-L1473 ```diff - and (abs(st[2] - st[0]) / st[2] <= isotropy_tolerance) + and (abs((st[2] - st[0]) / st[2]) <= isotropy_tolerance) ``` i.e.: ```diff - abs(a) / b <= tol + abs(a / b) <= tol ``` Otherwise any vector with a negative z component would be considered isotropic along z direction. Can you please comment on this? @computron
{ "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/4165/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/4165/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4166
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4166/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4166/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4166/events
https://github.com/materialsproject/pymatgen/issues/4166
2,648,324,584
I_kwDOACgets6d2jno
4,166
[BUG] Incorrect usage of `np.all() > tol` for element-wise value comparison
{ "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
[ "@naik-aakash Could you kindly check this (after Thursday ;))? Thanks a lot. ", "Hi @DanielYang59 , thanks for pointing this out. Indeed there seems to have been an error with comparison logic here. Using np.any should be preferable here as you suggested I think.\r\n\r\nI assume you have already started working on this issue, if not am also happy to raise a PR for this. Let me know.", "Hi @naik-aakash greetings thanks for looking into this :)\r\n\r\n> Using np.any should be preferable here as you suggested I think.\r\n\r\nI might have caused confusion here, sorry. The main issue is not the usage of `any()` over `all()`, but the order of comparison vs `all/any` call. And we should do comparison **before** `all/any` evaluation:\r\n> Test whether all array elements along a given axis evaluate to True.\r\n\r\nCurrent implementation does the other way round, i.e. calling `array.all()` would evaluate the array to a `bool`, and we're basically comparing the bool (`0/1`) with `limit_deviation`.\r\n\r\n---\r\n\r\n> I assume you have already started working on this issue, if not am also happy to raise a PR for this. Let me know.\r\n\r\nI might need your help to fix this, and it's apparently not covered by unit test. Perhaps you could enhance the unit test on top of fixing the implementation? Thank you!\r\n\r\n", "Hey 😃 ,\r\n\r\nI have an additional suggestion to improve this function further. Instead of looping through each value like that, \r\nhttps://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/io/lobster/outputs.py#L1713-L1735\r\nmaybe we could aim for a more compact comparison:\r\n```python\r\nimport numpy as np\r\n\r\ndef validate_band_overlaps(matrices, num_occ_bands, limit_deviation):\r\n \"\"\"\r\n Validate diagonal and off-diagonal elements for band overlaps.\r\n \"\"\"\r\n for matrix in matrices:\r\n matrix = np.array(matrix)\r\n # Limit matrix to occupied bands\r\n sub_matrix = matrix[:num_occ_bands, :num_occ_bands]\r\n\r\n # Check diagonal elements\r\n if np.any(np.abs(np.diag(sub_matrix) - 1.0) > limit_deviation):\r\n return False\r\n\r\n # Check off-diagonal elements\r\n if np.any(np.abs(sub_matrix - np.diag(np.diag(sub_matrix))) > limit_deviation):\r\n return False\r\n\r\n return True\r\n\r\n\r\ndef check_band_overlaps(band_overlaps_dict, number_occ_bands_spin_up, limit_deviation, spin_polarized=False, number_occ_bands_spin_down=None):\r\n \"\"\"\r\n Check band overlaps for spin-up and optionally spin-down configurations.\r\n \"\"\"\r\n # Validate spin-up matrices\r\n if not validate_band_overlaps(band_overlaps_dict[Spin.up][\"matrices\"], number_occ_bands_spin_up, limit_deviation):\r\n return False\r\n\r\n # Validate spin-down matrices if spin-polarized\r\n if spin_polarized:\r\n if number_occ_bands_spin_down is None:\r\n raise ValueError(\"number_occ_bands_spin_down must be specified.\")\r\n if not validate_band_overlaps(band_overlaps_dict[Spin.down][\"matrices\"], number_occ_bands_spin_down, limit_deviation):\r\n return False\r\n\r\n return True\r\n```\r\n(*Disclaimer*: this is ChatGPT-generated but looks about like the code structure I would have proposed, maybe one can condense it a little bit).\r\n\r\nWhat do you think about that, @naik-aakash ?\r\n", "@QuantumChemist Brilliant idea, I didn't look closely into the code itself at the time of opening this issue, but I fully support your idea to reduce code repetition and nest level.\r\n\r\nI'm not quite familiar with the expected type and shape of the `matrix` from `band_overlaps_dict[Spin.up][\"matrices\"]`, but looks like it's a 2D square array of floats? If that's the case, perhaps comparing its top-left `num_occ_bands x num_occ_bands` leading principal sub-array with an identity array? Something like:\r\n\r\n```python\r\nif spin_polarized and number_occ_bands_spin_down is None:\r\n raise ValueError(\"number_occ_bands_spin_down has to be specified\")\r\n\r\nfor spin in (Spin.up, Spin.down) if spin_polarized else (Spin.up,):\r\n num_occ_bands = number_occ_bands_spin_up if spin == Spin.up else number_occ_bands_spin_down\r\n\r\n for array in self.band_overlaps_dict[spin][\"matrices\"]:\r\n # Looks like it is already np.array?\r\n sub_array = np.asarray(array)[:num_occ_bands, :num_occ_bands]\r\n\r\n if not np.allclose(sub_array, np.identity(num_occ_bands), atol=limit_deviation, rtol=0):\r\n return False\r\n\r\nreturn True\r\n```\r\n\r\n---\r\n\r\nI realized I might be misusing the word \"matrix\" as we're not doing linear algebra operations, I believe \"array\" might be a better term. I'm mentioning this because [NumPy is discouraging the usage of `np.matrix` even for real linear algebra usage](https://numpy.org/doc/stable/reference/generated/numpy.matrix.html):\r\n> It is no longer recommended to use this class, even for linear algebra. Instead use regular arrays. The class may be removed in the future.", "Thank you so much, @QuantumChemist and @DanielYang59, for the suggestions to reduce the code complexity. I will implement the suggestions and raise a PR soon \r\n\r\nAnd @DanielYang59 , you are right, it is not using matrix but already an numpy array but the term \"matrix\" is used in Bandoverlaps class just to ensure consistency with actual output files from LOBSTER." ]
2024-11-11T06:41:47
2024-11-18T13:32:59
2024-11-18T13:32:59Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The following method: https://github.com/materialsproject/pymatgen/blob/bd9fba9ec62437b5b62fbd0b2c2c723216cc5a2c/src/pymatgen/io/lobster/outputs.py#L1694-L1737 Used a pattern like `np.array().all() > tolerance` with the intention to perform element-wise value comparison, however [this seems to be misused as `all()`](https://numpy.org/doc/stable/reference/generated/numpy.all.html#numpy.all): > "Test whether all array elements along a given axis evaluate to True." ```python import numpy as np arr = np.array([1, 2, 3]) print(arr.all()) # True print(np.array([False, 1, 2]).all()) # False ``` Should be something like: ```diff - if abs(band2 - 1.0).all() > limit_deviation: # However this logic might need double check as it only evaluates to True # when ALL deviations are greater than threshold + if np.all(np.abs(band2 - 1) > limit_deviation): # Perhaps it should be the following? + if np.any(np.abs(band2 - 1) > limit_deviation): # The same to the other - elif band2.all() > limit_deviation: + elif np.all(band2 > limit_deviation) # The following seems more sensible? + elif np.any(band2 > limit_deviation) ``` I might go ahead and change this if I didn't misunderstand anything? @JaGeo
{ "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/4166/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/4166/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4167
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4167/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4167/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4167/events
https://github.com/materialsproject/pymatgen/pull/4167
2,651,319,153
PR_kwDOACgets6BmBv3
4,167
Fix: BSPlotterProjected._Orbitals_SumOrbitals() method
{ "login": "ShengLin1001", "id": 96469251, "node_id": "U_kgDOBcABAw", "avatar_url": "https://avatars.githubusercontent.com/u/96469251?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ShengLin1001", "html_url": "https://github.com/ShengLin1001", "followers_url": "https://api.github.com/users/ShengLin1001/followers", "following_url": "https://api.github.com/users/ShengLin1001/following{/other_user}", "gists_url": "https://api.github.com/users/ShengLin1001/gists{/gist_id}", "starred_url": "https://api.github.com/users/ShengLin1001/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShengLin1001/subscriptions", "organizations_url": "https://api.github.com/users/ShengLin1001/orgs", "repos_url": "https://api.github.com/users/ShengLin1001/repos", "events_url": "https://api.github.com/users/ShengLin1001/events{/privacy}", "received_events_url": "https://api.github.com/users/ShengLin1001/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
[ "And I also have a question, why we need run this\r\n\r\n```python\r\nelif len(dictio[elt][0]) > 1:\r\n```\r\nfor example code, the len(\"dxy\") = 3, what's meaning of this?" ]
2024-11-12T07:35:01
2024-11-24T12:22:51
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
**Fix**: Ensure BSPlotterProjected._Orbitals_SumOrbitals() checks if sum_morbs is not None, as a NoneType object cannot be iterated. ## Summary ### Major changes: - Fixed the BSPlotterProjected._Orbitals_SumOrbitals() method to handle cases where sum_morbs is None. ## Description When running the following code, I encountered an error in the get_projected_plots_dots_patom_pmorb() method, which uses _Orbitals_SumOrbitals(). The error occurred because sum_morbs was None, making it non-iterable. This fix addresses the issue by ensuring that sum_morbs is checked to confirm it is not None before any iteration, especially when plotting a single orbital. The order of statements has been adjusted accordingly. ### Example Code to Reproduce: ```python from pymatgen.electronic_structure.plotter import DosPlotter, BSPlotter, BSPlotterProjected, BSDOSPlotter from pymatgen.io.vasp import BSVasprun, Vasprun v = BSVasprun("./bs/vasprun.xml", parse_projected_eigen=True) bs = v.get_band_structure(kpoints_filename="./bs/KPOINTS", line_mode=True) plotter = BSPlotterProjected(bs) plotter.get_projected_plots_dots_patom_pmorb({"Au": ["dxy"]}, {"Au": [1]}, ylim=[-5, 5]) ``` This change ensures more robust handling of cases where sum_morbs is None to prevent runtime errors.
{ "login": "ShengLin1001", "id": 96469251, "node_id": "U_kgDOBcABAw", "avatar_url": "https://avatars.githubusercontent.com/u/96469251?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ShengLin1001", "html_url": "https://github.com/ShengLin1001", "followers_url": "https://api.github.com/users/ShengLin1001/followers", "following_url": "https://api.github.com/users/ShengLin1001/following{/other_user}", "gists_url": "https://api.github.com/users/ShengLin1001/gists{/gist_id}", "starred_url": "https://api.github.com/users/ShengLin1001/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ShengLin1001/subscriptions", "organizations_url": "https://api.github.com/users/ShengLin1001/orgs", "repos_url": "https://api.github.com/users/ShengLin1001/repos", "events_url": "https://api.github.com/users/ShengLin1001/events{/privacy}", "received_events_url": "https://api.github.com/users/ShengLin1001/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4167/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/4167/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4167", "html_url": "https://github.com/materialsproject/pymatgen/pull/4167", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4167.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4167.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4168
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4168/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4168/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4168/events
https://github.com/materialsproject/pymatgen/pull/4168
2,651,514,499
PR_kwDOACgets6BmlDd
4,168
`matplotlib` test use non-interactive `agg` backend
{ "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-12T09:02:49
2024-11-13T01:43:45
2024-11-12T18:00:28Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - I don't think we need `PMG_VASP_PSP_DIR` in editable mode - [`matplotlib` test use non-interactive `agg` backend](https://matplotlib.org/stable/users/explain/figure/backends.html), as the [tk install for github windows runner seems pretty flaky](https://github.com/matplotlib/matplotlib/issues/29119#issuecomment-2469406065) > The last, Agg, is a non-interactive backend that can only write to files. It is used on Linux, if Matplotlib cannot connect to either an X display or a Wayland display. > The names of builtin backends are case-insensitive; e.g., 'QtAgg' and 'qtagg' are equivalent. The tk backend might [emit intermittent failures](https://github.com/materialsproject/pymatgen/actions/runs/11771540044/job/32785607964?pr=4159) like: ``` > self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) E _tkinter.TclError: invalid command name "tcl_findLibrary" ``` [Or](https://github.com/materialsproject/pymatgen/actions/runs/11793603996/job/32849482132?pr=4164): ``` > self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) E _tkinter.TclError: Can't find a usable init.tcl in the following directories: E C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6 C:/Users/runneradmin/micromamba/envs/lib/tcl8.6 C:/Users/runneradmin/micromamba/lib/tcl8.6 C:/Users/runneradmin/micromamba/envs/library C:/Users/runneradmin/micromamba/library C:/Users/runneradmin/micromamba/tcl8.6.13/library C:/Users/runneradmin/tcl8.6.13/library E E C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl: couldn't read file "C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl": No error E couldn't read file "C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl": No error E while executing E "source C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl" E ("uplevel" body line 1) E invoked from within E "uplevel #0 [list source $tclfile]" E E E This probably means that Tcl wasn't installed properly. ```
{ "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/4168/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/4168/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4168", "html_url": "https://github.com/materialsproject/pymatgen/pull/4168", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4168.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4168.patch", "merged_at": "2024-11-12T18:00:28Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4169
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4169/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4169/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4169/events
https://github.com/materialsproject/pymatgen/pull/4169
2,653,713,093
PR_kwDOACgets6Bs3E8
4,169
CP2K fixes
{ "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
[ "Merged. Thanks. One option is to break this out as an add-on for separate management." ]
2024-11-13T00:11:13
2024-11-13T02:11:34
2024-11-13T02:05:11Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
this PR fixes several bugs encountered trying to use the `cp2k` modules in `pymatgen` which don't seem to have seen active development over the last 4 years (so some errors from upstream breaking changes expected) ## Key Changes 1. **Default Verbosity**: change `Keyword` + `Section` `verbose` default to `False` to stop printing explanatory comments for sections and flags into _every_ CP2K input file (don't explain stuff that can just be looked up in the docs) 2. **YAML Migration**: Switched from `ruamel.yaml` to `pyyaml` to resolve `AttributeError` in `setup_cp2k_data` function. 3. **Basis Set & Potential Handling**: - Added support for string-based potential specifications (used to raise `AttributeError` no `.filename`) - Added fallback to global basis sets and potentials in `get_basis_and_potential` - Added `cp2k_data_dir` keyword parameter in `get_basis_and_potential` that takes precedence over `PMG_CP2K_DATA_DIR` from `pmgrc.yaml` ## Bug Fixes - Fixed `KeyError` in `calculation_type` when `self.data.get("dft")` returns `None` - Fixed trailing whitespace in `Section._get_str`
{ "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/4169/reactions", "total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 2, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4169/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4169", "html_url": "https://github.com/materialsproject/pymatgen/pull/4169", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4169.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4169.patch", "merged_at": "2024-11-13T02:05:11Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4170
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4170/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4170/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4170/events
https://github.com/materialsproject/pymatgen/pull/4170
2,659,852,600
PR_kwDOACgets6B9vcY
4,170
CP2K allow specifying default initial element magmoms
{ "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
[]
2024-11-14T19:28:16
2024-11-17T23:20:50
2024-11-17T23:20:50Z
MEMBER
{ "total": 0, "completed": 0, "percent_completed": 0 }
`DftSet` in `src/pymatgen/io/cp2k/sets.py` gets a new `element_defaults: dict[str, dict[str, Any]] | None = None` keyword (format is `{element: {key: value}}`). includes new tests for this feature `element_defaults` allows specifying e.g. initial magmoms/spins via the "magnetization" key for each element this PR also adds corresponding env vars for all CP2K specific `.pmgrc.yaml` keys: - `CP2K_DATA_DIR` - `DEFAULT_CP2K_FUNCTIONAL` - `DEFAULT_CP2K_BASIS_TYPE` - `DEFAULT_CP2K_AUX_BASIS_TYPE`
{ "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/4170/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/4170/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4170", "html_url": "https://github.com/materialsproject/pymatgen/pull/4170", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4170.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4170.patch", "merged_at": "2024-11-17T23:20:50Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4172
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4172/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4172/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4172/events
https://github.com/materialsproject/pymatgen/issues/4172
2,660,201,264
I_kwDOACgets6ej3Mw
4,172
10 tests error out because they fail to find some files
{ "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": "" } ]
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 @yurivict thanks for asking.\r\n\r\nLooks like you installed `pymatgen` in non-editable mode, **`pymatgen` doesn't include test files as package data**, so you have to get the test files (usually by cloning the repo), and use one of the two ways to make test files available:\r\n- Install `pymatgen` in editable mode from cloned repo, i.e. `python -m pip install -e /path/to/cloned_pymatgen_repo`\r\n- Use the environment variable `PMG_TEST_FILES_DIR` to point to test files if you don't want to install in editable mode \r\n\r\n", "PMG_TEST_FILES_DIR works, thanks!" ]
2024-11-14T22:17:26
2025-01-24T07:36:23
2025-01-24T07:36:21Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python-3.11 ### Pymatgen version 2024.11.13 ### Operating system version FreeBSD 14.1 ### Current behavior ``` ========================================================================================== ERRORS =========================================================================================== ___________________________________________________________ ERROR collecting tests/analysis/ferroelectricity/test_polarization.py ___________________________________________________________ analysis/ferroelectricity/test_polarization.py:23: in <module> structures = [Structure.from_file(f"{TEST_DIR}/{folder}/POSCAR") for folder in bto_folders] analysis/ferroelectricity/test_polarization.py:23: in <listcomp> structures = [Structure.from_file(f"{TEST_DIR}/{folder}/POSCAR") for folder in bto_folders] ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: in from_file with zopen(filename, mode="rt", errors="replace") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/vasp/fixtures/BTO_221_99_polarization/nonpolar_polarization/POSCAR' ___________________________________________________________________ ERROR collecting tests/analysis/xas/test_spectrum.py ____________________________________________________________________ analysis/xas/test_spectrum.py:17: in <module> with open(f"{TEST_DIR}/LiCoO2_k_xanes.json") as file: E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/analysis/spectrum_test/LiCoO2_k_xanes.json' __________________________________________________________________ ERROR collecting tests/entries/test_computed_entries.py __________________________________________________________________ entries/test_computed_entries.py:29: in <module> vasp_run = Vasprun(f"{VASP_OUT_DIR}/vasprun.xml.gz") ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: in __init__ with zopen(filename, mode="rt") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:47: in zopen return gzip.open(filename, *args, **kwargs) /usr/local/lib/python3.11/gzip.py:58: in open binary_file = GzipFile(filename, gz_mode, compresslevel) /usr/local/lib/python3.11/gzip.py:174: in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/vasp/outputs/vasprun.xml.gz' ______________________________________________________________________ ERROR collecting tests/io/feff/test_outputs.py _______________________________________________________________________ io/feff/test_outputs.py:11: in <module> class TestFeffLdos(TestCase): io/feff/test_outputs.py:14: in TestFeffLdos ldos = LDos.from_file(filepath1, filepath2) ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/io/feff/outputs.py:59: in from_file header_str = Header.header_string_from_file(feff_inp_file) ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/io/feff/inputs.py:249: in header_string_from_file with zopen(filename, mode="r") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/feff/feff.inp' ______________________________________________________________________ ERROR collecting tests/io/qchem/test_outputs.py ______________________________________________________________________ io/qchem/test_outputs.py:37: in <module> SINGLE_JOB_DICT = loadfn(f"{TEST_DIR}/single_job.json") /usr/local/lib/python3.11/site-packages/monty/serialization.py:70: in loadfn with zopen(fn, "rt") as fp: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/qchem/single_job.json' ___________________________________________________________________________ ERROR collecting tests/io/test_ase.py ___________________________________________________________________________ io/test_ase.py:18: in <module> STRUCTURE = Structure.from_file(f"{VASP_IN_DIR}/POSCAR") ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: in from_file with zopen(filename, mode="rt", errors="replace") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/vasp/inputs/POSCAR' ________________________________________________________________________ ERROR collecting tests/io/test_optimade.py _________________________________________________________________________ io/test_optimade.py:9: in <module> STRUCTURE = Structure.from_file(f"{VASP_IN_DIR}/POSCAR") ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: in from_file with zopen(filename, mode="rt", errors="replace") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/vasp/inputs/POSCAR' ___________________________________________________________________________ ERROR collecting tests/io/test_res.py ___________________________________________________________________________ io/test_res.py:15: in <module> @pytest.mark.parametrize("provider", [AirssProvider.from_file(res_coc, "strict")]) ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/io/res.py:433: in from_file return cls(ResParser._parse_file(filename), parse_rems) ../../stage/usr/local/lib/python3.11/site-packages/pymatgen/io/res.py:252: in _parse_file with zopen(filename, mode="r") as file: /usr/local/lib/python3.11/site-packages/monty/io.py:50: in zopen return open(filename, *args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/io/res/coc-115925-9326-14.res' __________________________________________________________ ERROR collecting tests/transformations/test_advanced_transformations.py __________________________________________________________ transformations/test_advanced_transformations.py:646: in <module> class TestSQSTransformationIcet(PymatgenTest): transformations/test_advanced_transformations.py:647: in TestSQSTransformationIcet stored_run: dict = loadfn(f"{TEST_FILES_DIR}/transformations/icet-sqs-fcc-Mg_75-Al_25-scaling_8.json.gz") /usr/local/lib/python3.11/site-packages/monty/serialization.py:70: in loadfn with zopen(fn, "rt") as fp: /usr/local/lib/python3.11/site-packages/monty/io.py:47: in zopen return gzip.open(filename, *args, **kwargs) /usr/local/lib/python3.11/gzip.py:58: in open binary_file = GzipFile(filename, gz_mode, compresslevel) /usr/local/lib/python3.11/gzip.py:174: in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/transformations/icet-sqs-fcc-Mg_75-Al_25-scaling_8.json.gz' ________________________________________________________________________ ERROR collecting tests/vis/test_plotters.py ________________________________________________________________________ vis/test_plotters.py:14: in <module> with open(f"{TEST_FILES_DIR}/analysis/spectrum_test/LiCoO2_k_xanes.json") as file: E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/science/py-pymatgen/work-py311/stage/usr/local/lib/python3.11/site-packages/../tests/files/analysis/spectrum_test/LiCoO2_k_xanes.json' ===================================================================================== warnings summary ====================================================================================== ../../../../../../local/lib/python3.11/site-packages/plotly/express/imshow_utils.py:24 /usr/local/lib/python3.11/site-packages/plotly/express/imshow_utils.py:24: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`. (Deprecated NumPy 1.24) np.bool8: (False, True), -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================================================================== short test summary info ================================================================================== SKIPPED [1] analysis/test_functional_groups.py:16: could not import 'openbabel': No module named 'openbabel' SKIPPED [1] electronic_structure/test_boltztrap2.py:27: No boltztrap2 SKIPPED [1] ext/test_matproj.py:44: MP API is down SKIPPED [1] io/test_babel.py:17: could not import 'openbabel.pybel': No module named 'openbabel' SKIPPED [1] io/test_openff.py:25: could not import 'openff.toolkit': No module named 'openff' SKIPPED [1] io/test_packmol.py:23: packmol executable not present SKIPPED [1] io/test_shengbte.py:9: could not import 'f90nml': No module named 'f90nml' SKIPPED [1] io/test_zeopp.py:20: zeo not installed SKIPPED [1] performance/test_import_time.py:32: ref time only comparable in CI runner SKIPPED [1] symmetry/test_kpath_hin.py:11: seekpath not installed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================================================================== 10 skipped, 1 warning, 10 errors in 19.15s ========================================================================= ``` ### Expected Behavior n/a ### Minimal example _No response_ ### Relevant files to reproduce this bug _No response_
{ "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 }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4172/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/4172/timeline
null
not_planned
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4173
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4173/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4173/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4173/events
https://github.com/materialsproject/pymatgen/issues/4173
2,660,422,036
I_kwDOACgets6ektGU
4,173
What's the correct way to use the `MAGMOM`'s value when using MP API data?
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/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
[ "@hongyi-zhao , this is more of an atomate2 question, but the critical thing here is that the line `flow = update_user_incar_settings(flow, incar_settings)` is not needed. The `MPGGADoubleRelaxMaker` is constructed to use MP's settings by default\r\n\r\nIf you want to use the magmoms from the MP structure as the starting values of MAGMOM, then having \"magmom\" in the structure's site_properties is sufficient, atomate2 will use those\r\n\r\nTo be explicit, I recommend just the following:\r\n```\r\nfrom mp_api.client import MPRester\r\nfrom atomate2.vasp.flows.mp import MPGGADoubleRelaxMaker\r\nfrom atomate2.vasp.powerups import update_user_potcar_functional\r\nfrom jobflow import run_locally\r\n\r\n# Set POTCAR functional\r\nuser_potcar_functional = \"PBE_64\"\r\n\r\n# Get structure from MP\r\nmaterial_id = \"mp-126\"\r\nwith MPRester() as mpr:\r\n structure = mpr.get_structure_by_material_id(material_id)\r\n\r\n# If you really need the conventional structure, then uncomment this line. Otherwise, this adds unnecessary compute cost\r\n#structure = structure.to_conventional()\r\n\r\nflow = MPGGADoubleRelaxMaker().make(structure)\r\n\r\n# Update POTCAR settings\r\nflow = update_user_potcar_functional(flow, user_potcar_functional)\r\n\r\n# Run the flow\r\nresponses = run_locally(flow, create_folders=True, ensure_success=True)\r\n```", "But, the above code will trigger several custodian errors:\r\n\r\n```python\r\n#$ pyenv shell datasci\r\n#$ module load vasp\r\n#$ ipython\r\nIn [1]: from mp_api.client import MPRester\r\n ...: from atomate2.vasp.flows.mp import MPGGADoubleRelaxMaker\r\n ...: from atomate2.vasp.powerups import update_user_potcar_functional\r\n ...: from jobflow import run_locally\r\n ...: \r\n ...: # Set POTCAR functional\r\n ...: user_potcar_functional = \"PBE_64\"\r\n ...: \r\n ...: # Get structure from MP\r\n ...: material_id = \"mp-126\"\r\n ...: with MPRester() as mpr:\r\n ...: structure = mpr.get_structure_by_material_id(material_id)\r\n ...: \r\n ...: # If you really need the conventional structure, then uncomment this line. Otherwise, this adds unnecessary compute cost\r\n ...: #structure = structure.to_conventional()\r\n ...: \r\n ...: flow = MPGGADoubleRelaxMaker().make(structure)\r\n ...: \r\n ...: # Update POTCAR settings\r\n ...: flow = update_user_potcar_functional(flow, user_potcar_functional)\r\n ...: \r\n ...: # Run the flow\r\n ...: responses = run_locally(flow, create_folders=True, ensure_success=True)\r\nRetrieving MaterialsDoc documents: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 13357.66it/s]\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py:288: BadInputSetWarning: Overriding the POTCAR functional is generally not recommended as it significantly affects the results of calculations and compatibility with other calculations done with the same input set. Note that some POTCAR symbols specified in the configuration file may not be available in the selected functional.\r\n warnings.warn(\r\n2024-12-20 09:20:02,603 INFO Started executing jobs locally\r\n2024-12-20 09:20:02,607 INFO Starting job - MP GGA relax 1 (1a81cdd6-3ab5-4165-aaf5-761fc4d7e45e)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py:757: BadInputSetWarning: Relaxation of likely metal with ISMEAR < 0 (-5). See VASP recommendations on ISMEAR for metals (https://www.vasp.at/wiki/index.php/ISMEAR).\r\n warnings.warn(\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2420: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2985: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(output_dir, key), mode=\"wt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:895: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"wt\") as file:\r\nERROR:custodian.custodian:IncorrectSmearingHandler\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\", errors=\"replace\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:895: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"wt\") as file:\r\nERROR:custodian.custodian:LargeSigmaHandler\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\", errors=\"replace\") as file:\r\n2024-12-20 09:21:04,335 INFO Finished job - MP GGA relax 1 (1a81cdd6-3ab5-4165-aaf5-761fc4d7e45e)\r\nINFO:jobflow.core.job:Finished job - MP GGA relax 1 (1a81cdd6-3ab5-4165-aaf5-761fc4d7e45e)\r\n2024-12-20 09:21:04,335 WARNING Response.stored_data is not supported with local manager.\r\nWARNING:jobflow.managers.local:Response.stored_data is not supported with local manager.\r\n2024-12-20 09:21:04,335 INFO Starting job - MP GGA relax 2 (d7b7f3fd-53a5-4dc3-9188-c2bdd1a6bfc5)\r\nINFO:jobflow.core.job:Starting job - MP GGA relax 2 (d7b7f3fd-53a5-4dc3-9188-c2bdd1a6bfc5)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/INCAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/OUTCAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/CONTCAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/vasprun.xml is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/WAVECAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/CHGCAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/POTCAR is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/atomate2/common/files.py:268: UserWarning: /home/werner/test/job_2024-12-20-01-21-04-335517-47956/KPOINTS is not gzipped, skipping...\r\n file_client.gunzip(directory / file, host=host, force=force)\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py:757: BadInputSetWarning: Relaxation of likely metal with ISMEAR < 0 (-5). See VASP recommendations on ISMEAR for metals (https://www.vasp.at/wiki/index.php/ISMEAR).\r\n warnings.warn(\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2420: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2985: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(output_dir, key), mode=\"wt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:895: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"wt\") as file:\r\nERROR:custodian.custodian:IncorrectSmearingHandler\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\", errors=\"replace\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:895: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"wt\") as file:\r\nERROR:custodian.custodian:LargeSigmaHandler\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:908: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/custodian/vasp/handlers.py:185: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(os.path.join(directory, self.output_filename), mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:1648: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2826: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:287: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:312: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/outputs.py:4356: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\") as fid:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/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\r\n with zopen(self.filename, mode=\"rt\") as file:\r\n/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/structure.py:3175: EncodingWarning: We strongly encourage explicit `encoding`, and we would use UTF-8 by default as per PEP 686\r\n with zopen(filename, mode=\"rt\", errors=\"replace\") as file:\r\n2024-12-20 09:21:56,255 INFO Finished job - MP GGA relax 2 (d7b7f3fd-53a5-4dc3-9188-c2bdd1a6bfc5)\r\nINFO:jobflow.core.job:Finished job - MP GGA relax 2 (d7b7f3fd-53a5-4dc3-9188-c2bdd1a6bfc5)\r\n2024-12-20 09:21:56,255 WARNING Response.stored_data is not supported with local manager.\r\nWARNING:jobflow.managers.local:Response.stored_data is not supported with local manager.\r\n2024-12-20 09:21:56,255 INFO Finished executing jobs locally\r\nINFO:jobflow.managers.local:Finished executing jobs locally\r\n```\r\nWhile [custodian](http://materialsproject.github.io/custodian/#practical-example-electronic-structure-calculations) provides automated error handling and parameter adjustments, initial reasonable parameter settings are still important for obtaining meaningful calculation results.\r\n\r\nSee https://github.com/Neraaz/HTESP/issues/2#issuecomment-2480883486 for more tests and comments by me.", "@hongyi-zhao, your job still runs successfully because of the changes made by custodian. The final results will still be meaningful because of those changes.\r\n\r\nYou can safely set `ISMEAR = 0` and `SIGMA = 0.05` as general defaults instead of the `MPRelaxSet`. This isn't a pymatgen bug\r\n\r\n@DanielYang59, these warnings about encoding from [monty #730](https://github.com/materialsvirtuallab/monty/pull/730) are a little disruptive. Can the default be to disable this, or at least explicitly set `utf-8` encoding in `loadfn`? We have so many places in the codebase where these warnings are getting thrown", "> these warnings about encoding from https://github.com/materialsvirtuallab/monty/pull/730 are a little disruptive. Can the default be to disable this,\r\n\r\nYou're absolutely correct, I should have used the `PYTHONWARNDEFAULTENCODING` from PEP 597 for consistency (don't display encoding warning until `PYTHONWARNDEFAULTENCODING` is set), sorry for the trouble.\r\n\r\n> at least explicitly set utf-8 encoding in loadfn\r\n\r\nI just had a quick looks and it looks like [`loadfn` already use UTF-8 in text mode](https://github.com/materialsvirtuallab/monty/blob/26acf0b2900b5074143ed64ccd1bdea6ba9f6705/src/monty/serialization.py#L70) and [`zopen` would not issue an encoding warning for binary mode](https://github.com/materialsvirtuallab/monty/blob/26acf0b2900b5074143ed64ccd1bdea6ba9f6705/src/monty/io.py#L82-L83), can you show me what triggered this warning?\r\n\r\n\r\n", "> @hongyi-zhao, your job still runs successfully because of the changes made by custodian. The final results will still be meaningful because of those changes.\r\n> \r\n> You can safely set `ISMEAR = 0` and `SIGMA = 0.05` as general defaults instead of the `MPRelaxSet`. This isn't a pymatgen bug\r\n\r\nFor certain types of computational tasks, such as elastic tensors, the small differences in the above parameters can make a big difference in the final result, as shown [here](https://github.com/Neraaz/HTESP/issues/2#issuecomment-2480883486).", "@DanielYang59: most instances of `zopen` in the codebase don't use binary mode. You can see in the warnings that it's coming from `pymatgen.io` - every VASP input and output object, like [POSCAR's `from_file`](https://github.com/materialsproject/pymatgen/blob/da607e86f9ce8aec942067c6c1a4fda6e04915dd/src/pymatgen/io/vasp/inputs.py#L288) use `zopen(<path>,\"rt\")`. Probably goes for every `pymatgen.io` module too", "@hongyi-zhao that's completely fair, but that's more of a scientific methodology question and not a pymatgen bug. FWIW, the experimental uncertainty in bulk moduli, especially after applying zero point corrections for the nuclear motion to better compare with zero-temperature DFT, can be on the order of 10 GPa if not more. The <10 GPa differences in your results is still less than the experimental uncertainty", "@esoteric-ephemera But I have another question here: for the example of [\"mp-126\"](https://next-gen.materialsproject.org/materials/mp-126), the following values are used in the `input` filed of MP's database: [`{'ISMEAR': 2, 'SIGMA': 0.14}`](https://github.com/Neraaz/HTESP/issues/2#issuecomment-2480883486), which is different from the final values automatically adjusted by [custodian](http://materialsproject.github.io/custodian/#practical-example-electronic-structure-calculations) in [my previous example](https://github.com/materialsproject/pymatgen/issues/4173#issuecomment-2556075556), as shown below:\r\n```\r\nwerner@x13dai-t:~/test$ ug -ri 'ismear|sigma' -g INCAR\r\njob_2024-12-20-01-21-04-335517-47956/INCAR:ISMEAR = 2\r\njob_2024-12-20-01-21-04-335517-47956/INCAR:SIGMA = 0.07321952854558407\r\njob_2024-12-20-01-20-02-605601-93060/INCAR:ISMEAR = 2\r\njob_2024-12-20-01-20-02-605601-93060/INCAR:SIGMA = 0.07102306201943624\r\n```\r\nHowever, the MP database involves a huge amount of computations, so how are detailed parameter adjustments like this achieved if they are not based on [custodian](http://materialsproject.github.io/custodian/#practical-example-electronic-structure-calculations)'s automatic adjustments?", "> most instances of zopen in the codebase don't use binary mode. \r\n\r\n@esoteric-ephemera Ah I got your point now so it's `zopen` instead of `loadfn` right? Don't worry about this then, it has been fixed by #4219, but was mistakenly reverted in #4221, would re-apply in #4222\r\n\r\nSorry for going astray in your thread @hongyi-zhao \r\n", "@DanielYang59 \r\n> Sorry for going astray in your thread @hongyi-zhao\r\n\r\nNo worries, I understand. We can continue discussing the topic, or feel free to bring up any other questions you might have. 😊", "@hongyi-zhao, since we add handlers to custodian over time, you might see different behavior in calculations run with a newer version of custodian. My guess is you're running a version of custodian that includes the `LargeSigmaHandler`, which checks to see if the electronic smearing pseudo-entropy is larger than 1 meV/atom, and reduces `SIGMA` if it is. That handler likely didn't exist when the MP calculation was performed" ]
2024-11-15T00:30:18
2024-12-24T00:40:02
2024-12-24T00:40:01Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The testing code below is adapted from my example [here](https://github.com/Neraaz/HTESP/issues/1#issuecomment-2451363600): ```python from mp_api.client import MPRester from pymatgen.symmetry.analyzer import SpacegroupAnalyzer from atomate2.vasp.flows.mp import MPGGADoubleRelaxMaker from atomate2.vasp.powerups import ( update_user_incar_settings, update_user_potcar_functional, ) from jobflow import run_locally # Set POTCAR functional user_potcar_functional = "PBE_64" # Get structure from MP material_id = "mp-126" with MPRester() as mpr: # First get the task id from the materials doc materials = mpr.materials.search(material_ids=[material_id], fields=["task_ids"]) task_id = materials[0].task_ids[0] # Now get the calculation that includes MAGMOM settings tasks = mpr.materials.tasks.search(task_ids=[task_id], fields=["input.incar", "calcs_reversed"]) # Get the INCAR settings from the calculation incar_settings = tasks[0].calcs_reversed[0].input.incar # Get the structure and convert to conventional cell structure = mpr.materials.get_structure_by_material_id(material_id) structure = SpacegroupAnalyzer(structure).get_conventional_standard_structure() # Convert MAGMOM list to dictionary format #if "MAGMOM" in incar_settings: # print("Original MAGMOM settings:", incar_settings["MAGMOM"]) # print("Number of sites in structure:", len(structure)) # # # Get unique species list # species_list = [site.species_string for site in structure] # unique_species = sorted(set(species_list)) # print("Unique species in structure:", unique_species) # # # Set all species to the first MAGMOM value from the original calculation # magmom_dict = {specie: incar_settings["MAGMOM"][0] for specie in unique_species} # incar_settings["MAGMOM"] = magmom_dict # print("MAGMOM dictionary:", magmom_dict) # Create a simple flow with just the relax flow = MPGGADoubleRelaxMaker().make(structure) # Update POTCAR settings flow = update_user_potcar_functional(flow, user_potcar_functional) # Update INCAR settings flow = update_user_incar_settings(flow, incar_settings) # Run the flow responses = run_locally(flow, create_folders=True, ensure_success=True) ``` But the above code will trigger the following error: ```python Retrieving MaterialsDoc documents: 100%|████████████████████████████████| 1/1 [00:00<00:00, 12865.96it/s] Retrieving TaskDoc documents: 100%|█████████████████████████████████████| 1/1 [00:00<00:00, 11715.93it/s] Retrieving MaterialsDoc documents: 100%|████████████████████████████████| 1/1 [00:00<00:00, 11848.32it/s] /home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py:288: BadInputSetWarning: Overriding the POTCAR functional is generally not recommended as it significantly affects the results of calculations and compatibility with other calculations done with the same input set. Note that some POTCAR symbols specified in the configuration file may not be available in the selected functional. warnings.warn( 2024-11-10 08:41:06,924 INFO Started executing jobs locally 2024-11-10 08:41:06,926 INFO Starting job - MP GGA relax 1 (ecdb12aa-5e73-4d2b-97b3-d6deb29ce066) 2024-11-10 08:41:06,928 INFO MP GGA relax 1 failed with exception: Traceback (most recent call last): File "/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/jobflow/managers/local.py", line 114, in _run_job response = job.run(store=store) ^^^^^^^^^^^^^^^^^^^^ File "/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/jobflow/core/job.py", line 600, in run response = function(*self.function_args, **self.function_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/werner/Public/repo/github.com/materialsproject/atomate2.git/src/atomate2/vasp/jobs/base.py", line 219, in make write_vasp_input_set( File "/home/werner/Public/repo/github.com/materialsproject/atomate2.git/src/atomate2/vasp/files.py", line 190, in write_vasp_input_set vis = input_set_generator.get_input_set( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py", line 476, in get_input_set incar=self.incar, ^^^^^^^^^^ File "/home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py", line 572, in incar if uic_magmom := self.user_incar_settings.get("MAGMOM", {}).get(site.species_string): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'list' object has no attribute 'get' 2024-11-10 08:41:06,928 INFO Finished executing jobs locally --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[6], line 56 53 flow = update_user_incar_settings(flow, incar_settings) 55 # Run the flow ---> 56 responses = run_locally(flow, create_folders=True, ensure_success=True) File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/jobflow/managers/local.py:181, in run_locally(flow, log, store, create_folders, root_dir, ensure_success, allow_external_references, raise_immediately) 178 logger.info("Finished executing jobs locally") 180 if ensure_success and not finished_successfully: --> 181 raise RuntimeError("Flow did not finish running successfully") 183 return dict(responses) RuntimeError: Flow did not finish running successfully ``` Is there a proper way to handle `MAGMOM` settings when copying from MP calculations without requiring further user adjustment, say, the one done by the code snippet `Convert MAGMOM list to dictionary format` shown above? See https://github.com/materialsproject/atomate2/issues/1049 for the related discussion. Regards, Zhao
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4173/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/4173/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4174
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4174/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4174/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4174/events
https://github.com/materialsproject/pymatgen/pull/4174
2,660,727,071
PR_kwDOACgets6B_4De
4,174
Clean up `CONTRIBUTING.md` docs and change `_is_named_isotope` `getattr` default value
{ "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-15T04:44:54
2024-11-16T02:38:51
2024-11-15T16:56:37Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
- [I believe this would not be breaking] The default value as `False` over `None` might be more conventional (we [should not use truthy to check `None`](https://docs.quantifiedcode.com/python-anti-patterns/readability/comparison_to_none.html)): ```diff # When the `_is_named_isotope` doesn't have `_is_named_isotope`, # we're effectively checking `if None` - if getattr(obj, "_is_named_isotope", None): + if getattr(obj, "_is_named_isotope", False): ``` - Recommend Google Style Docstring in `CONTRIBUTING.md` - Clarify usage of `PMG_TEST_FILES_DIR` when running unit test - Fix internal indexes
{ "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/4174/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/4174/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4174", "html_url": "https://github.com/materialsproject/pymatgen/pull/4174", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4174.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4174.patch", "merged_at": "2024-11-15T16:56:37Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4175
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4175/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4175/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4175/events
https://github.com/materialsproject/pymatgen/pull/4175
2,661,910,195
PR_kwDOACgets6CC3XH
4,175
Cleanup `codespell` ignore patterns
{ "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! Currently `codespell` doesn't seem to support block/file level support with pattern, I would update once they do." ]
2024-11-15T13:08:39
2024-11-16T13:40:42
2024-11-16T13:37:02Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Cleanup `codespell` ignore patterns Currently a lot of global ignore patterns are very specific to a certain module (or even one line), there's no good reason to ignore a pattern globally for such cases. Admittedly it will be a balance between convenience (no one want to insert a `# codespell:ignore` tag every line) and correctness (some patterns are very specific to few lines across the code base, but are real typos elsewhere, like `lamda/coul`, do note). Changes: - Keep the global pattern when it's very common: Elements like `Nd/Te`, or very common for a commonly used module, `TITEL` for VASP for example, or our good friend `atomate` - Rename some internal/test variables **when it's not breaking** (usually increase readability) - Ignore all JSON files as comments are not allowed in JSON, we might safely assume everything is intended in JSON ### Follow up - [ ] Is it possible to add file-specific ignore tags (for example ignore `ontop` for `adsorption.py`, or `coul` for `LAMMPS`)? Currently [`codespell` seems to provide block-level ignore tag](https://github.com/codespell-project/codespell/issues/3381) but doesn't take a pattern
{ "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/4175/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/4175/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4175", "html_url": "https://github.com/materialsproject/pymatgen/pull/4175", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4175.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4175.patch", "merged_at": "2024-11-16T13:37:02Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4176
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4176/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4176/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4176/events
https://github.com/materialsproject/pymatgen/pull/4176
2,663,041,098
PR_kwDOACgets6CFrX4
4,176
Change XAS behavior under negative frequencies
{ "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
[ "Thanks @esoteric-ephemera, appreciate the context with the matsci.org thread too", "Thanks." ]
2024-11-15T20:31:54
2024-11-18T18:15:42
2024-11-18T13:35:12Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
The XAS spectrum class used to not throw a `ValueError` when more than 5% of the user-input intensities are non-positive (cverified this was still the behavior as of v2020.4.29). More, the warning that is thrown is misleading, as it suggests that the majority of intensities are non-positive. This change in behavior has led to issues with MP's API users, see [here for an example](https://matsci.org/t/avoiding-value-error-double-check-the-intensities-most-of-them-are-nonpositive/58748/2) Changed this to throw a warning only when more than 5% of the intensities are ***negative***. Zero intensity shouldn't be penalized since this is physical (there's no absorption in that range, e.g. if a transition is forbidden) Also added an option to zero out negative intensities (false by default)
{ "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/4176/reactions", "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4176/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4176", "html_url": "https://github.com/materialsproject/pymatgen/pull/4176", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4176.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4176.patch", "merged_at": "2024-11-18T13:35:12Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4177
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4177/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4177/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4177/events
https://github.com/materialsproject/pymatgen/pull/4177
2,663,126,677
PR_kwDOACgets6CF01i
4,177
Modify FHI-aims inputs to not use species string
{ "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
[ "@ansobolev Does this work for your things?", "@tpurcell90 This seems to work for the defect workflow, thanks; however, as aims accepts anything in the `species` line (it's just a label), I would rather use something like `site.label` for site description in `geometry.in`. This will allow more precise accounting for species defaults in heterogeneous calculations (something like adsorbate on the surface). But that's for sure open for discussion and not the blocking issue. ", "FHI-aims can accept an arbitrary label, but pymatgen requires a `CompositionLike` or `SpeciesLike` object for species, which requires an element to be present from what I can tell.\r\n\r\nI think this is ready for review.", "For writing `geometry.in` pymatgen perspective does not matter, as the file is intended for FHI-aims; when reading the element can be defined by species defaults in `control.in`, or element can be explicitly included (like `site.element_site.label`) in the species label.", "ready for review", "Thanks.", "would it be possible to make a release with this soon? We need this fix for atomate2" ]
2024-11-15T20:59:32
2024-12-11T20:31:24
2024-12-11T14:46:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
FHI-aims does not read spin from the species and that causes issues with magnetic calculations ## Summary Major changes: - fix 1: Don't use species_string for FHI-aims ## 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/4177/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/4177/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4177", "html_url": "https://github.com/materialsproject/pymatgen/pull/4177", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4177.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4177.patch", "merged_at": "2024-12-11T14:46:30Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4179
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4179/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4179/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4179/events
https://github.com/materialsproject/pymatgen/issues/4179
2,665,152,831
I_kwDOACgets6e2wE_
4,179
The inappropriate warnning info for `update_user_incar_settings`.
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/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
[ "Hey Zhao,\r\nCould you elaborate a little bit why exactly this warning is inappropriate? ", "I mean, this warning should be triggered by something like [`update_user_potcar_functional`](https://materialsproject.github.io/atomate2/reference/atomate2.vasp.powerups.update_user_potcar_functional.html#update-user-potcar-functional) instead of [`update_user_incar_settings`](https://materialsproject.github.io/atomate2/reference/atomate2.vasp.powerups.update_user_incar_settings.html#update-user-incar-settings).", "Can you move this over to atomate2 with a complete code snippet? I don't think this is a pymatgen issue" ]
2024-11-17T02:11:24
2024-11-19T07:05:02
2024-11-19T07:05:02Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
When I tested an atomate2 flow, I noticed the following information: ```shell In [7]: flow = update_user_incar_settings(flow, { 'ALGO': 'Normal', 'EDIFF': 1e-06, 'ENCUT':700}) /home/werner/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/io/vasp/sets.py:288: BadInputSetWarning: Overriding the POTCAR functional is generally not recommended as it significantly affects the results of calculations and compatibility with other calculations done with the same input set. Note that some POTCAR symbols specified in the configuration file may not be available in the selected functional. warnings.warn( ``` This is an inappropriate warning message. Because I update INCAR here, the warning is indeed related to POTCAR. Regards, Zhao
{ "login": "hongyi-zhao", "id": 11155854, "node_id": "MDQ6VXNlcjExMTU1ODU0", "avatar_url": "https://avatars.githubusercontent.com/u/11155854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hongyi-zhao", "html_url": "https://github.com/hongyi-zhao", "followers_url": "https://api.github.com/users/hongyi-zhao/followers", "following_url": "https://api.github.com/users/hongyi-zhao/following{/other_user}", "gists_url": "https://api.github.com/users/hongyi-zhao/gists{/gist_id}", "starred_url": "https://api.github.com/users/hongyi-zhao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hongyi-zhao/subscriptions", "organizations_url": "https://api.github.com/users/hongyi-zhao/orgs", "repos_url": "https://api.github.com/users/hongyi-zhao/repos", "events_url": "https://api.github.com/users/hongyi-zhao/events{/privacy}", "received_events_url": "https://api.github.com/users/hongyi-zhao/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4179/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/4179/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4180
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4180/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4180/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4180/events
https://github.com/materialsproject/pymatgen/pull/4180
2,665,344,550
PR_kwDOACgets6CJYFN
4,180
[Breaking/Fix] Skip isotopes when iterating through `core.Element`
{ "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 agree isotopes shouldn't appear as part of default behavior.", "That was an oversight on my part, thanks for the fix! Also agree that enumerating over elements shouldn't list isotopes. Maybe adding a method to `Element` to show people which isotopes are available would be useful tho?", "> That was an oversight on my part, thanks for the fix!\r\n\r\nNo problem at all, cannot blame anyone, it's the test that is missing, together we improve test coverage :)\r\n\r\n> Maybe adding a method to Element to show people which isotopes are available would be useful tho?\r\n\r\nFair point, is current implementation looking good to you @esoteric-ephemera (I don't have much experience overwriting an `Enum` so not sure if there's any pitfall like [builtin `dict/list/...`](https://docs.python.org/3/library/collections.html#module-collections), **do review with a pinch of salt**)?\r\n```python\r\nElement.named_isotopes # ---> (Element.D, Element.T)\r\n```\r\n\r\n\r\n", "@janosh I believe you're very experienced with `Enum` (while I'm not), perhaps you could help me double-check the implementation?" ]
2024-11-17T06:14:48
2025-01-10T02:27:51
2025-01-09T20:38:24Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Skip isotopes when iterating through `core.Element`, to fix #4178, rationale: - I might expect looping through `Element` to behave similarly to looping through the periodic table, i.e. isotopes should not sneak in here, do you like this idea @esoteric-ephemera? - Implementation based on https://docs.python.org/3/library/enum.html: > EnumType is responsible for setting the correct __repr__(), __str__(), __format__(), and __reduce__() methods on the final enum, as well as creating the enum members, properly handling duplicates, providing iteration over the enum class, etc. - Add `property` `Element.named_isotopes` for all named_isotopes so far. - Clean up `core.periodic_table` docstring (remove non-existent `PeriodicTable` class). This **would be a breaking change** (also might be called a fix), so comments are hugely appreciated. --- ```python from pymatgen.core import Element for idx, ele in enumerate(Element): print(idx, ele) ``` ### Before ``` 0 H 1 H # Deuterium 2 H # Tritium 3 He 4 Li 5 Be 6 B 7 C ...... ``` ### Now (nothing special, just skip isotopes of hydrogen) ``` 0 H 1 He 2 Li 3 Be 4 B 5 C ...... ```
{ "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/4180/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/4180/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4180", "html_url": "https://github.com/materialsproject/pymatgen/pull/4180", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4180.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4180.patch", "merged_at": "2025-01-09T20:38:24Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4181
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4181/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4181/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4181/events
https://github.com/materialsproject/pymatgen/pull/4181
2,665,774,227
PR_kwDOACgets6CJ5Gy
4,181
Fix incorrect comparison logic and update tests
{ "login": "naik-aakash", "id": 91958822, "node_id": "U_kgDOBXsuJg", "avatar_url": "https://avatars.githubusercontent.com/u/91958822?v=4", "gravatar_id": "", "url": "https://api.github.com/users/naik-aakash", "html_url": "https://github.com/naik-aakash", "followers_url": "https://api.github.com/users/naik-aakash/followers", "following_url": "https://api.github.com/users/naik-aakash/following{/other_user}", "gists_url": "https://api.github.com/users/naik-aakash/gists{/gist_id}", "starred_url": "https://api.github.com/users/naik-aakash/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/naik-aakash/subscriptions", "organizations_url": "https://api.github.com/users/naik-aakash/orgs", "repos_url": "https://api.github.com/users/naik-aakash/repos", "events_url": "https://api.github.com/users/naik-aakash/events{/privacy}", "received_events_url": "https://api.github.com/users/naik-aakash/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
[ "@naik-aakash could you add a few more tests here next week (not today) and make sure it is working as intended? ", "> @naik-aakash could you add a few more tests here next week (not today) and make sure it is working as intended?\r\n\r\nSure can do this 😄 ", "Forgive me, I'm going slightly off-topic again (Haoyu the topic wanderer), perhaps also replace the tolerance (`limit_deviation`) with more readable scientific notation? https://github.com/materialsproject/pymatgen/blob/c72c9e93ca5922f8fbd1d0e0bb385cfc1ae26420/tests/io/lobster/test_outputs.py#L1545-L1604\r\n\r\nAlso perhaps separate the tests of `has_good_quality_maxDeviation` and `has_good_quality_check_occupied_bands` into two separate test methods? (I guess they're independent right?)", "> Forgive me, I'm going slightly off-topic again, perhaps also replace the tolerance (`limit_deviation`) with more readable scientific notation?\r\n> \r\n> https://github.com/materialsproject/pymatgen/blob/c72c9e93ca5922f8fbd1d0e0bb385cfc1ae26420/tests/io/lobster/test_outputs.py#L1545-L1604\r\n> \r\n> Also perhaps separate the tests of `has_good_quality_maxDeviation` and `has_good_quality_check_occupied_bands` into two separate test methods? (I guess they're independent right?)\r\n\r\nHow about renaming `limit_deviation` to `identity_deviation_tol` ? Does this make it more readable scientific notation ?\r\n\r\nAnd regarding your second request, yes they are independent and thus have been seperated now in the tests.", "> How about renaming limit_deviation to identitiy_deviation_tol ? Does this make it more readable scientific notation ?\r\n\r\nSorry I was trying to say replace values like `0.000001` with `1e-6`, renaming `limit_deviation` might be breaking I'm afraid (`has_good_quality_check_occupied_bands` is public right)?\r\n\r\n> And regarding your second request, yes they are independent and thus have been seperated now in the tests.\r\n\r\nThanks for the quick change!", "> `has_good_quality_check_occupied_bands`\r\n\r\nAhh okay got what you meant. Was not clear to me it referred to numeric values and not vairable naming and Yess it is public, thus will lead to a breaking change. ", "Thanks." ]
2024-11-17T11:42:37
2024-11-18T13:33:03
2024-11-18T13:32:58Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Closes #4166 ## Changes Based on the suggestions form @QuantumChemist ( https://github.com/materialsproject/pymatgen/issues/4166#issuecomment-2480508677) and @DanielYang59 (https://github.com/materialsproject/pymatgen/issues/4166#issuecomment-2480925279) , the code has been fixed to correctly evaluate whether the matrix values are above threshold and tests have been updated accordingly # Todo - [x] Add 1 or 2 more test cases
{ "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/4181/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 2, "eyes": 0 }
https://api.github.com/repos/materialsproject/pymatgen/issues/4181/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4181", "html_url": "https://github.com/materialsproject/pymatgen/pull/4181", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4181.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4181.patch", "merged_at": "2024-11-18T13:32:58Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4182
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4182/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4182/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4182/events
https://github.com/materialsproject/pymatgen/pull/4182
2,667,807,957
PR_kwDOACgets6CN32z
4,182
Moved NUPDOWN from int_keys to float_keys
{ "login": "benjaminchen22", "id": 22546766, "node_id": "MDQ6VXNlcjIyNTQ2NzY2", "avatar_url": "https://avatars.githubusercontent.com/u/22546766?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benjaminchen22", "html_url": "https://github.com/benjaminchen22", "followers_url": "https://api.github.com/users/benjaminchen22/followers", "following_url": "https://api.github.com/users/benjaminchen22/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminchen22/gists{/gist_id}", "starred_url": "https://api.github.com/users/benjaminchen22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminchen22/subscriptions", "organizations_url": "https://api.github.com/users/benjaminchen22/orgs", "repos_url": "https://api.github.com/users/benjaminchen22/repos", "events_url": "https://api.github.com/users/benjaminchen22/events{/privacy}", "received_events_url": "https://api.github.com/users/benjaminchen22/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." ]
2024-11-18T09:31:09
2024-11-18T13:32:23
2024-11-18T13:32:20Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary `NUPDOWN` key in Incar can be set to floating point values in VASP (see https://gitlab.com/ase/ase/-/merge_requests/2580). However, it is current treated as an int in `Incar.proc_val`. This PR treats `NUPDOWN` as a float instead. - [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/4182/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/4182/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4182", "html_url": "https://github.com/materialsproject/pymatgen/pull/4182", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4182.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4182.patch", "merged_at": "2024-11-18T13:32:20Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4183
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4183/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4183/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4183/events
https://github.com/materialsproject/pymatgen/pull/4183
2,669,753,719
PR_kwDOACgets6CS7tW
4,183
Compositions from weight str
{ "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. Merged." ]
2024-11-18T20:07:06
2024-11-18T20:46:36
2024-11-18T20:41:04Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Often in alloy literature we get composition strings given in weight rather than molar quantities. This PR extends upon the `from_weight_dict` method to give a more general `from_weights` method that will take strings as well as CompositionLike
{ "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/4183/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/4183/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4183", "html_url": "https://github.com/materialsproject/pymatgen/pull/4183", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4183.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4183.patch", "merged_at": "2024-11-18T20:41:04Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4184
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4184/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4184/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4184/events
https://github.com/materialsproject/pymatgen/issues/4184
2,672,573,651
I_kwDOACgets6fTDzT
4,184
Default values replace the custom input ones in MagneticStructureEnumerator
{ "login": "fraricci", "id": 17427517, "node_id": "MDQ6VXNlcjE3NDI3NTE3", "avatar_url": "https://avatars.githubusercontent.com/u/17427517?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fraricci", "html_url": "https://github.com/fraricci", "followers_url": "https://api.github.com/users/fraricci/followers", "following_url": "https://api.github.com/users/fraricci/following{/other_user}", "gists_url": "https://api.github.com/users/fraricci/gists{/gist_id}", "starred_url": "https://api.github.com/users/fraricci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fraricci/subscriptions", "organizations_url": "https://api.github.com/users/fraricci/orgs", "repos_url": "https://api.github.com/users/fraricci/repos", "events_url": "https://api.github.com/users/fraricci/events{/privacy}", "received_events_url": "https://api.github.com/users/fraricci/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-19T15:32:22
2025-02-18T17:14:30
2025-02-18T17:14:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
I think there is a bug in this line https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/analysis/magnetism/analyzer.py#L657 The update method will overwrite the values in the keys of the 'transformation_kwargs' coming from the input, e.g. timeout cannot be changed because of this. ``` transformation_kwargs={"timeout":1} default_transformation_kwargs = {"check_ordered_symmetry": False, "timeout": 5} transformation_kwargs = transformation_kwargs or {} print(transformation_kwargs) transformation_kwargs.update(default_transformation_kwargs) print(transformation_kwargs) : {'timeout': 1} : {'timeout': 5, 'check_ordered_symmetry': False} ```
{ "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/4184/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/4184/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4185
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4185/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4185/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4185/events
https://github.com/materialsproject/pymatgen/issues/4185
2,675,649,523
I_kwDOACgets6feyvz
4,185
Timeout in MagneticStructureEnumerator (and EnumlibAdaptor) does not work
{ "login": "fraricci", "id": 17427517, "node_id": "MDQ6VXNlcjE3NDI3NTE3", "avatar_url": "https://avatars.githubusercontent.com/u/17427517?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fraricci", "html_url": "https://github.com/fraricci", "followers_url": "https://api.github.com/users/fraricci/followers", "following_url": "https://api.github.com/users/fraricci/following{/other_user}", "gists_url": "https://api.github.com/users/fraricci/gists{/gist_id}", "starred_url": "https://api.github.com/users/fraricci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fraricci/subscriptions", "organizations_url": "https://api.github.com/users/fraricci/orgs", "repos_url": "https://api.github.com/users/fraricci/repos", "events_url": "https://api.github.com/users/fraricci/events{/privacy}", "received_events_url": "https://api.github.com/users/fraricci/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-11-20T11:58:29
2025-02-18T17:11:31
2025-02-18T17:11:30Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.11.5 ### Pymatgen version 2024.11.13 ### Operating system version _No response_ ### Current behavior `enum = MagneticStructureEnumerator(structure)` should stop after 5 minutes by default, but it does not. Passing a different timeout does not change anything. I'm now making sure that the timeout arg is passed to the EnumlibAdaptor (see bug in #4184). I did some tests but I could not figure out why the enum.x process does not get killed. The main logic from https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/command_line/enumlib_caller.py#L281 is here: ``` def _run_multienum(self): with subprocess.Popen([enum_cmd], stdout=subprocess.PIPE, stdin=subprocess.PIPE, close_fds=True) as process: if self.timeout: timed_out = False timer = Timer(self.timeout*60, lambda p: p.kill(), [process]) try: timer.start() output = process.communicate()[0].decode("utf-8") finally: if not timer.is_alive(): timed_out = True timer.cancel() if timed_out: raise TimeoutError("Enumeration took too long") else: output = process.communicate()[0].decode("utf-8") ``` It seems the the process stops communicating. I tried to use the timeout argument of the `process.communicate()` method but it does not work neither. One thing that worked correctly is the same code above with enum_cmd="/usr/bin/sleep 6000". This process gets killed as it should. I have the same behavior both in my laptop and on perlmutter. Any thoughts about what's causing this? ### Expected Behavior `enum = MagneticStructureEnumerator(structure)` should stop after 5 minutes by default. ### 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/4185/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/4185/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4186
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4186/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4186/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4186/events
https://github.com/materialsproject/pymatgen/issues/4186
2,676,344,486
I_kwDOACgets6fhcam
4,186
CP2K input set creation (error with basis set/potential finding for given structure)
{ "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
[ "I should add that I am using an older Pymatgen and older CP2K but this is the exact same error with newest Pymatgen and newest CP2K data directory." ]
2024-11-20T15:48:22
2024-11-20T15:49:42
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version 3.12 ### Pymatgen version v2024.9.17.1 ### Operating system version MacOSX ### Current behavior Git clone cp2k v2022 for the data directory Performed pmg config --cp2k /path/to/cp2k/data /path/to/pmg/cp2kdata Doing any compounds mixed with In, O as species gives this error (also with other composition) while doing the elements alone do not give rise to any errors. I attached the process basis set/potentials file from the pmg config --cp2k for In, O as example. ### Expected Behavior ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[28], line 1 ----> 1 RelaxSet(structure=Structure([[4,0,0],[0,4,0],[0,0,4]],['In','O',],[[0,0,0,],[0,0,2],], coords_are_cartesian=True)) File [~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py:1423](http://localhost:8889/lab/workspaces/auto-U/tree/dev/scratch/~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py#line=1422), in RelaxSet.__init__(self, **kwargs) 1422 def __init__(self, **kwargs) -> None: -> 1423 super().__init__(run_type="GEO_OPT", **kwargs) 1424 self.activate_motion() File [~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py:296](http://localhost:8889/lab/workspaces/auto-U/tree/dev/scratch/~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py#line=295), in DftSet.__init__(self, structure, project_name, basis_and_potential, element_defaults, xc_functionals, multiplicity, ot, energy_gap, qs_method, eps_default, eps_scf, max_scf, minimizer, preconditioner, algorithm, linesearch, rotation, occupation_preconditioner, cutoff, rel_cutoff, ngrids, progression_factor, override_default_params, wfn_restart_file_name, kpoints, smearing, cell, **kwargs) 293 scf["MAX_DIIS"] = Keyword("MAX_DIIS", 15) 295 # Get basis, potential, and XC info --> 296 self.basis_and_potential = DftSet.get_basis_and_potential(self.structure, self.basis_and_potential) 297 self.basis_set_file_names = self.basis_and_potential.get("basis_filenames", ()) 298 self.potential_file_name = self.basis_and_potential.get("potential_filename") File [~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py:574](http://localhost:8889/lab/workspaces/auto-U/tree/dev/scratch/~/dev/pymatgen/src/pymatgen/io/cp2k/sets.py#line=573), in DftSet.get_basis_and_potential(structure, basis_and_potential, cp2k_data_dir) 572 pfn2 = getattr(potential, "filename", None) 573 if pfn1 and pfn2 and pfn1 != pfn2: --> 574 raise ValueError( 575 "Provided potentials have more than one corresponding file." 576 "CP2K does not support multiple potential filenames" 577 ) 578 data["potential_filename"] = pfn2 580 data[el] = {"basis": basis, "aux_basis": aux_basis, "potential": potential} ValueError: Provided potentials have more than one corresponding file.CP2K does not support multiple potential filenames ``` ### Minimal example ```Python from pymatgen.core import Structure from pymatgen.io.cp2k.sets import RelaxSet RelaxSet(structure=Structure([[4,0,0],[0,4,0],[0,0,4]],['In',],[[0,0,0,]],], coords_are_cartesian=True)) # works well RelaxSet(structure=Structure([[4,0,0],[0,4,0],[0,0,4]],['In','O',],[[0,0,0,],[0,0,2],], coords_are_cartesian=True)) # does not work ``` ### Relevant files to reproduce this bug [Archive.zip](https://github.com/user-attachments/files/17833141/Archive.zip)
{ "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/4186/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/4186/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4187
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4187/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4187/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4187/events
https://github.com/materialsproject/pymatgen/pull/4187
2,680,993,344
PR_kwDOACgets6Cut2P
4,187
Addition of "valences" property to ElementBase and Species for mixed-valence ions
{ "login": "benrich37", "id": 76569522, "node_id": "MDQ6VXNlcjc2NTY5NTIy", "avatar_url": "https://avatars.githubusercontent.com/u/76569522?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benrich37", "html_url": "https://github.com/benrich37", "followers_url": "https://api.github.com/users/benrich37/followers", "following_url": "https://api.github.com/users/benrich37/following{/other_user}", "gists_url": "https://api.github.com/users/benrich37/gists{/gist_id}", "starred_url": "https://api.github.com/users/benrich37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benrich37/subscriptions", "organizations_url": "https://api.github.com/users/benrich37/orgs", "repos_url": "https://api.github.com/users/benrich37/repos", "events_url": "https://api.github.com/users/benrich37/events{/privacy}", "received_events_url": "https://api.github.com/users/benrich37/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
[ "closing this until I make those fixes" ]
2024-11-21T21:23:22
2024-12-12T22:47:18
2024-11-26T22:47:19Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Note: This code change is **no longer required for #4078** and the `valences` property does **not** return `(idx, ne)` for every valence subshell but only **every partially filled valence subshell** (unless all subshells are filled, which causes only the last subshell to be returned). I don't see a use for this criteria, so I will fix this to behave as intended. I am also okay with letting this PR be closed and abandoned since it is no longer needed for #4078. Major changes: - feature 1: For both ElementBase and Species class, the code within the "valence" property was copy-pasted into a new "valences" property, with the error raised for ambiguous valence (more than one valence subshell) removed (`if len(valence) > 1: raise ValueError(f"{self} has ambiguous valence")`) and return signature changed from `tuple[int | np.nan, int]` to `list[tuple[int | np.nan, int]]` (`return valence` instead of `return valence[0]`) - fix 1: To remove redundancy, the "valence" property for `ElementBase` and `Species` was re-written to raise the ambiguous valence ValueError if `len(self.valences) > 1`, and otherwise return `self.valences[0]` ## TODO - Loosen return criteria for `valences` to return all valence subshells while maintaining selectivity of `valence`
{ "login": "benrich37", "id": 76569522, "node_id": "MDQ6VXNlcjc2NTY5NTIy", "avatar_url": "https://avatars.githubusercontent.com/u/76569522?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benrich37", "html_url": "https://github.com/benrich37", "followers_url": "https://api.github.com/users/benrich37/followers", "following_url": "https://api.github.com/users/benrich37/following{/other_user}", "gists_url": "https://api.github.com/users/benrich37/gists{/gist_id}", "starred_url": "https://api.github.com/users/benrich37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benrich37/subscriptions", "organizations_url": "https://api.github.com/users/benrich37/orgs", "repos_url": "https://api.github.com/users/benrich37/repos", "events_url": "https://api.github.com/users/benrich37/events{/privacy}", "received_events_url": "https://api.github.com/users/benrich37/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4187/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/4187/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4187", "html_url": "https://github.com/materialsproject/pymatgen/pull/4187", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4187.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4187.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4188
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4188/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4188/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4188/events
https://github.com/materialsproject/pymatgen/issues/4188
2,681,078,401
I_kwDOACgets6fzgKB
4,188
Poscar.get_str() cartesian vs direct coords
{ "login": "Mikluki", "id": 73247573, "node_id": "MDQ6VXNlcjczMjQ3NTcz", "avatar_url": "https://avatars.githubusercontent.com/u/73247573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Mikluki", "html_url": "https://github.com/Mikluki", "followers_url": "https://api.github.com/users/Mikluki/followers", "following_url": "https://api.github.com/users/Mikluki/following{/other_user}", "gists_url": "https://api.github.com/users/Mikluki/gists{/gist_id}", "starred_url": "https://api.github.com/users/Mikluki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Mikluki/subscriptions", "organizations_url": "https://api.github.com/users/Mikluki/orgs", "repos_url": "https://api.github.com/users/Mikluki/repos", "events_url": "https://api.github.com/users/Mikluki/events{/privacy}", "received_events_url": "https://api.github.com/users/Mikluki/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
[ "Erm, I am not sure what you mean. I don't think you can use 0, 0, 0 as the example. Those coordinates are the same whether in direct or cartesian coords by definition. Also, your code is confusing because your comment says \"Position of the atom in Cartesian coordinates\" and yet you set `coords_are_cartesian` to False. Those are contradictory.\r\n\r\nYou will need to show an example where the Cartesian coords lead to the wrong direct coordinates. The Poscar always write direct coordinates by default because that is usually the way people define coordinates in crystals. But you can set cartesian output if you'd like.", "My bad, I double checked it, everything works as expected. Gotta remember not to submit issues late in the night." ]
2024-11-21T21:46:19
2025-03-13T19:32:40
2025-03-13T19:32:39Z
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
First of all, thank you for this incredible library! ### Python version Python 3.12.7 ### Pymatgen version 2024.11.13 ### Operating system version Pop!_OS 22.04 LTS ### Current behavior **Steps to reproduce** - define structure in cartesian coords - create Poscar object from structure - wirte poscar to file -⚡ POSCAR file contains __cartesian coords__ with a vasp flag `direct` -⚡ POSCAR `__repr__` & `__str__` show `direct` coords. ### Expected Behavior - POSCAR file contains cartesian coords with a vasp flag `cartesian` - POSCAR `__repr__` & `__str__` shows `cartesian` coords. ### Additional info Imho, this is a contrintuitive behavior. In order for this to work one should explicitly call `poscar.write_file()` with `direct=False` argument: `poscar.write_file("POSCAR", direct=False)`. However, it will not affect `__repr__` & `__str__` behavior. Reason being: `direct` property is not passed to dunder methods, but is overwritten by default `get_str` declaration. https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/io/vasp/inputs.py#L158-L163 https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/io/vasp/inputs.py#L565-L570 https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/io/vasp/inputs.py#L656-L661 ### Minimal example ```Python from pymatgen.io.vasp import Poscar from pymatgen.core import Structure, Lattice lattice = Lattice.cubic(10.0) species = ["Al"] # Single aluminum atom coords = [[0, 0, 0]] # Position of the atom in Cartesian coordinates structure = Structure( lattice, species, coords, coords_are_cartesian=False, ) poscar = Poscar(structure) poscar.write_file("POSCAR") ```
{ "login": "Mikluki", "id": 73247573, "node_id": "MDQ6VXNlcjczMjQ3NTcz", "avatar_url": "https://avatars.githubusercontent.com/u/73247573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Mikluki", "html_url": "https://github.com/Mikluki", "followers_url": "https://api.github.com/users/Mikluki/followers", "following_url": "https://api.github.com/users/Mikluki/following{/other_user}", "gists_url": "https://api.github.com/users/Mikluki/gists{/gist_id}", "starred_url": "https://api.github.com/users/Mikluki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Mikluki/subscriptions", "organizations_url": "https://api.github.com/users/Mikluki/orgs", "repos_url": "https://api.github.com/users/Mikluki/repos", "events_url": "https://api.github.com/users/Mikluki/events{/privacy}", "received_events_url": "https://api.github.com/users/Mikluki/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/issues/4188/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/4188/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4189
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4189/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4189/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4189/events
https://github.com/materialsproject/pymatgen/pull/4189
2,681,271,092
PR_kwDOACgets6CvUKS
4,189
Inputs - JDFTx IO Module
{ "login": "benrich37", "id": 76569522, "node_id": "MDQ6VXNlcjc2NTY5NTIy", "avatar_url": "https://avatars.githubusercontent.com/u/76569522?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benrich37", "html_url": "https://github.com/benrich37", "followers_url": "https://api.github.com/users/benrich37/followers", "following_url": "https://api.github.com/users/benrich37/following{/other_user}", "gists_url": "https://api.github.com/users/benrich37/gists{/gist_id}", "starred_url": "https://api.github.com/users/benrich37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benrich37/subscriptions", "organizations_url": "https://api.github.com/users/benrich37/orgs", "repos_url": "https://api.github.com/users/benrich37/repos", "events_url": "https://api.github.com/users/benrich37/events{/privacy}", "received_events_url": "https://api.github.com/users/benrich37/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
[ "@mkhorton , are you OK with merging this change?\r\n\r\n@shyuep I am not sure why some of the optional checks are not running, I started the tests a couple of days ago.\r\n\r\nLooks like all changes are restricted to the io/jdftx module, so not much likelihood of things breaking", "Thanks for your patience with this one, long PRs adding a big new feature are always more difficult to review. I think this nicely self-contained and is in good shape to merge in. We can save further improvements for follow-up PRs that we can review/merge more quickly, and we can take the same approach with #4190 too.\r\n\r\nOne thing that wasn't obvious to me, why the `/tmp` directory in the test files? I couldn't see where it was used in the diff.", "> Thanks for your patience with this one, long PRs adding a big new feature are always more difficult to review. I think this nicely self-contained and is in good shape to merge in. We can save further improvements for follow-up PRs that we can review/merge more quickly, and we can take the same approach with #4190 too.\r\n> \r\n> One thing that wasn't obvious to me, why the `/tmp` directory in the test files? I couldn't see where it was used in the diff.\r\n\r\nAwesome thank you! Sorry for the new push - had a minor bug from inconsistent tracking of units. And the `tmp` directory is used to hold files that are created and deleted during the tests (ie testing that an input file can be written and then read correctly). I thought it would make the tests run quicker to have the directory exist permanently instead of created when needed but I can change that if the alternative is better.\r\n\r\nEdit: The new push is actually restricted to #4078 - \r\n\r\n> We can save further improvements for follow-up PRs that we can review/merge more quickly\r\n\r\nSo edits for minor bugs I should keep within #4078 and leave #4189 and #4190 untouched, right?", "> I thought it would make the tests run quicker to have the directory exist permanently instead of created when needed but I can change that if the alternative is better.\r\n\r\nIt'd be better to remove it :) Creating a directory doesn't take much time, and might add some confusion to others to see it there. Tests should do \"set up\" and \"tear down\" as needed.\r\n\r\n> So edits for minor bugs I should keep within https://github.com/materialsproject/pymatgen/pull/4078 and leave https://github.com/materialsproject/pymatgen/pull/4189 and https://github.com/materialsproject/pymatgen/pull/4190 untouched, right?\r\n\r\nAs long as you merge in changes from the main branch (or rebase) #4078 once #4189 and #4190 are merged, or you can create new PRs. Either way is fine, I will try and be responsive!", "@mkhorton Sorry for the delay! \"tmp\" directory now only exists during the execution of the required tests by defining it as a module-scope fixture defined in [`tests.io.jdftx.shared_test_utils`](https://github.com/benrich37/pymatgen/blob/feature-jdftx-inputs/tests/io/jdftx/shared_test_utils.py#L38-L42). I tried using the `tmp_path` class variable in the `PymatgenTest` class but I discovered that test methods within test classes inheriting `unittest.TestCase` cannot use the `pytest.mark.parametrize` decorator so the fixture-approach ended up working out better.", "Is htis ready to be merged?", "> Is htis ready to be merged?\r\n\r\nyes! @mkhorton let me know if it looks good!" ]
2024-11-21T23:20:36
2025-01-24T17:48:18
2025-01-24T00:21:07Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: - feature 1: `inputs.py` module containing `JDFTXInfile` class to give pythonic representation to the inputs for a JDFTx calculation - feature 2: "helper" module `generic_tags.py` holding "Tag" objects (`AbstractTag` and inheritors of `AbstractTag`) to represent the different data structures JDFTx expects for inputs - feature 3: "helper" module `jdftxinfile_master_format.py` to create proper "Tag" objects for input tags - feature 4: "helper" module `jdftxinfile_ref_options.py` to hold lists of acceptable input strings for different input tags (ie list of acceptable XC functionals for the tag "elec-ex-corr")
{ "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/4189/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/4189/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4189", "html_url": "https://github.com/materialsproject/pymatgen/pull/4189", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4189.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4189.patch", "merged_at": "2025-01-24T00:21:07Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4190
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4190/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4190/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4190/events
https://github.com/materialsproject/pymatgen/pull/4190
2,681,419,754
PR_kwDOACgets6CvqIx
4,190
Outputs - JDFTx IO Module
{ "login": "benrich37", "id": 76569522, "node_id": "MDQ6VXNlcjc2NTY5NTIy", "avatar_url": "https://avatars.githubusercontent.com/u/76569522?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benrich37", "html_url": "https://github.com/benrich37", "followers_url": "https://api.github.com/users/benrich37/followers", "following_url": "https://api.github.com/users/benrich37/following{/other_user}", "gists_url": "https://api.github.com/users/benrich37/gists{/gist_id}", "starred_url": "https://api.github.com/users/benrich37/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benrich37/subscriptions", "organizations_url": "https://api.github.com/users/benrich37/orgs", "repos_url": "https://api.github.com/users/benrich37/repos", "events_url": "https://api.github.com/users/benrich37/events{/privacy}", "received_events_url": "https://api.github.com/users/benrich37/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
[ "@mkhorton , are you OK with merging this change?\r\n\r\n@shyuep I am not sure why some of the optional checks are not running, I started the tests a couple of days ago.\r\n\r\nLooks like all changes are restricted to the io/jdftx module, so not much likelihood of things breaking", "I’ll try and review this later today, thanks @benrich37 " ]
2024-11-22T00:34:16
2025-01-24T17:48:09
2025-01-24T15:05:39Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
## Summary Major changes: -feature 0: hierarchy of class objects used to represent the data contained within a JDFTx out file. Hierarchy here is used to represent where each class object is stored - none of these classes inherit the class below it. Classes stored within a list in its parent are indicated by "[i]" (ie below where `JDFTXOutfile.slices` is a list of `JDFTXOutfileSlice`). Descriptions of each class are given below the tree. JDFTXOutputs | JDFTXOutputs.outfile | JDFTXOutfile | JDFTXOutfile.slices[i] | JDFTXOutfileSlice / \ JDFTXOutfileSlice.jstrucs JDFTXOutfileSlice.jsettings_(fluid, electronic, lattice, or ionic) | | JOutStructures JMinSettings | JOutStructures.slices[i] | JOutStructure(Structure) | JOutStructure.elecmindata | JElSteps | JElSteps.slices[i] | JElStep - feature 1: `outputs.py` module containing `JDFTXOutfile` class to give robust pythonic representation of to a JDFTx "out" file. This class is initialized from the path to a JDFTx "out" file by the user. The initialization of a `JDFTXOutfile` will initialize the following JDFTx IO classes by - feature 2: `jdftxoutfileslice.py` module containing `JDFTXOutfileSlice` class representing a "slice" of a JDFTx "out" file corresponding to a single call of the JDFTx executable (subsequent calls will append the same "out" file). This class is initialized for every call from an "out" file when `JDFTXOutfile` is initialized and stored in the list `JDFTXOutfile.slices` - feature 3: `joutstructures.py` module containing `JOutStructures` class representing a series of structures from an "out" file "slice". This class is primarily helpful for representing a geometric optimization during a single call. This class is initialized once during the initialization of a `JDFTXOutfileSlice` and is stored in `JDFTXOutfileSlice.jstrucs` - feature 4: `joutstructure.py` module containing `JOutStructure` class representing a single structure within an "out" file (specifically from a portion of the "out" file starting from the beginning of an SCF optimization down to the next log of Lowdin charges as the flag for the end of geometric optimization step). This class initialized once for every structure update when initializing `JOutStructures`, and is stored within the list `JOutStructures.slices`. An initial structure is given for initialization in the case that either lattice or ion positions are not being updated (and therefore not printed for parsing within the given slice of the "out" file "slice". - feature 5: `jelstep.py` module containing `JElStep` and `JElSteps` class representing a single SCF step and a series of SCF steps, respectively. The `JElSteps` class is helpful for getting SCF convergence data. The `JElSteps` class is initialized once for every initialization of a `JOutStructure`, and is stored within `JOutStructure.elecmindata`. The `JElStep` class is helpful for analyzing the logged SCF optimization data (energy, chemical potential, line-minimization values, etc) for a single SCF step. The `JElStep` class initialized once for every SCF step when initializing a `JElSteps`, and is stored within `JElSteps.slices`. - feature 6: `jminsettings.py` module containing `JMinSettings` abstract class for representing the input minimization settings of a JDFTx call. `JMinSettings` is inherited by the following classes within `jminsettings.py` - `JMinSettingsElectronic` to represent electronic minimization settings, `JMinSettingsFluid` for implicit fluid minimization, `JMinSettingsLattice` for lattice minimization, and `JMinSettingsIonic` for ionic minimization.
{ "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/4190/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/4190/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4190", "html_url": "https://github.com/materialsproject/pymatgen/pull/4190", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4190.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4190.patch", "merged_at": "2025-01-24T15:05:39Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4192
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4192/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4192/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4192/events
https://github.com/materialsproject/pymatgen/pull/4192
2,685,285,242
PR_kwDOACgets6C5MEq
4,192
Clean up `util.num.make_symmetric_matrix_from_upper_tri` and `util.io_util.micro_pyawk`, fix new `ruff` errors
{ "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-23T03:56:51
2025-01-10T02:27:30
2025-01-09T20:34:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Simplify/clarify `util.num.make_symmetric_matrix_from_upper_tri` and add tests > [!CAUTION] > `make_symmetric_matrix_from_upper_tri` now raise `ValueError` for non 3x3 array I believe `utils.num.make_symmetric_matrix_from_upper_tri` is designed to [work on 3x3 matrix alone](https://github.com/materialsproject/pymatgen/pull/4192#discussion_r1855063190) (the new index is hard-coded): https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/util/num.py#L31-L32 As such I might greatly simplify the implementation f2c325299aa0162f0ee3f0a50507ab95991363bb which [gives ~3x speedup](https://github.com/materialsproject/pymatgen/pull/4192#discussion_r1855063190) and much better readability. ### Clean up `util.io_util.micro_pyawk` > [!WARNING] > The `debug/postdebug` is likely debug args, no usage across the entire code bass, schedule them for removal after one-year grace period in case someone really need them. ### Others - Remove: https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/util/io_utils.py#L98-L99 I believe this is doing nothing (set umask to 0, but reset it back the original umask immediately) - Fix new `ruff` errors and bump `pre-commit` accordingly
{ "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/4192/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/4192/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4192", "html_url": "https://github.com/materialsproject/pymatgen/pull/4192", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4192.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4192.patch", "merged_at": "2025-01-09T20:34:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4193
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4193/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4193/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4193/events
https://github.com/materialsproject/pymatgen/pull/4193
2,685,388,332
PR_kwDOACgets6C5WmV
4,193
Remove unnecesary isotope conversion in `core.periodic_table.get_el_sp`
{ "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
[ "@esoteric-ephemera Do we have further concerns on this change here? If not I might mark as ready?", "If you mark as ready I'm happy to merge @DanielYang59, thank you!", "Good to go from my side, not sure these lines are needed anymore. Thanks for checking!", "No problem guys, happy holiday :)" ]
2024-11-23T05:20:49
2025-01-10T02:27:23
2025-01-09T20:34:32Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
To close #4171. This isotope conversion may not be working as we expected as the `name` of an isotope `Element/Species` is the "isotope name" (e.g. `"D"` for `Element.D` and `Species("D")` instead of `"H"`): https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/periodic_table.py#L1649 https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/periodic_table.py#L1105-L1106 ```python from pymatgen.core.periodic_table import Element, Species, get_el_sp print(get_el_sp(Element.D).name) # D print(get_el_sp(Element.D) == Element.D) # True print(get_el_sp(Species("D")).name) # D print(get_el_sp(Species("D")) == Species("D")) # True print(get_el_sp(Species("D", 1)).name) # D print(get_el_sp(Species("D", 1)) == Species("D", 1)) # True ``` --- Meanwhile the [isotope characteristic removing in `Composition.add_charges_from_oxi_state_guesses`](https://github.com/materialsproject/pymatgen/discussions/4171#discussioncomment-11342357) is not done by this but `Composition.get_el_amt_dict`, full analysis in https://github.com/materialsproject/pymatgen/discussions/4171#discussioncomment-11355744. This could also be confirmed by all unit tests passing including: https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/tests/core/test_composition.py#L845-L856 credit to @esoteric-ephemera for providing the context and the helpful discussion as always, and @benrich37 @mkhorton for bringing up the topic
{ "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/4193/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/4193/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4193", "html_url": "https://github.com/materialsproject/pymatgen/pull/4193", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4193.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4193.patch", "merged_at": "2025-01-09T20:34:32Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4194
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4194/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4194/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4194/events
https://github.com/materialsproject/pymatgen/pull/4194
2,687,539,126
PR_kwDOACgets6C7zXs
4,194
Fix NumPy array indexing in 32-bit system in `analysis.chemenv.coordination_environments`
{ "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
[ "@drew-parsons I believe this resolved the index dtype issue in 32-bit systems (tested on Debian 12 32-bit with NumPy 1.26.4 and Python 3.11), let me know if you notice any issues :)", "Thanks. This patch seems to be working well, applied to debian build 2024.10.29+dfsg1-4\t\r\nhttps://buildd.debian.org/status/package.php?p=pymatgen", "No problem, great to know, thanks for confirming this!" ]
2024-11-24T10:39:52
2024-12-11T02:29:36
2024-12-11T02:03:14Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix NumPy array indexing in 32-bit system, to close #4161 > https://numpy.org/doc/1.21/reference/arrays.scalars.html I may use `intp` instead of `uintp` as I'm not 100% sure if the indexes could be negative or not in the code design. ### Run unit tests locally as GitHub doesn't provide 32-bit runner Test platform: - `Linux debian32bit 6.1.0-27-686-pae #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) i686 GNU/Linux` - Python 3.11.2 #### Numpy 1.26.4 I don't think those three test failures are related to this PR. ``` .....................................ss...................................................................................................... [ 4%] .................................s.............................sss.......................................F........sssss.....s..s............. [ 9%] .....s..............................................ss.......................s.....ssssssss.................................................. [ 14%] .......s...............................................................................................................ss.................... [ 19%] .................................F....................................................sss....s.s............................................. [ 24%] ....................sssss..ss..sssssssssssssssssssssssssssssssssssssss....................................................................... [ 29%] ...................................................F......................................................................................... [ 33%] ...................................................s.......s..................................sss....s...............sssssss..........s...... [ 38%] ............................ss.....sss....s..........................s....................................................................... [ 43%] .s.................................ssssssssssssssss...................................................................................sssssss [ 48%] ssssssssssss................................................................................................................................. [ 53%] ..................................................s...................ss..................................................................... [ 58%] ............................................................................................................................................. [ 62%] ............................................................................................................................................. [ 67%] .............ssss................................................s..................s........................................................ [ 72%] ...................................................................................ss............................sssss..s.................... [ 77%] ...........................................................................................................s................................. [ 82%] ............................................................................................................................................. [ 87%] ...............................................s.......................................................................sssssssssss........... [ 91%] ..............................................................................s................s..sssss..ssssssss...ssssss....s...........s.. [ 96%] .................ssss.......................................................................... [100%] ===================================================================== FAILURES ====================================================================== _________________________________________________________ TestEOS.test_numerical_eos_values _________________________________________________________ self = <analysis.test_eos.TestEOS testMethod=test_numerical_eos_values> def test_numerical_eos_values(self): assert_allclose(self.num_eos_fit.e0, -10.84749, atol=1e-3) assert_allclose(self.num_eos_fit.v0, 40.857201, atol=1e-1) assert_allclose(self.num_eos_fit.b0, 0.55, atol=1e-2) > assert_allclose(self.num_eos_fit.b0_GPa, 89.0370727, atol=1e-1) /home/yang/pymatgen/tests/analysis/test_eos.py:429: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (<function assert_allclose.<locals>.compare at 0x9a968d48>, array(88.86413), array(89.0370727)) kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.1', 'verbose': True} @wraps(func) def inner(*args, **kwds): with self._recreate_cm(): > return func(*args, **kwds) E AssertionError: E Not equal to tolerance rtol=1e-07, atol=0.1 E E Mismatched elements: 1 / 1 (100%) E Max absolute difference: 0.1729427 E Max relative difference: 0.00194237 E x: array(88.86413) E y: array(89.037073) /usr/lib/python3.11/contextlib.py:81: AssertionError __________________________________________________________ TestBalancedReaction.test_hash ___________________________________________________________ self = <analysis.test_reaction_calculator.TestBalancedReaction testMethod=test_hash> def test_hash(self): > assert hash(self.rxn) == 4774511606373046513 E assert 221359835 == 4774511606373046513 E + where 221359835 = hash(24 Li + Na2S + 3 K2SO4 -> 2 KNaS + 2 K2S + 12 Li2O) E + where 24 Li + Na2S + 3 K2SO4 -> 2 KNaS + 2 K2S + 12 Li2O = <analysis.test_reaction_calculator.TestBalancedReaction testMethod=test_hash>.rxn tests/analysis/test_reaction_calculator.py:334: AssertionError _______________________________________________________________ TestLattice.test_init _______________________________________________________________ self = <core.test_lattice.TestLattice testMethod=test_init> def test_init(self): len_a = 9.026 lattice = Lattice.cubic(len_a) assert lattice is not None, "Initialization from new_cubic failed" assert_array_equal(lattice.pbc, (True, True, True)) > assert hash(lattice) == -6887896986157825384 E assert 50099439 == -6887896986157825384 E + where 50099439 = hash(Lattice\n abc : 9.026 9.026 9.026\n angles : 90.0 90.0 90.0\n volume : 735.336269576\n A : 9.026 0.0 0.0\n B : 0.0 9.026 0.0\n C : 0.0 0.0 9.026\n pbc : True True True) /home/yang/pymatgen/tests/core/test_lattice.py:43: AssertionError 3 failed, 2719 passed, 205 skipped, 54 warnings in 1223.52s (0:20:23) ``` #### NumPy 2 Cannot install: ``` ERROR: Cannot install monty==2024.10.21, pymatgen and pymatgen==2024.11.13 because these package versions have conflicting dependencies. The conflict is caused by: pymatgen 2024.11.13 depends on numpy<3 and >=2.0.0 matplotlib 3.9.0 depends on numpy>=1.23 monty 2024.10.21 depends on numpy<2.0.0 ```
{ "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/4194/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/4194/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4194", "html_url": "https://github.com/materialsproject/pymatgen/pull/4194", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4194.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4194.patch", "merged_at": "2024-12-11T02:03:14Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4195
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4195/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4195/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4195/events
https://github.com/materialsproject/pymatgen/pull/4195
2,688,939,817
PR_kwDOACgets6C90_1
4,195
Read NBANDS in `io.vasp.outputs.Outcar` init
{ "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
[ "@Andrew-S-Rosen Is currently implementation looking good to you? :)", "Due to time commitments, I can just say that I trust you. 👍 Happy to report if something comes up. ", "Thanks for saying that, I tested on multiple VASP versions (included in unit test) and didn't find any issue for now, do let me know if you notice any :)\r\n" ]
2024-11-25T03:27:47
2024-12-11T02:29:56
2024-12-11T02:01:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Read NBANDS in `io.vasp.outputs.Outcar` init, to close #3843 - Add overwriting tests and test file (355 KB), I didn't find any reusable file (`zgrep 'I found NBANDS' OUTCAR*` returns nothing) #### VASP version stability - 5.2.11 (unit test) - 5.4.4 (unit test) - 6.3.0 (unit test) - 6.3.2 (unit test, overridden) #### Reason for using current pattern instead of `NBANDS = (\d+)` As mentioned in https://github.com/materialsproject/pymatgen/issues/3843#issue-2308586992, the NBANDS could be modified to be "number of cores compatible". [More specifically](https://www.vasp.at/wiki/index.php/NBANDS): > When executed on multiple CPUs, VASP automatically increases the number of bands, so that NBANDS is divisible by the number of CPU cores. If [NCORE](https://www.vasp.at/wiki/index.php/NCORE) > 1, NBANDS is increased until it is divisible by the number of cores in a group ([NCORE](https://www.vasp.at/wiki/index.php/NCORE)). If [KPAR](https://www.vasp.at/wiki/index.php/KPAR) > 1, NBANDS is increased until it is divisible by the number of cores in a group. For example if I set NBANDS to 30 on a 64-core job, it would be modified to 32 with the following message: ``` >>> grep NBANDS OUTCAR_set_30_but_changed_to_32 NBANDS = 30 | I found NBANDS = 30. Now, NBANDS = 32. | k-points NKPTS = 126 k-points in BZ NKDIM = 126 number of bands NBANDS= 32 ```
{ "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/4195/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/4195/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4195", "html_url": "https://github.com/materialsproject/pymatgen/pull/4195", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4195.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4195.patch", "merged_at": "2024-12-11T02:01:55Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4196
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4196/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4196/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4196/events
https://github.com/materialsproject/pymatgen/pull/4196
2,689,508,698
PR_kwDOACgets6C_OFX
4,196
Change `get` default from empty list (`[]`) to `False` when used as `bool` or condition check for `Outcar` parsing methods
{ "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-25T07:20:56
2025-01-10T02:27:05
2025-01-09T18:14:21Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Change `get` default from empty list (`[]`) to `False` when used as `bool` or condition check for `Outcar` parsing methods This is slightly more readable as `bool([])` is `False`, also this would not be breaking as the evaluation result is not assigned (condition check only)
{ "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/4196/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/4196/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4196", "html_url": "https://github.com/materialsproject/pymatgen/pull/4196", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4196.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4196.patch", "merged_at": "2025-01-09T18:14:21Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4197
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4197/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4197/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4197/events
https://github.com/materialsproject/pymatgen/issues/4197
2,689,903,538
I_kwDOACgets6gVKuy
4,197
Structure.merge_sites fails when selective_dynamics is property present
{ "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 reporting and for including a code snippet again, I would take care of this" ]
2024-11-25T09:13:34
2025-01-09T20:35:17
2025-01-09T20:35:17Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.12.7 ### Pymatgen version Version: 2024.10.22 ### Operating system version _No response_ ### Current behavior Error is thrown when I try to run merge_sites. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yantar92/.venv/lib/python3.12/site-packages/pymatgen/core/structure.py", line 4604, in merge_sites if props[key] is not None and self[i].properties[key] != props[key]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() ### Expected Behavior merge_sites works without errors :) ### Minimal example ```Python import pymatgen.core as pmg str1 = pmg.Structure.from_file('POSCAR1') str2 = pmg.Structure.from_file('POSCAR2') merge = str1.copy() for site in str2: merge.append(site.species, site.frac_coords, properties=site.properties) merge.merge_sites(mode='average') ``` ### Relevant files to reproduce this bug [POSCAR2.gz](https://github.com/user-attachments/files/17900367/POSCAR2.gz) [POSCAR1.gz](https://github.com/user-attachments/files/17900368/POSCAR1.gz)
{ "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/4197/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/4197/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4198
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4198/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4198/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4198/events
https://github.com/materialsproject/pymatgen/pull/4198
2,690,320,806
PR_kwDOACgets6DBRvD
4,198
Fix array comparison in `core.Structure.merge_sites`, also allow `int` property to be merged instead of `float` alone, `mode` only allow full name
{ "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-25T11:06:50
2025-01-10T02:27:40
2025-01-09T20:35:16Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix array comparison in `core.Structure.merge_sites`, to fix #4197 - [x] Test for property reset warning is missing - [x] Add test for `is_np_dict_equal ` for custom `__eq__` - Add check for illegal `mode` initials (not starting with `a/s/d`, currently don't check full name yet) --- > [!WARNING] > Minor behaviour change (fix) in `merge_sites` property handling Only allowing `float` to be averaged may not be a good idea, we should include `int` as well, otherwise `properties={"prop1": 100}` would lead to the site property being reset to `None` while `properties={"prop1": 100.0}` doesn't, which is super confusing https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/tests/core/test_structure.py#L1677-L1679 Also the docstring is clarified to explain this behaviour. --- > [!WARNING] > `mode` only allow "full name" instead of initials after an one-year deprecation period I believe it's beneficial to allow only full name (`"sum", "delete", "average"`) instead of checking first letter only: - more readable: `mode="sum"` instead of `mode="s"` - consistent with currently type annotation: https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/structure.py#L4719
{ "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/4198/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/4198/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4198", "html_url": "https://github.com/materialsproject/pymatgen/pull/4198", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4198.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4198.patch", "merged_at": "2025-01-09T20:35:16Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4199
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4199/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4199/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4199/events
https://github.com/materialsproject/pymatgen/pull/4199
2,692,885,273
PR_kwDOACgets6DHyo7
4,199
Fix `py.typed` usage for namespace packages
{ "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
[ "Still I would prefer closing this and let maintainers take over, esp. around the migration from namespace system to entry points." ]
2024-11-26T02:54:26
2024-12-01T07:50:34
2024-12-01T07:50:05Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
- [ ] [Fix `py.typed` marker file placement](https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-typed-libraries) to close #3413: > For namespace packages (see [PEP 420](https://peps.python.org/pep-0420/)), the py.typed file should be in the submodules of the namespace, to avoid conflicts and for clarity. - [ ] Add a test for `py.typed` files, verify the original reported issue is gone (`Skipping analyzing "pymatgen.io.vasp.inputs": module is installed, but missing library stubs or py.typed marker [import]`) - [ ] Double check config of `analysis / ext / io`, are they meant to be namespace packages as well? --- Looks like some sub-modules (`analysis / ext / io`) are implicit namespace packages as well (no `__init__.py`)? i.e. `pymatgen` is namespace package, so do `pymatgen.ext/pymatgen.analysis/pymatgen.io`. Not sure if this is intended, AFAIK sharing the `pymatgen` namespace is sufficient to support `pymatgen-analysis-defects/analysis/diffusion`, `pymatgen-io-validation`? Also quote [Anthony Sottile](https://www.youtube.com/watch?v=2Xvb79hOUdM): > imo a namespace package is just always a bad idea -- you're better to use a plugin system -- here's an example of how to set one up: [https://youtu.be/fY3Y_xPKWNA](https://www.youtube.com/watch?v=fY3Y_xPKWNA) ``` >>> import pymatgen >>> pymatgen <module 'pymatgen' (namespace) from ['/home/yang/developer/pymatgen/src/pymatgen']> >>> import pymatgen.io >>> pymatgen.io <module 'pymatgen.io' (namespace) from ['/home/yang/developer/pymatgen/src/pymatgen/io']> >>> import pymatgen.ext >>> pymatgen.ext <module 'pymatgen.ext' (namespace) from ['/home/yang/developer/pymatgen/src/pymatgen/ext']> >>> import pymatgen.analysis >>> pymatgen.analysis <module 'pymatgen.analysis' (namespace) from ['/home/yang/developer/pymatgen/src/pymatgen/analysis']> ``` https://github.com/materialsproject/pymatgen/tree/master/src/pymatgen/ext https://github.com/materialsproject/pymatgen/tree/master/src/pymatgen/io https://github.com/materialsproject/pymatgen/tree/master/src/pymatgen/analysis
{ "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/4199/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/4199/timeline
null
true
true
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4199", "html_url": "https://github.com/materialsproject/pymatgen/pull/4199", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4199.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4199.patch", "merged_at": null }
https://api.github.com/repos/materialsproject/pymatgen/issues/4200
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4200/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4200/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4200/events
https://github.com/materialsproject/pymatgen/issues/4200
2,695,618,108
I_kwDOACgets6gq948
4,200
Parsing Failure of vasprun.xml from MD Simulations Using MLFF
{ "login": "yutoml", "id": 51249637, "node_id": "MDQ6VXNlcjUxMjQ5NjM3", "avatar_url": "https://avatars.githubusercontent.com/u/51249637?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yutoml", "html_url": "https://github.com/yutoml", "followers_url": "https://api.github.com/users/yutoml/followers", "following_url": "https://api.github.com/users/yutoml/following{/other_user}", "gists_url": "https://api.github.com/users/yutoml/gists{/gist_id}", "starred_url": "https://api.github.com/users/yutoml/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yutoml/subscriptions", "organizations_url": "https://api.github.com/users/yutoml/orgs", "repos_url": "https://api.github.com/users/yutoml/repos", "events_url": "https://api.github.com/users/yutoml/events{/privacy}", "received_events_url": "https://api.github.com/users/yutoml/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
[]
2024-11-26T17:58:09
2024-11-26T17:58:09
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.10.14 ### Pymatgen version Version: 2024.11.13 ### Operating system version Red Hat Enterprise Linux Ver 8.6 ### Current behavior When trying to parse the `vasprun.xml` file generated from calculations using MLFF with the `Vasprun` class, an `IndexError: list index out of range` is raised at line 625 of `pymatgen.io.vasp.outputs.py` when accessing `self.ionic_steps[-1]["electronic_steps"]`. This seems to occur because, in MLFF calculations, data is stored in `md_data` instead of `ionic_steps`, leaving `ionic_steps` empty. Additionally, when `ionic_step_offset` or `ionic_step_skip` is specified during the creation of a Vasprun object, parsing fails because the `vasprun.xml` generated by MLFF calculations does not contain the `<calculation>` tag, which prevents parsing from working as expected. ### Expected Behavior Parsing the `vasprun.xml` file generated from MD calculations using MLFF should not result in an error. While I am not entirely familiar with the code, changing the condition at line 348 in `outputs.py` from ```python if self.incar.get("ALGO") not in {"Chi", "Bse"} and not self.converged and self.parameters.get("IBRION") != 0: ``` to ```python if self.incar.get("ALGO") not in {"Chi", "Bse"} and self.parameters.get("IBRION") != 0 and not self.converged: ``` allowed me to parse the file successfully for now. However, errors still occur when `ionic_step_offset` or `ionic_step_skip` are used, and it is possible that there are other parts of the code where `ionic_steps` are referenced when `md_data` should be used instead. ### Minimal example ```Python from pymatgen.io.vasp.outputs import Vasprun vasprun_xml = Vasprun("vasprun.xml") ``` ### Relevant files to reproduce this bug I am attaching a sample vasprun.xml file created for the purpose of reproducing this issue. [vasprun.zip](https://github.com/user-attachments/files/17923967/vasprun.zip)
{ "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/4200/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/4200/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4201
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4201/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4201/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4201/events
https://github.com/materialsproject/pymatgen/pull/4201
2,700,801,454
PR_kwDOACgets6DbBlq
4,201
Fix VASP/ABINIT link in main `README.md`
{ "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
[ "Seems the following is now recommended https://github.com/gaurav-nelson/github-action-markdown-link-check: \r\n\r\n> 🚨 Update (May 2024)\r\n\r\n>I have developed a new tool called [Linkspector](https://github.com/UmbrellaDocs/linkspector), which offers improved functionality and reduced false positives. I recommend using Linkspector for your needs, which is now the preferred and supported option.\r\nTry [GitHub action Linkspector](https://github.com/UmbrellaDocs/action-linkspector)!", "I would put the markdown link checker on holder as it seems too fragile right now" ]
2024-11-28T05:09:21
2024-12-11T02:29:42
2024-12-11T02:02:11Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix VASP/ABINIT hyperlink in main `README.md` Can someone help me double check to **make sure this is not my network issue**? ```diff # VASP - https://cms.mpi.univie.ac.at/vasp + https://www.vasp.at/ # ABINIT - https://abinit.org + https://abinit.github.io/abinit_web/ ```
{ "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/4201/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/4201/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4201", "html_url": "https://github.com/materialsproject/pymatgen/pull/4201", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4201.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4201.patch", "merged_at": "2024-12-11T02:02:11Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4202
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4202/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4202/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4202/events
https://github.com/materialsproject/pymatgen/issues/4202
2,701,218,120
I_kwDOACgets6hAVFI
4,202
[Dev/Test] Migrate `PymatgenTest` from `unittest.TestCase` 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
[]
2024-11-28T07:59:03
2025-04-17T14:43:55
2025-04-17T14:43:55Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
Current [`pytest` framework isn't fully compatible with `unittest.TestCase`](https://docs.pytest.org/en/stable/how-to/unittest.html#pytest-features-in-unittest-testcase-subclasses), we should consider migrate to `pytest` framework: > The following pytest features do not work, and probably never will due to different design philosophies: > [Fixtures](https://docs.pytest.org/en/stable/reference/fixtures.html#fixture) (except for autouse fixtures, see [below](https://docs.pytest.org/en/stable/how-to/unittest.html#mixing-fixtures)); > [Parametrization](https://docs.pytest.org/en/stable/how-to/parametrize.html#parametrize); > [Custom hooks](https://docs.pytest.org/en/stable/how-to/writing_plugins.html#writing-plugins); --- For example `pytest.mark.parametrize` doesn't work: - https://github.com/pytest-dev/pytest/issues/5382 ```python from unittest import TestCase import pytest class TestPytest(TestCase): @pytest.mark.parametrize("foo", ["hello", "world"]) def test_demo(self, foo): assert isinstance(foo, str) ``` Gives: ``` def _callTestMethod(self, method): > if method() is not None: E TypeError: TestPytest.test_demo() missing 1 required positional argument: 'foo' ``` While the following works just fine: ```diff - class TestPytest(TestCase): + class TestPytest: ```
{ "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/4202/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/4202/timeline
null
completed
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4203
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4203/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4203/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4203/events
https://github.com/materialsproject/pymatgen/pull/4203
2,701,820,296
PR_kwDOACgets6DdZdG
4,203
Remove redundant `total_ordering` decorator 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-28T11:22:15
2024-12-11T02:30:13
2024-12-11T01:59:11Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Remove redundant `total_ordering` decorator usage, as `total_ordering` is already applied on superclasses and child classes did not redefine any rich comparison operations. - Clean up comment of equality definition of `core.IStructure` - Minor import clean up (avoid `from io import StringIO` when it's used only twice as `io` is already imported) - Minor docstring clean up
{ "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/4203/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/4203/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4203", "html_url": "https://github.com/materialsproject/pymatgen/pull/4203", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4203.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4203.patch", "merged_at": "2024-12-11T01:59:11Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4204
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4204/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4204/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4204/events
https://github.com/materialsproject/pymatgen/issues/4204
2,701,986,730
I_kwDOACgets6hDQuq
4,204
Bugs in Composition().__ge__() method
{ "login": "txy159", "id": 81696304, "node_id": "MDQ6VXNlcjgxNjk2MzA0", "avatar_url": "https://avatars.githubusercontent.com/u/81696304?v=4", "gravatar_id": "", "url": "https://api.github.com/users/txy159", "html_url": "https://github.com/txy159", "followers_url": "https://api.github.com/users/txy159/followers", "following_url": "https://api.github.com/users/txy159/following{/other_user}", "gists_url": "https://api.github.com/users/txy159/gists{/gist_id}", "starred_url": "https://api.github.com/users/txy159/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/txy159/subscriptions", "organizations_url": "https://api.github.com/users/txy159/orgs", "repos_url": "https://api.github.com/users/txy159/repos", "events_url": "https://api.github.com/users/txy159/events{/privacy}", "received_events_url": "https://api.github.com/users/txy159/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
[ "Admittedly the behaviour is surprising, but I believe this is expected, I had the same question in https://github.com/materialsproject/pymatgen/pull/3895\r\n\r\nThis comparison operation is not defined to really \"compare\" `Composition` (it might not make chemical sense to order compositions in the first place), but more to provide a stable ordering reference (such that when you sort compositions, they don't came out in a unpredictable/random pattern).\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/composition.py#L234-L241\r\n\r\nNote [the elements are sorted by **electronegativity**](https://chemistry.stackexchange.com/a/538), in this case the comparing order is `[Element Li, Element Fe, Element P, Element H, Element O]`.\r\n\r\nFor the first comparison, the oxygen in \"LiFeP\" has an implied amount of zero (LiFePO<sub>0</sub>), it's therefore considered \"smaller\" than \"LiFePO\".\r\n\r\nFor the second case, the amount of P is greater in \"LiFePO\" than \"LiFeH\" (effectively LiFePH<sub>0</sub>O vs LiFeP<sub>0</sub>HO<sub>0</sub>) and thus the short-circuit: https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/core/composition.py#L245-L249\r\n" ]
2024-11-28T12:19:45
2024-11-28T15:48:21
NONE
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Python version Python 3.9 ### Pymatgen version 2024.3.1 ### Operating system version macos ### Current behavior <img width="455" alt="image" src="https://github.com/user-attachments/assets/cbf2053e-5d93-4157-abc9-9124fc4ee1ba"> ### Expected Behavior The second one should output False. ### Minimal example ```Python from pymatgen.core import Composition Composition("LiFePO") >= Composition("LiFeP") Composition("LiFePO") >= Composition("LiFeH") ``` ### 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/4204/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/4204/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4205
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4205/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4205/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4205/events
https://github.com/materialsproject/pymatgen/pull/4205
2,704,006,459
PR_kwDOACgets6Dh8vq
4,205
Fix `assert_str_content_equal`, add tests for testing utils
{ "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-29T05:52:56
2024-12-11T02:31:04
2024-12-11T01:53:22Z
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
### Summary - Fix `assert_str_content_equal` not raising `AssertionError` - Add unit tests for `util.testing` as it's intended for public usage (and [quite some external code use `PymatgenTest`](https://github.com/search?q=%22%28PymatgenTest%29%3A%22&type=code)) - More human-readable error messages for assert methods in `PymatgenTest` - [**NEED CONFIRM**] Simplify single-file module `testing/__init__.py` to `testing.py` --- > [!WARNING] > [**NEED CONFIRM**] Simplify single-file module `testing/__init__.py` to `testing.py` (**Is this intended for some purpose?**), I don't think this would be breaking (though the definition of `MODULE_DIR` would change from `util/testing` to `util`, but no code import this AFAIK as the `util/testing` has nothing else, I believe it's intended for `STRUCTURES_DIR` and I have updated this) --- ### Fix `assert_str_content_equal` not raising `AssertionError` Current implementation **would not raise `AssertionError` when two strings are not equal** (it only returns a bool): https://github.com/materialsproject/pymatgen/blob/31f1e1fb8cc1bb517d59ea8e484965bb641c42a0/src/pymatgen/util/testing/__init__.py#L66-L69 And [current usage of it](https://github.com/search?q=repo%3Amaterialsproject%2Fpymatgen%20self.assert_str_content_equal&type=code) take the pattern of `self.assert_str_content_equal` without `assert`. Several issues found: - #4206 - #4207
{ "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/4205/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/4205/timeline
null
true
false
{ "url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/4205", "html_url": "https://github.com/materialsproject/pymatgen/pull/4205", "diff_url": "https://github.com/materialsproject/pymatgen/pull/4205.diff", "patch_url": "https://github.com/materialsproject/pymatgen/pull/4205.patch", "merged_at": "2024-12-11T01:53:22Z" }
https://api.github.com/repos/materialsproject/pymatgen/issues/4206
https://api.github.com/repos/materialsproject/pymatgen
https://api.github.com/repos/materialsproject/pymatgen/issues/4206/labels{/name}
https://api.github.com/repos/materialsproject/pymatgen/issues/4206/comments
https://api.github.com/repos/materialsproject/pymatgen/issues/4206/events
https://github.com/materialsproject/pymatgen/issues/4206
2,704,244,274
I_kwDOACgets6hL34y
4,206
`test_str` and `test_mul` for `TestStructureGraph` of `analysis.graphs` are 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:40:17
2025-01-28T17:41:30
CONTRIBUTOR
{ "total": 0, "completed": 0, "percent_completed": 0 }
After fixing `assert_str_content_equal` implementations in #4205, noticed the following tests for `TestStructureGraph` of `analysis.graphs` are failing. cc @mkhorton ### `pytest tests/analysis/test_graphs.py::TestStructureGraph::test_str` ``` E AssertionError: Strings are not equal (whitespaces ignored): E ===================== Actual ===================== E Structure Graph E Structure: E Full Formula (H1) E Reduced Formula: H2 E abc : 5.000000 5.000000 50.000000 E angles: 90.000000 90.000000 90.000000 E pbc : True True True E Sites (1) E # SP a b c E --- ---- --- --- --- E 0 H 0 0 0 E Graph: bonds E from to to_image E ---- ---- ------------ E 0 0 (1, 0, 0) E 0 0 (0, 1, 0) E E ==================== Expected ==================== E Structure Graph E Structure: E Full Formula (H1) E Reduced Formula: H2 E abc : 5.000000 5.000000 50.000000 E angles: 90.000000 90.000000 90.000000 E Sites (1) E # SP a b c E --- ---- --- --- --- E 0 H 0 0 0 E Graph: bonds E from to to_image E ---- ---- ------------ E 0 0 (1, 0, 0) E 0 0 (-1, 0, 0) E 0 0 (0, 1, 0) E 0 0 (0, -1, 0) ``` ### `pytest tests/analysis/test_graphs.py::TestStructureGraph::test_mul` ``` E AssertionError: Strings are not equal (whitespaces ignored): E ===================== Actual ===================== E 1 H 0.5 0 -0 E Graph: bonds E from to to_image E ---- ---- ------------ E 0 0 (0, 1, 0) E 0 1 (0, 0, 0) E 0 1 (-1, 0, 0) E 1 1 (0, 1, 0) E ==================== Expected ==================== E Graph: bonds E from to to_image E ---- ---- ------------ E 0 0 (0, 1, 0) E 0 0 (0, -1, 0) E 0 1 (0, 0, 0) E 0 1 (-1, 0, 0) E 1 1 (0, 1, 0) E 1 1 (0, -1, 0) ```
{ "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/4206/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/4206/timeline
null
false
false
{ "url": "", "html_url": "", "diff_url": "", "patch_url": "", "merged_at": "" }