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/3780
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3780/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3780/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3780/events
|
https://github.com/materialsproject/pymatgen/issues/3780
| 2,257,829,642
|
I_kwDOACgets6Gk78K
| 3,780
|
Incompatibility Issue with ALGO Parameter in Incar and Vasprun Classes
|
{
"login": "yanghan234",
"id": 32856137,
"node_id": "MDQ6VXNlcjMyODU2MTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/32856137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yanghan234",
"html_url": "https://github.com/yanghan234",
"followers_url": "https://api.github.com/users/yanghan234/followers",
"following_url": "https://api.github.com/users/yanghan234/following{/other_user}",
"gists_url": "https://api.github.com/users/yanghan234/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yanghan234/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yanghan234/subscriptions",
"organizations_url": "https://api.github.com/users/yanghan234/orgs",
"repos_url": "https://api.github.com/users/yanghan234/repos",
"events_url": "https://api.github.com/users/yanghan234/events{/privacy}",
"received_events_url": "https://api.github.com/users/yanghan234/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-04-23T02:48:05
| 2024-04-23T02:48:05
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.9
### Pymatgen version
Version: 2024.4.13
### Operating system version
Ubuntu 20.04 LTS
### Current behavior
There appears to be an inconsistency in handling the `ALGO` parameter between the `Incar` and `Vasprun` classes. Specifically, when setting the `ALGO` parameter to "GW0" using the `Incar` class, the value is automatically reformatted to "Gw0" (with only the first letter capitalized).
```
ALGO = Gw0
...
```
However, the `Vasprun` class expects "GW0" with all letters in uppercase when checking the parameter value: https://github.com/materialsproject/pymatgen/blob/442d740eb7794d360cb35f187e271b3debb7f047/pymatgen/io/vasp/outputs.py#L1167
In fact, if I manually change "Gw0" in the vasprun.xml to "GW0", the problem is solved. So, it seems to me that we only need to modify the line to
```python
if potcar and self.incar.get("ALGO", "").upper() not in ["GW0", "G0W0", "GW", "BSE"]:
```
### Expected Behavior
The Vasprun should parse the vasprun.xml generated with `ALGO=Gw0` without any error.
### Minimal example
```Python
# Note this script runs longer than 20 minutes
from pymatgen.core import Structure
from pymatgen.io.vasp.sets import MVLGWSet
from pymatgen.io.vasp import Vasprun
import os
# construct an FCC silicon structure
si_structure = Structure(
lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]],
species=["Si", "Si"],
coords=[[0, 0, 0], [0.25, 0.25, 0.25]],
)
static_job = MVLGWSet(si_structure, mode="STATIC")
static_job.write_input("test-static")
os.system("export OMP_NUM_THREADS=1 && cd test-static && mpirun -np 8 vasp_std && cd ..")
diag_job = MVLGWSet.from_prev_calc("test-static", mode="DIAG")
diag_job.write_input("test-diag")
os.system("export OMP_NUM_THREADS=1 && cd test-diag && mpirun -np 8 vasp_std && cd ..")
gw_job = MVLGWSet.from_prev_calc("test-diag", mode="GW")
gw_job.write_input("test-gw")
os.system("export OMP_NUM_THREADS=1 && cd test-gw && mpirun -np 8 vasp_std && cd ..")
vasprun = Vasprun("./test-gw/vasprun.xml") # Error
```
### Relevant files to reproduce this bug
The minimal example above taks too long to run, but you may try to parse the following vasprun with `Vasprun` class.
[vasprun.xml.zip](https://github.com/materialsproject/pymatgen/files/15070662/vasprun.xml.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/3780/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/3780/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3781
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3781/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3781/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3781/events
|
https://github.com/materialsproject/pymatgen/pull/3781
| 2,258,886,037
|
PR_kwDOACgets5tehIY
| 3,781
|
Fix wrong error type in tests for `io.vasp.sets`
|
{
"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
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 6043913731,
"node_id": "LA_kwDOACgets8AAAABaD7OAw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/lobster",
"name": "lobster",
"color": "F51A76",
"default": false,
"description": "Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction)"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe modification involves updating the type of exception thrown in a specific function within the test suite for VASP sets. Previously, an `OSError` was raised, but now it has been changed to a `RuntimeError`. This adjustment is accompanied by a new error message that better describes the issue related to an incorrect functional and symbol combination for the element K in the PBE_54 set.\n\n## Changes\n\n| File | Change Summary |\n|------|----------------|\n| `tests/io/vasp/test_sets.py` | Changed exception type from `OSError` to `RuntimeError` with updated error message in `test_potcar` function. |\n\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\ntests/io/vasp/test_sets.py: ## Short summary\n\nIn the `test_potcar` function of `test_sets.py`, the exception type raised is changed from `OSError` to `RuntimeError`, with a corresponding message adjustment related to the incorrect POTCAR functional and symbol combination for the element K in the PBE_54 set.\n\n\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThis pull request, numbered 3781, is titled \"Fix wrong error type in tests for `io.vasp.sets`.\" The main objective of this PR is to correct an error in the type of exception being raised in the tests for the `io.vasp.sets` module. Specifically, the error type that should be raised is `RuntimeError` instead of `OSError`. This change is pertinent to ensuring that the tests accurately reflect the expected behavior when an error condition is encountered, particularly in scenarios involving incorrect configurations or inputs in the VASP (Vienna Ab initio Simulation Package) sets.\n\n### AI-Generated Summary of Changes\n\nThe change implemented in this pull request involves modifying the exception type in the `test_potcar` function within `test_sets.py`. Previously, an `OSError` was raised when an incorrect combination of POTCAR functional and symbol for the element Potassium (K) in the PBE_54 set was detected. This has been updated to raise a `RuntimeError` instead, with an updated error message that more accurately describes the issue related to the incorrect POTCAR functional and symbol combination. This adjustment ensures that the error handling in the tests is more semantically aligned with the nature of the error encountered.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 13677463a0e3cf37bf3ce44d07e90a21e50fcda1 and 29bec3b108d5b9aefefce67c87c2bc5352c1b0fd.\n</details>\n\n\n<details>\n<summary>Files selected for processing (1)</summary>\n\n* tests/io/vasp/test_sets.py (1 hunks)\n\n</details>\n\n\n\n\n\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 29bec3b108d5b9aefefce67c87c2bc5352c1b0fd -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@coderabbitai ignore",
"It seems like this PR is forgotten to be merged. Closed as it has been fixed in #3783."
] | 2024-04-23T13:26:42
| 2024-04-24T02:09:22
|
2024-04-24T02:09:21Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Fix wrong error type in tests for `io.vasp.sets` in #3771, should be `RuntimeError` instead of `OSError`
|
{
"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/3781/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/3781/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3781",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3781",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3781.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3781.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3782
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3782/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3782/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3782/events
|
https://github.com/materialsproject/pymatgen/pull/3782
| 2,259,520,834
|
PR_kwDOACgets5tgosO
| 3,782
|
Update `vasprun.converged_ionic` logic when `EDIFFG=0`, REDO of PR #3765
|
{
"login": "matthewkuner",
"id": 82329282,
"node_id": "MDQ6VXNlcjgyMzI5Mjgy",
"avatar_url": "https://avatars.githubusercontent.com/u/82329282?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/matthewkuner",
"html_url": "https://github.com/matthewkuner",
"followers_url": "https://api.github.com/users/matthewkuner/followers",
"following_url": "https://api.github.com/users/matthewkuner/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewkuner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/matthewkuner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewkuner/subscriptions",
"organizations_url": "https://api.github.com/users/matthewkuner/orgs",
"repos_url": "https://api.github.com/users/matthewkuner/repos",
"events_url": "https://api.github.com/users/matthewkuner/events{/privacy}",
"received_events_url": "https://api.github.com/users/matthewkuner/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe recent modifications enhance the `converged_ionic` method in `pymatgen`'s VASP outputs handling by incorporating a check for the `EDIFFG` parameter. This ensures more accurate convergence determination based on specific simulation settings. Additionally, a new test ensures that the system correctly handles cases where `EDIFFG` is set to zero, checking for both ionic step completion and electronic convergence.\n\n## Changes\n\n| Files | Change Summary |\n|-------------------------------|----------------|\n| `.../vasp/outputs.py` | Updated `converged_ionic` method to check `EDIFFG` parameter for convergence. |\n| `.../vasp/test_outputs.py` | Added `test_vasprun_ediffg_set_to_0` to verify completion and convergence with `EDIFFG` set to 0. |\n\n> 🐇🌟\n> In the code warren, deep and wide,\n> A rabbit tweaks with savvy pride.\n> With `EDIFFG` set, convergence checks,\n> Ensuring that no bug perplex.\n> Hopping through lines, a joyful spree,\n> CodeRabbit crafts with glee! 🌿🚀\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/io/vasp/outputs.py, tests/io/vasp/test_outputs.py: ## Short summary\n\n- In `outputs.py`, updated `converged_ionic` method to include a check for `EDIFFG` parameter for convergence determination based on `ibrion` and `ediffg` values.\n- Added new test method `test_vasprun_ediffg_set_to_0` in `test_outputs.py` to verify ionic steps completion and electronic convergence with `EDIFFG` set to 0. Added assertions for energy, convergence flags, and parameters.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe primary objective of Pull Request (PR) #3782 is to address and rectify issues encountered in a previous attempt (PR #3765) to update the logic for determining ionic convergence in the `vasprun.converged_ionic` method of the `pymatgen` library. Specifically, this update focuses on the handling of the `EDIFFG` parameter when it is set to 0. The description indicates that this redo was necessary due to unspecified problems with the tests in the earlier PR, although it confirms that all tests pass locally in the current iteration.\n\n### AI-generated Summary of Changes\n\nThe changes introduced in PR #3782 involve modifications to the `vasprun.converged_ionic` method within the `outputs.py` file of the `pymatgen` library, ensuring that the convergence determination now appropriately considers the `EDIFFG` parameter. This is particularly relevant when `EDIFFG` is set to 0, adjusting the method to account for both `ibrion` and `ediffg` values in its logic. Additionally, a new test, `test_vasprun_ediffg_set_to_0`, has been added to the `test_outputs.py` file. This test is designed to verify that the ionic steps are completed and that electronic convergence is achieved under the condition where `EDIFFG` equals 0. It includes various assertions related to energy levels, convergence flags, and other relevant parameters to ensure the robustness of the updated functionality.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: CodeRabbit UI**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 13677463a0e3cf37bf3ce44d07e90a21e50fcda1 and 5e9b1cbdc5c18cc8555bf10a75f872332b755706.\n</details>\n\n\n<details>\n<summary>Files selected for processing (2)</summary>\n\n* pymatgen/io/vasp/outputs.py (1 hunks)\n* tests/io/vasp/test_outputs.py (1 hunks)\n\n</details>\n\n\n\n\n\n\n\n<details><summary>Additional comments not posted (7)</summary><blockquote>\n<details><summary>tests/io/vasp/test_outputs.py (7)</summary><blockquote>\n\n`89-92`: This test method correctly implements the necessary checks for `ISMEAR` and `RANDOM_SEED`.\n\n---\n\nLine range hint `94-97`: This test method correctly implements the necessary checks for multiple dielectric functions.\n\n---\n\nLine range hint `99-110`: This test method correctly implements the necessary checks for `density` and `velocity` in `dielectric_data`.\n\n---\n\nLine range hint `112-118`: This test method correctly implements the necessary checks for optical absorption coefficients and structure consistency.\n\n---\n\nLine range hint `120-124`: This test method correctly anticipates a `NotImplementedError` for more than two unlabelled dielectric functions.\n\n---\n\nLine range hint `126-136`: This test method correctly handles exceptions and warnings for a bad vasprun file.\n\n---\n\nLine range hint `138-166`: This test method correctly implements the necessary checks for various `run_type` configurations.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 5e9b1cbdc5c18cc8555bf10a75f872332b755706 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-04-23T18:33:07
| 2024-04-23T19:34:43
|
2024-04-23T18:44:21Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
This is an attempt to redo #3765 after the tests were broken for some weird reason. All tests still pass locally.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Enhanced the convergence determination in simulations by including checks based on specific simulation parameters.
- **Tests**
- Added tests to ensure accurate simulation outcomes when specific convergence parameters are set to zero.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
{
"login": "matthewkuner",
"id": 82329282,
"node_id": "MDQ6VXNlcjgyMzI5Mjgy",
"avatar_url": "https://avatars.githubusercontent.com/u/82329282?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/matthewkuner",
"html_url": "https://github.com/matthewkuner",
"followers_url": "https://api.github.com/users/matthewkuner/followers",
"following_url": "https://api.github.com/users/matthewkuner/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewkuner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/matthewkuner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewkuner/subscriptions",
"organizations_url": "https://api.github.com/users/matthewkuner/orgs",
"repos_url": "https://api.github.com/users/matthewkuner/repos",
"events_url": "https://api.github.com/users/matthewkuner/events{/privacy}",
"received_events_url": "https://api.github.com/users/matthewkuner/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3782/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/3782/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3782",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3782",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3782.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3782.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3783
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3783/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3783/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3783/events
|
https://github.com/materialsproject/pymatgen/pull/3783
| 2,259,609,112
|
PR_kwDOACgets5tg76R
| 3,783
|
Update `vasprun.converged_ionic` logic when `EDIFFG=0`, REDO of PR #3765
|
{
"login": "matthewkuner",
"id": 82329282,
"node_id": "MDQ6VXNlcjgyMzI5Mjgy",
"avatar_url": "https://avatars.githubusercontent.com/u/82329282?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/matthewkuner",
"html_url": "https://github.com/matthewkuner",
"followers_url": "https://api.github.com/users/matthewkuner/followers",
"following_url": "https://api.github.com/users/matthewkuner/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewkuner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/matthewkuner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewkuner/subscriptions",
"organizations_url": "https://api.github.com/users/matthewkuner/orgs",
"repos_url": "https://api.github.com/users/matthewkuner/repos",
"events_url": "https://api.github.com/users/matthewkuner/events{/privacy}",
"received_events_url": "https://api.github.com/users/matthewkuner/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe recent updates to the pymatgen library focus on refining the handling of VASP output files. Enhancements include improved logic for ionic convergence checks, streamlined class initializations by removing type annotations, and better handling of various input types. Additionally, a new test ensures proper behavior when `EDIFFG` is set to zero, enhancing the robustness of the tool's functionality in edge cases.\n\n## Changes\n\n| File Path | Change Summary |\n|----------------------------------|----------------|\n| `.../vasp/outputs.py` | Added logic for `EDIFFG=0` handling in `converged_ionic`; removed type annotations across several class methods; adjusted input handling in `Chgcar`. |\n| `.../io/vasp/test_outputs.py` | Introduced a new test to verify behavior when `EDIFFG` is set to 0, ensuring proper property assertions. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/io/vasp/outputs.py: ## Short summary\n\n- Added logic to handle the case when `EDIFFG=0` in the `converged_ionic` method, affecting the return condition based on `ibrion` and `ediffg`.\n- Removed type annotations from the `__init__` methods of classes `Outcar`, `Locpot`, `Chgcar`, `Eigenval`, and `Wavecar`.\n- Simplified the `run_stats` declaration in the `Outcar` class by removing type annotations.\n- Modified the `data` and `phase_factors` declarations in the `Eigenval` class to use defaultdict without type annotations.\n- Adjusted the `__init__` method of the `Chgcar` class to handle different types of input for `poscar`.\n- Updated the `write_file` method in the `Poscar` class by removing the return type annotation.\n- Refactored the logic in the `evaluate_wavefunc` method of the `Wavecar` class to remove unnecessary type annotations.\n\ntests/io/vasp/test_sets.py: ## Short summary\n\nIn the `test_potcar` function of `test_sets.py`, the exception type in the assertion has been changed from `OSError` to `RuntimeError`.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives (User Provided Facts)\n\nThis pull request, numbered 3783 and titled \"Update `vasprun.converged_ionic` logic when `EDIFFG=0`, REDO of PR #3765,\" aims to enhance the logic within the `converged_ionic` method of the `Vasprun` class in the context of VASP simulations when the convergence criterion for ionic relaxation, `EDIFFG`, is set to zero. The description of the PR is brief, referring to a previous pull request (#3765), indicating that this PR is a follow-up or correction to the work done in that earlier submission.\n\n### Comments Summary\n\nA comment by `matthewkuner` indicates that the PR is ready for merging, highlighting that the failing tests are unrelated to the changes in this PR and are already failing in the main branch. This suggests that the changes in this PR are isolated and not responsible for the existing test failures.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request 3783 introduces significant changes in the `pymatgen` library, focusing on improving VASP output file handling and simplifying code structure:\n\n1. **Convergence Logic Enhancement**:\n - Updated `converged_ionic` method in `vasprun.py` to accommodate `EDIFFG=0`, ensuring accurate convergence status based on `ibrion` and `ediffg`.\n\n2. **Type Annotation Refinement**:\n - Removed type annotations from `__init__` methods of `Outcar`, `Locpot`, `Chgcar`, `Eigenval`, and `Wavecar`.\n - Simplified method declarations in `Outcar` and `Eigenval` classes by eliminating type annotations.\n\n3. **Code Refactoring**:\n - Enhanced input handling in the `Chgcar` class's `__init__` method.\n - Streamlined `write_file` method in `Poscar` class and `evaluate_wavefunc` method in `Wavecar` class by removing return type annotations.\n\n4. **Testing Update**:\n - Added `test_vasprun_ediffg_set_to_0` test method in `test_outputs.py` to validate `Vasprun` behavior with `EDIFFG=0`.\n\nThese modifications aim to enhance the accuracy and flexibility of VASP output processing in `pymatgen`, with a focus on convergence checks and code simplification.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between a4e76a4242b1d7e1616eaaef596d33966a8200e3 and 2ca15d4916efbbcbe7fae475b0a2c0fbbd4df173.\n</details>\n\n\n<details>\n<summary>Files selected for processing (1)</summary>\n\n* tests/io/vasp/test_sets.py (1 hunks)\n\n</details>\n\n\n\n\n\n\n\n<details><summary>Additional comments not posted (6)</summary><blockquote>\n<details><summary>tests/io/vasp/test_sets.py (6)</summary><blockquote>\n\nLine range hint `50-82`: The `test_sets_changed` method correctly checks for unintended changes in input sets by comparing SHA1 hashes.\n\n---\n\nLine range hint `84-97`: The `test_as_dict` method effectively ensures that all necessary data is included during the serialization of a `DictSet`.\n\n---\n\nLine range hint `99-111`: The `test_potcar_validation` method robustly checks for the correctness of POTCAR files under various simulated conditions.\n\n---\n\nLine range hint `113-125`: The `test_potcar_special_defaults` method effectively tests the application of user-defined settings in POTCAR files.\n\n---\n\nLine range hint `127-133`: The `test_lda_potcar` method correctly handles the conditional testing of LDA POTCAR files based on the availability of PSP directories.\n\n---\n\nLine range hint `135-153`: The `test_nelect` method comprehensively tests the calculation of the number of electrons (`NELECT`) under various conditions, including disordered structures.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- d20a4ac76b167d99a28f51345bc97ed539a05a0a -->\n<!-- ef127baad9857a2ade98a821aa9895c452b02441 -->\n<!-- a4e76a4242b1d7e1616eaaef596d33966a8200e3 -->\n<!-- 2ca15d4916efbbcbe7fae475b0a2c0fbbd4df173 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@janosh this is now ready to be merged. The tests that are failing are unrelated to this PR and are already failing in the main branch.",
"@janosh: it looks like the `OSError` --> `RuntimeError` fix in [PR #3781](https://github.com/materialsproject/pymatgen/pull/3781) was reverted in [PR #3771](https://github.com/materialsproject/pymatgen/pull/3771) and caused the tests on main to fail. Should be fixed now"
] | 2024-04-23T19:22:13
| 2024-04-23T22:57:10
|
2024-04-23T22:57:10Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
see #3765
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3783/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/3783/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3783",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3783",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3783.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3783.patch",
"merged_at": "2024-04-23T22:57:10Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3784
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3784/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3784/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3784/events
|
https://github.com/materialsproject/pymatgen/pull/3784
| 2,264,152,227
|
PR_kwDOACgets5twZiP
| 3,784
|
Fix for incorrect file path in `tests/io/test_zeopp.py`
|
{
"login": "AntObi",
"id": 30937913,
"node_id": "MDQ6VXNlcjMwOTM3OTEz",
"avatar_url": "https://avatars.githubusercontent.com/u/30937913?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AntObi",
"html_url": "https://github.com/AntObi",
"followers_url": "https://api.github.com/users/AntObi/followers",
"following_url": "https://api.github.com/users/AntObi/following{/other_user}",
"gists_url": "https://api.github.com/users/AntObi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AntObi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AntObi/subscriptions",
"organizations_url": "https://api.github.com/users/AntObi/orgs",
"repos_url": "https://api.github.com/users/AntObi/repos",
"events_url": "https://api.github.com/users/AntObi/events{/privacy}",
"received_events_url": "https://api.github.com/users/AntObi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe changes involve enhancing parameter descriptions, improving code readability, and updating file paths for better organization and accessibility within the codebase across multiple files in different directories.\n\n## Changes\n\n| File Path | Change Summary |\n|-----------------------------------|---------------------------------------------------------------------------------------------|\n| `pymatgen/core/structure.py` | Clarified the `distance` parameter description in the `perturb` method of the structure class. |\n| `pymatgen/util/due.py` | Updated logging message format from using `%s` to f-string interpolation for better readability and efficiency. |\n| `tests/analysis/test_graphs.py` | Split the condition in the `@pytest.mark.skipif` decorator over multiple lines for readability. |\n| `tests/io/test_zeopp.py` | Updated file paths in `test_from_file` method to include `io` subdirectory for CSSR file loading. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/core/structure.py, pymatgen/util/due.py: ## Short summary\n\nThe change in functionality involves clarifying the parameter description for the `distance` argument in the `perturb` method of the structure class in the `structure.py` file. Additionally, in `due.py`, the logging message format was updated from using `%s` to f-string interpolation for better readability and efficiency.\n\n\n---\n\ntests/analysis/test_graphs.py: ## Short Summary\n\nIn the `test_mul` method of `test_graphs.py`, a change was made to the `@pytest.mark.skipif` decorator by splitting the condition over multiple lines for better readability.\n\n\n---\n\ntests/io/test_zeopp.py: ## Short summary\n\nThe changes in the `test_zeopp.py` file involve updating file paths in the `test_from_file` method for loading CSSR files within the `io` directory. The paths have been adjusted to include the `io` subdirectory in the file path strings.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nPull Request #3784 aims to rectify the incorrect file paths in `tests/io/test_zeopp.py` that were causing test failures in the integration of `Zeo++` with pymatgen's `io/zeopp` module. The fixes involve updating the paths for specific CSSR files essential for testing, ensuring the tests can access these files correctly.\n\nThe key changes in this PR are:\n1. Correcting the file path for `EDI.cssr` from `f\"{TEST_FILES_DIR}/cssr/EDI.cssr\"` to `f\"{TEST_FILES_DIR}/io/cssr/EDI.cssr\"`.\n2. Fixing the file path for `EDI_oxistate_decorated.cssr` from `f\"{TEST_FILES_DIR}/cssr/EDI_oxistate_decorated.cssr\"` to `f\"{TEST_FILES_DIR}/io/cssr/EDI_oxistate_decorated.cssr\"`.\n\nAdditionally, the PR focuses on maintaining code quality by:\n- Adding Google format doc strings and validating them using `ruff`.\n- Including type annotations and ensuring their correctness with `mypy`.\n- Introducing tests to validate the corrections made.\n- Recommending the use of `pre-commit` hooks for automatic type and linting checks before each commit.\n\n### AI-Generated Summary of Generated Summaries\n\nThe updates in `test_zeopp.py` concentrate on adjusting file paths in the `test_from_file` method to load CSSR files from the `io` subdirectory. By modifying the paths to include the `io` subdirectory, the tests now accurately reference the CSSR files, resolving path-related issues and enabling successful test execution.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 2753f4c814d9d3805430fca2197e63c0c1b14455 and e64809bb356380b2838065118f443fee84d2dbb9.\n</details>\n\n\n<details>\n<summary>Files selected for processing (1)</summary>\n\n* pymatgen/util/due.py (1 hunks)\n\n</details>\n\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (1)</summary>\n\n* pymatgen/util/due.py\n\n</details>\n\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 7409b85ddcb47a3ef8efe0490cf72b1b892542aa -->\n<!-- 2753f4c814d9d3805430fca2197e63c0c1b14455 -->\n<!-- e64809bb356380b2838065118f443fee84d2dbb9 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"Ah, looks like a miss by me, thanks for fixing.\r\n\r\n@janosh, yes sure. It might be better for me to push #3684 forward to avoid future issues."
] | 2024-04-25T17:43:49
| 2024-04-26T01:48:16
|
2024-04-25T18:35:41Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
I've been testing using `Zeo++` with pymatgen using `io/zeopp` and found that some of the tests were failing. I've determined that the tests were failing due to incorrect file paths to the tests files.
Major changes: Fixed incorrect file path in zeopp test file
- fix 1: `f"{TEST_FILES_DIR}/cssr/EDI.cssr"` -> `f"{TEST_FILES_DIR}/io/cssr/EDI.cssr"`
- fix 2: `f"{TEST_FILES_DIR}/cssr/EDI_oxistate_decorated.cssr"` -> `f"{TEST_FILES_DIR}/io/cssr/EDI_oxistate_decorated.cssr"`
## 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": "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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3784/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/3784/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3784",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3784",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3784.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3784.patch",
"merged_at": "2024-04-25T18:35:41Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3785
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3785/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3785/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3785/events
|
https://github.com/materialsproject/pymatgen/pull/3785
| 2,264,310,102
|
PR_kwDOACgets5tw7dc
| 3,785
|
Fix `ruff` FURB192
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe updates involve modernizing Python syntax across multiple files, enhancing code readability and efficiency. Key changes include upgrading dependency versions in pre-commit hooks, streamlining imports, refining variable names for clarity, and adopting f-strings for string formatting. Improvements also focus on optimizing logic in parsing and data handling functions, particularly within various modules related to materials science and computational chemistry software.\n\n## Changes\n\n| Files | Summary of Changes |\n|-------|--------------------|\n| `.pre-commit-config.yaml` | Updated versions of `ruff-pre-commit`, `mirrors-mypy`, and `pyright-python`. |\n| `dev_scripts/update_pt_data.py` | Switched to direct import of `defaultdict` from `collections`, replacing `collections.defaultdict`. |\n| `pymatgen/analysis/...`, `pymatgen/core/...`, `pymatgen/electronic_structure/...`, `pymatgen/entries/...` | Replaced `collections.defaultdict` with `defaultdict` for enhanced readability. |\n| `pymatgen/analysis/diffraction/neutron.py`, `pymatgen/analysis/diffraction/xrd.py` | Renamed variables for clarity: `recip_latt` to `recip_lattice` and `dwfactors`/`_dwfactors` to `dw_factors`/`_dw_factors`. |\n| `pymatgen/analysis/dimensionality.py` | Modified to convert dimensionality to a string with \"D\" suffix using f-strings. |\n| `pymatgen/analysis/nmr.py`, `pymatgen/analysis/structure_matcher.py`, `pymatgen/core/surface.py` | Replaced `sorted` with `min` for efficiency in selection processes. |\n| `pymatgen/analysis/topological/spillage.py` | Updated variable names and print statements for clarity in `overlap_so_spinpol` method. |\n| `pymatgen/apps/borg/hive.py` | Revised file selection and search string construction logic in `assimilate` method. |\n| Various files across `pymatgen/command_line/...`, `pymatgen/core/...`, `pymatgen/io/...` | Implemented f-strings for better readability and efficiency. |\n| `pymatgen/electronic_structure/boltztrap.py`, `pymatgen/electronic_structure/boltztrap2.py` | Renamed variables for clarity in file operations and property plotting. |\n| `pymatgen/io/...` (multiple files) | Enhanced parsing logic and variable assignments using modern Python features like the walrus operator. |\n| `pymatgen/io/vasp/...` | Refactored file and DOS parsing, and INCAR settings adjustment for improved accuracy and flexibility. |\n\nThis table summarizes the changes made across various files, focusing on enhancements in code quality and maintenance.\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n.pre-commit-config.yaml: ## Short summary\n\nThe `.pre-commit-config.yaml` file has been updated to bump the versions of several pre-commit hooks:\n- `ruff-pre-commit` from v0.4.1 to v0.4.2\n- `mirrors-mypy` from v1.9.0 to v1.10.0\n- `pyright-python` from v1.1.359 to v1.1.360.\n\n---\n\ndev_scripts/update_pt_data.py: ## Short summary\n\nThe `update_pt_data.py` script underwent changes where the `collections` module was removed and `defaultdict` was imported directly. The script now uses `defaultdict` instead of `collections.defaultdict` for managing dictionaries.\n\n---\n\npymatgen/analysis/bond_valence.py, pymatgen/analysis/diffraction/core.py, pymatgen/analysis/disorder.py, pymatgen/analysis/phase_diagram.py, pymatgen/analysis/structure_analyzer.py, pymatgen/analysis/xps.py, pymatgen/core/bonds.py, pymatgen/core/composition.py, pymatgen/core/lattice.py, pymatgen/core/structure.py, pymatgen/core/units.py, pymatgen/electronic_structure/bandstructure.py, pymatgen/entries/entry_tools.py: ## Short summary\n\nReplaced `collections.defaultdict` with `defaultdict` from the `collections` module across various files and methods to streamline code and enhance readability.\n\n---\n\npymatgen/analysis/diffraction/neutron.py, pymatgen/analysis/diffraction/xrd.py: ## Short summary\n\nRenamed variables related to reciprocal lattice and Debye-Waller factors for clarity and consistency across `neutron.py` and `xrd.py` files. The variable `recip_latt` is renamed to `recip_lattice`, and `dwfactors`/`_dwfactors` to `dw_factors`/`_dw_factors`.\n\n---\n\npymatgen/analysis/dimensionality.py: ## Short summary\n\nIn the `get_dimensionality_cheon` function within `dimensionality.py`, the changes involve converting the calculated dimensionality to a string with a \"D\" suffix using f-strings.\n\n---\n\npymatgen/analysis/nmr.py: ## Short summary\n\nIn the `V_xx` method, modified to use `min` instead of `sorted` to find the minimum absolute value in the diagonal elements of the principal axis system.\n\n---\n\npymatgen/analysis/structure_matcher.py, pymatgen/core/surface.py: ## Short summary\n\nReplaced the `sorted` function with `min` in `get_rms_anonymous` method and `build_slabs` method to optimize selection processes.\n\n---\n\npymatgen/analysis/topological/spillage.py: ## Short summary\n\nUpdated variable names and print statements in the `overlap_so_spinpol` method for clarity. Variables `gmax`, `nkmax`, `kmax` renamed to `gamma_max`, `n_kmax`, `k_max`.\n\n---\n\npymatgen/apps/borg/hive.py: ## Short summary\n\nRevised the logic for selecting VASP run files and constructing file search strings in the `assimilate` method of the `Hive` class.\n\n---\n\npymatgen/command_line/critic2_caller.py, pymatgen/command_line/gulp_caller.py, pymatgen/command_line/vampire_caller.py, pymatgen/core/ion.py, pymatgen/electronic_structure/plotter.py, pymatgen/entries/correction_calculator.py, pymatgen/io/aims/inputs.py, pymatgen/io/cp2k/inputs.py, pymatgen/io/lammps/data.py, pymatgen/io/lammps/inputs.py, pymatgen/io/lobster/inputs.py, pymatgen/io/lobster/lobsterenv.py, pymatgen/io/pwscf.py: ## Short summary\n\nUpdated string formatting to use f-strings for better readability and efficiency across various methods and files.\n\n---\n\npymatgen/electronic_structure/boltztrap.py, pymatgen/electronic_structure/boltztrap2.py: ## Short summary\n\nRenamed variables for clarity in file writing operations and plotting properties. Variables `oi`, `o`, `i`, `di` renamed to `orb_idx`, `orb`, `kpt_idx`, `dop_idx`.\n\n---\n\npymatgen/electronic_structure/core.py: ## Short summary\n\nUpdated variable names related to transformation matrices in the `get_moment` method for clarity.\n\n---\n\npymatgen/io/adf.py, pymatgen/io/gaussian.py, pymatgen/io/nwchem.py: ## Short summary\n\nRefactored parsing logic and variable assignments using modern Python syntax features like the walrus operator for enhanced readability and maintainability.\n\n---\n\npymatgen/io/cif.py, pymatgen/io/common.py, pymatgen/io/cp2k/utils.py, pymatgen/io/feff/outputs.py: ## Short summary\n\nMinor modifications to variable names, string formatting, and regex patterns for improved clarity and efficiency in parsing and data handling.\n\n---\n\npymatgen/io/vasp/inputs.py, pymatgen/io/vasp/outputs.py, pymatgen/io/vasp/sets.py: ## Short summary\n\nRefactored handling of file parsing, DOS information parsing, and INCAR settings adjustment. Enhanced accuracy and flexibility in VASP input generation and optimized regular expression usage.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThis pull request, titled \"Fix `ruff` FURB192\" and numbered 3785, primarily addresses a specific issue identified as FURB192, which is detailed in the documentation at the provided link. The description briefly mentions that the changes include both a bug fix and some refactoring efforts across various parts of the codebase. The link to the documentation suggests that the issue pertains to a rule or set of rules in a system named `ruff`, which likely relates to code quality or style enforcement.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request introduces a series of updates and refactoring across multiple files and modules, focusing on enhancing code readability, efficiency, and maintainability. Key changes include:\n\n1. **Pre-commit Hook Version Updates**: The versions of several pre-commit hooks have been updated in the `.pre-commit-config.yaml` file, ensuring compatibility and leveraging the latest features of tools like `ruff-pre-commit`, `mirrors-mypy`, and `pyright-python`.\n\n2. **Direct Import Optimization**: In various scripts and modules, `collections.defaultdict` has been replaced with a direct import of `defaultdict`. This change simplifies the import statements and is applied across numerous files in the `pymatgen` library, such as `bond_valence.py`, `diffraction/core.py`, and others.\n\n3. **Variable Renaming for Clarity**: Several files have undergone variable renaming to enhance clarity and consistency. For example, in `neutron.py` and `xrd.py`, `recip_latt` has been renamed to `recip_lattice` and `dwfactors` to `dw_factors`. Similar renaming for clarity is seen in methods related to electronic structure and file handling operations.\n\n4. **String Formatting and Modern Python Features**: The use of modern Python syntax features like f-strings and the walrus operator has been expanded to improve readability and efficiency. This includes updates in file parsing, data handling, and logging across various modules such as `cif.py`, `common.py`, and `vasp/inputs.py`.\n\n5. **Optimization of Selection Processes**: The use of `min` instead of `sorted` for finding minimum values has been implemented in methods like `V_xx` in `nmr.py` and `get_rms_anonymous` in `structure_matcher.py`, optimizing the selection processes.\n\n6. **Refactoring and Enhanced Parsing Logic**: Significant refactoring has been done in the handling of file parsing and data processing, particularly in VASP-related files (`vasp/inputs.py`, `vasp/outputs.py`). This includes more accurate and flexible parsing of DOS information and INCAR settings, as well as optimized regex usage.\n\nThese changes collectively aim to improve the performance, readability, and maintainability of the codebase, aligning with modern Python coding practices and enhancing the functionality of the software.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between f52c9218893644ab5233b330d0689c98323238c3 and 4f890f623a3d77a65eb8420da907b569e1a2dfd4.\n</details>\n\n\n<details>\n<summary>Files selected for processing (55)</summary>\n\n* .pre-commit-config.yaml (3 hunks)\n* dev_scripts/update_pt_data.py (3 hunks)\n* pymatgen/analysis/bond_valence.py (4 hunks)\n* pymatgen/analysis/diffraction/core.py (3 hunks)\n* pymatgen/analysis/diffraction/neutron.py (3 hunks)\n* pymatgen/analysis/diffraction/xrd.py (4 hunks)\n* pymatgen/analysis/dimensionality.py (3 hunks)\n* pymatgen/analysis/disorder.py (2 hunks)\n* pymatgen/analysis/nmr.py (1 hunks)\n* pymatgen/analysis/phase_diagram.py (3 hunks)\n* pymatgen/analysis/structure_analyzer.py (3 hunks)\n* pymatgen/analysis/structure_matcher.py (1 hunks)\n* pymatgen/analysis/topological/spillage.py (2 hunks)\n* pymatgen/analysis/xps.py (2 hunks)\n* pymatgen/apps/borg/hive.py (2 hunks)\n* pymatgen/command_line/critic2_caller.py (1 hunks)\n* pymatgen/command_line/gulp_caller.py (3 hunks)\n* pymatgen/command_line/vampire_caller.py (2 hunks)\n* pymatgen/core/bonds.py (2 hunks)\n* pymatgen/core/composition.py (8 hunks)\n* pymatgen/core/interface.py (2 hunks)\n* pymatgen/core/ion.py (1 hunks)\n* pymatgen/core/lattice.py (6 hunks)\n* pymatgen/core/operations.py (1 hunks)\n* pymatgen/core/structure.py (12 hunks)\n* pymatgen/core/surface.py (1 hunks)\n* pymatgen/core/tensors.py (1 hunks)\n* pymatgen/core/units.py (5 hunks)\n* pymatgen/electronic_structure/bandstructure.py (7 hunks)\n* pymatgen/electronic_structure/boltztrap.py (3 hunks)\n* pymatgen/electronic_structure/boltztrap2.py (3 hunks)\n* pymatgen/electronic_structure/core.py (1 hunks)\n* pymatgen/electronic_structure/plotter.py (14 hunks)\n* pymatgen/entries/correction_calculator.py (1 hunks)\n* pymatgen/entries/entry_tools.py (2 hunks)\n* pymatgen/ext/matproj_legacy.py (1 hunks)\n* pymatgen/io/abinit/inputs.py (2 hunks)\n* pymatgen/io/adf.py (4 hunks)\n* pymatgen/io/aims/inputs.py (2 hunks)\n* pymatgen/io/cif.py (2 hunks)\n* pymatgen/io/common.py (1 hunks)\n* pymatgen/io/cp2k/inputs.py (1 hunks)\n* pymatgen/io/cp2k/utils.py (1 hunks)\n* pymatgen/io/feff/outputs.py (3 hunks)\n* pymatgen/io/gaussian.py (4 hunks)\n* pymatgen/io/lammps/data.py (2 hunks)\n* pymatgen/io/lammps/inputs.py (1 hunks)\n* pymatgen/io/lobster/inputs.py (2 hunks)\n* pymatgen/io/lobster/lobsterenv.py (1 hunks)\n* pymatgen/io/lobster/outputs.py (2 hunks)\n* pymatgen/io/nwchem.py (4 hunks)\n* pymatgen/io/pwscf.py (1 hunks)\n* pymatgen/io/vasp/inputs.py (2 hunks)\n* pymatgen/io/vasp/outputs.py (6 hunks)\n* pymatgen/io/vasp/sets.py (3 hunks)\n\n</details>\n\n\n<details>\n<summary>Files not processed due to max files limit (16)</summary>\n\n* pymatgen/io/xcrysden.py\n* pymatgen/io/xyz.py\n* pymatgen/io/zeopp.py\n* pymatgen/symmetry/maggroups.py\n* pymatgen/symmetry/settings.py\n* pymatgen/util/coord.py\n* pymatgen/util/string.py\n* tests/analysis/chemenv/connectivity/test_connected_components.py\n* tests/analysis/test_surface_analysis.py\n* tests/core/test_lattice.py\n* tests/files/.pytest-split-durations\n* tests/io/abinit/test_pseudos.py\n* tests/io/cp2k/test_sets.py\n* tests/io/lammps/test_data.py\n* tests/io/test_cif.py\n* tests/io/vasp/test_outputs.py\n\n</details>\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (7)</summary>\n\n* .pre-commit-config.yaml\n* pymatgen/analysis/diffraction/neutron.py\n* pymatgen/command_line/critic2_caller.py\n* pymatgen/command_line/vampire_caller.py\n* pymatgen/io/cif.py\n* pymatgen/io/cp2k/inputs.py\n* pymatgen/io/lammps/inputs.py\n\n</details>\n\n\n\n<details><summary>Additional comments not posted (98)</summary><blockquote>\n<details><summary>pymatgen/analysis/disorder.py (2)</summary><blockquote>\n\n`6-6`: Optimized import of `defaultdict` directly from `collections`.\n\n---\n\n`27-28`: Usage of `defaultdict` is consistent with the new import statement.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/xps.py (2)</summary><blockquote>\n\n`22-22`: Optimized import of `defaultdict` directly from `collections`.\n\n---\n\n`52-52`: Usage of `defaultdict` is consistent with the new import statement.\n\n</blockquote></details>\n<details><summary>pymatgen/io/cp2k/utils.py (1)</summary><blockquote>\n\n`90-90`: Updated regex pattern to correctly handle variable substitution in the `preprocessor` function.\n\n</blockquote></details>\n<details><summary>pymatgen/core/bonds.py (2)</summary><blockquote>\n\n`10-10`: Optimized import of `defaultdict` directly from `collections`.\n\n---\n\n`23-23`: Usage of `defaultdict` is consistent with the new import statement.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/nmr.py (1)</summary><blockquote>\n\n`168-168`: Optimized the selection of the minimum absolute value in the `V_xx` method using `min` instead of `sorted`.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/diffraction/core.py (2)</summary><blockquote>\n\n`6-6`: Optimized import of `defaultdict` directly from `collections`.\n\n---\n\n`218-218`: Optimized the comparison logic in the `is_perm` function using NumPy functions for improved efficiency.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/topological/spillage.py (1)</summary><blockquote>\n\n`203-211`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [206-227]\n\nUpdated variable names and print statements in the `overlap_so_spinpol` method for clarity.\n\n</blockquote></details>\n<details><summary>dev_scripts/update_pt_data.py (2)</summary><blockquote>\n\n`157-157`: Direct import of `defaultdict` used appropriately.\n\n---\n\n`280-280`: Usage of `defaultdict(list)` is appropriate for managing lists of ionization energies.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/diffraction/xrd.py (2)</summary><blockquote>\n\n`162-162`: Renamed variable `recip_latt` to `recip_lattice` for clarity.\n\n---\n\n`175-175`: Renamed variable `_dwfactors` to `_dw_factors` for clarity.\n\n</blockquote></details>\n<details><summary>pymatgen/entries/entry_tools.py (2)</summary><blockquote>\n\n`15-15`: Added direct import for `defaultdict` from `collections`.\n\n---\n\n`118-118`: Replaced `collections.defaultdict` with `defaultdict` following the direct import.\n\n</blockquote></details>\n<details><summary>pymatgen/core/ion.py (4)</summary><blockquote>\n\n`58-58`: Updated to use f-string for charge calculation.\n\n---\n\n`60-60`: Updated to use f-string for charge calculation.\n\n---\n\n`62-63`: Updated to use f-string for charge calculation.\n\n---\n\n`70-70`: Updated to use f-string for charge calculation.\n\n</blockquote></details>\n<details><summary>pymatgen/io/feff/outputs.py (4)</summary><blockquote>\n\n`67-68`: Renamed variables `pot_read_start` and `pot_read_end` for clarity.\n\n---\n\n`75-75`: Adjusted file path for `pot.inp` using regex substitution.\n\n---\n\n`91-91`: Renamed variable `pot_string` to `pot_string` for clarity.\n\n---\n\n`98-100`: Renamed variable `e_fermi` to `e_fermi` for clarity.\n\n</blockquote></details>\n<details><summary>pymatgen/electronic_structure/core.py (1)</summary><blockquote>\n\n`221-226`: Variable renaming enhances clarity and maintains existing logic.\n\n</blockquote></details>\n<details><summary>pymatgen/apps/borg/hive.py (1)</summary><blockquote>\n\n`127-128`: Using `max` instead of `sorted` for selecting the last file alphabetically is more efficient.\n\n</blockquote></details>\n<details><summary>pymatgen/io/common.py (1)</summary><blockquote>\n\n`264-271`: Renaming the variable to `total_spin_dens` improves clarity and the calculations are correctly adjusted.\n\n</blockquote></details>\n<details><summary>pymatgen/io/pwscf.py (2)</summary><blockquote>\n\n`462-465`: Parameter renaming from `numstr` to `num_str` improves readability and adheres to Python naming conventions.\n\n---\n\n`473-473`: Use of f-string for error messages enhances readability and is consistent with modern Python practices.\n\n</blockquote></details>\n<details><summary>pymatgen/entries/correction_calculator.py (1)</summary><blockquote>\n\n`409-409`: Use of f-string for filename construction enhances readability and maintainability.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/bond_valence.py (1)</summary><blockquote>\n\n`8-8`: Direct import of `defaultdict` simplifies the import statements and enhances code readability.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/dimensionality.py (3)</summary><blockquote>\n\n`350-350`: Using f-strings for dimensionality output enhances readability and ensures consistent formatting.\n\n---\n\n`364-364`: Using f-strings for dimensionality output enhances readability and ensures consistent formatting.\n\n---\n\n`375-375`: Using f-strings for dimensionality output enhances readability and ensures consistent formatting.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/structure_analyzer.py (3)</summary><blockquote>\n\n`6-6`: Optimized import of `defaultdict` directly from `collections`.\n\n---\n\n`230-230`: Use of `defaultdict` for initializing `data` enhances readability and prevents key errors.\n\n---\n\n`445-445`: Use of `defaultdict` in `parse_oxide` method simplifies accumulation of species occurrences.\n\n</blockquote></details>\n<details><summary>pymatgen/io/aims/inputs.py (2)</summary><blockquote>\n\n`509-509`: Use of f-string for creating a header line enhances readability and maintainability.\n\n---\n\n`546-546`: Modification of condition check to use `is False` instead of `not in` improves clarity and correctness.\n\n</blockquote></details>\n<details><summary>pymatgen/core/operations.py (1)</summary><blockquote>\n\n`406-407`: Renaming variable `m` to `matrix` enhances code readability and clarity.\n\n</blockquote></details>\n<details><summary>pymatgen/core/units.py (5)</summary><blockquote>\n\n`13-13`: Direct import of `defaultdict` from `collections` simplifies the import statements and enhances code readability.\n\n---\n\n`179-179`: Using `defaultdict` for initializing `unit` dictionary simplifies handling of default values and improves code maintainability.\n\n---\n\n`191-191`: Utilization of `defaultdict` in `__mul__` method ensures that the unit dictionary handles non-existent keys gracefully, improving robustness.\n\n---\n\n`199-199`: Application of `defaultdict` in `__truediv__` method aids in managing unit calculations more effectively, enhancing code reliability.\n\n---\n\n`232-232`: Adoption of `defaultdict` in `as_base_units` method facilitates complex unit conversions by automatically handling missing units, thus improving the function's reliability.\n\n</blockquote></details>\n<details><summary>pymatgen/command_line/gulp_caller.py (2)</summary><blockquote>\n\n`290-290`: Improved string formatting using f-strings for lattice parameters enhances readability and maintainability.\n\n---\n\n`697-706`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [676-703]\n\nEnhanced string concatenation using f-strings in the `run` method improves readability and maintainability. Verify that the output format aligns with expected results.\n\n</blockquote></details>\n<details><summary>pymatgen/io/adf.py (2)</summary><blockquote>\n\n`692-701`: Ensure consistent handling of run types in the parsing logic.\n\nVerify that all potential run types are handled correctly and that the `None` assignment for the 'CREATE' run type is intentional and documented.\n\n---\n\n`725-745`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [717-742]\n\nRefactor energy and structure parsing logic for 'GeometryOptimization' run type.\n\n```diff\n- match = cycle_patt.search(line)\n- if match:\n- cycle = int(match.group(1))\n- if cycle <= 0:\n- raise AdfOutputError(f\"Wrong {cycle=}\")\n- if cycle > last_cycle:\n- parse_cycle = True\n- last_cycle = cycle\n- else:\n- parse_final = True\n- elif parse_cycle:\n- match = coord_patt.search(line)\n- if match:\n- sites.append([match.groups()[1], list(map(float, match.groups()[2:]))])\n- else:\n- match = energy_patt.search(line)\n- if match:\n- self.energies.append(float(match.group(1)))\n- mol = self._sites_to_mol(sites)\n- self.structures.append(mol)\n- parse_cycle = False\n- sites = []\n- elif parse_final:\n- match = final_energy_patt.search(line)\n- if match:\n- self.final_energy = float(match.group(1))\n+ if (match := cycle_patt.search(line)):\n+ cycle = int(match.group(1))\n+ if cycle <= 0:\n+ raise AdfOutputError(f\"Wrong {cycle=}\")\n+ parse_cycle, last_cycle = cycle > last_cycle, cycle\n+ parse_final = not parse_cycle\n+ elif parse_cycle and (match := coord_patt.search(line)):\n+ sites.append([match.groups()[1], list(map(float, match.groups()[2:]))])\n+ elif parse_cycle and (match := energy_patt.search(line)):\n+ self.energies.append(float(match.group(1)))\n+ mol = self._sites_to_mol(sites)\n+ self.structures.append(mol)\n+ parse_cycle, sites = False, []\n+ elif parse_final and (match := final_energy_patt.search(line)):\n+ self.final_energy = float(match.group(1))\n```\nThis refactoring simplifies the nested conditionals and uses the walrus operator to streamline the parsing logic, enhancing readability and maintainability.\n\n</blockquote></details>\n<details><summary>pymatgen/io/lobster/inputs.py (1)</summary><blockquote>\n\n`714-721`: Validate energy range calculation from `Vasprun` data.\n\nEnsure that the energy range calculations are correct and consider edge cases where the minimum or maximum energy might not be straightforward due to data anomalies.\n\n</blockquote></details>\n<details><summary>pymatgen/io/nwchem.py (8)</summary><blockquote>\n\n`745-747`: Use of the walrus operator for concise code.\n\nThis change leverages the walrus operator to streamline the assignment and condition check, enhancing readability and maintainability.\n\n---\n\n`759-765`: Refactor coordinate and lattice vector parsing.\n\nThe refactoring here uses regular expressions to parse coordinates and lattice vectors more cleanly. This change improves the clarity and efficiency of the parsing logic.\n\n---\n\n`768-770`: Enhanced force parsing using regular expressions.\n\nThe use of regular expressions here allows for a more robust and error-resistant parsing of force data, which is crucial for accurate simulations.\n\n---\n\n`851-853`: Energy parsing with immediate conversion to electron volts.\n\nParsing energy and converting it directly to a more commonly used unit (eV) simplifies further processing and is a good practice for maintaining clarity in units throughout the code.\n\n---\n\n`857-862`: Handling of different energy phases in COSMO calculations.\n\nThis segment effectively separates the handling of different phases in COSMO calculations, allowing for clearer distinctions and easier maintenance of the code related to energy calculations.\n\n---\n\n`864-866`: Solvent phase energy parsing and storage.\n\nProperly parsing and storing solvent phase energy ensures that all relevant thermodynamic data is captured and available for downstream analysis.\n\n---\n\n`868-874`: Parsing of preamble properties with dynamic key modification.\n\nThis approach to parsing the preamble allows for flexible handling of various properties by dynamically adjusting the keys, which enhances the adaptability of the parser to different output formats.\n\n---\n\n`912-914`: Correction factors parsing with unit conversion.\n\nParsing correction factors and immediately converting them to a consistent unit (eV/atom) is a good practice, ensuring that all thermodynamic properties are comparable and easily interpretable.\n\n</blockquote></details>\n<details><summary>pymatgen/core/tensors.py (1)</summary><blockquote>\n\n`243-243`: Refactored string construction using f-string for improved readability and performance.\n\n</blockquote></details>\n<details><summary>pymatgen/io/abinit/inputs.py (1)</summary><blockquote>\n\n`901-902`: Check the calculation of the triple product for lattice vectors.\n\nEnsure that the calculation correctly handles cases where the determinant might be very close to zero due to floating-point precision issues. Consider adding a small epsilon value to the condition to avoid false negatives.\n\n</blockquote></details>\n<details><summary>pymatgen/electronic_structure/bandstructure.py (4)</summary><blockquote>\n\n`248-248`: Ensure that the `defaultdict` is imported correctly as per the new changes.\n\n---\n\n`277-277`: Ensure that the `defaultdict` is imported correctly as per the new changes.\n\n---\n\n`352-352`: Ensure that the `defaultdict` is imported correctly as per the new changes.\n\n---\n\n`417-417`: Ensure that the `defaultdict` is imported correctly as per the new changes.\n\n</blockquote></details>\n<details><summary>pymatgen/electronic_structure/boltztrap2.py (3)</summary><blockquote>\n\n`1095-1099`: Variable renaming enhances code clarity.\n\nThe renaming of `i` to `idx` and `di` to `dop_idx` in the loops improves readability and makes the code more understandable.\n\n---\n\n`1112-1117`: Ensure consistent use of variable names.\n\nThe renaming of variables in the loops should be consistently applied throughout the method to avoid confusion and potential bugs.\n\n---\n\n`1131-1142`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1124-1139]\n\nUpdate legend title to include `dop_type`.\n\nThe modification of the legend title to include the `dop_type` variable is a good practice as it provides more context to the plot, making it easier for users to understand the data being represented.\n\n</blockquote></details>\n<details><summary>pymatgen/analysis/structure_matcher.py (1)</summary><blockquote>\n\n`982-982`: Optimized selection process by using `min` instead of `sorted`.\n\nThis change should enhance performance by reducing the complexity of finding the minimum value, as `min` is more efficient than `sorted` for this purpose.\n\n</blockquote></details>\n<details><summary>pymatgen/core/composition.py (1)</summary><blockquote>\n\n`227-227`: Ensure that the use of `defaultdict` is consistent across the file to maintain readability and avoid confusion.\n\nPlease verify that `defaultdict` is used consistently in similar contexts throughout the file.\n\n</blockquote></details>\n<details><summary>pymatgen/io/gaussian.py (6)</summary><blockquote>\n\n`180-181`: Use of the walrus operator enhances readability and reduces redundancy.\n\n---\n\n`193-194`: Refactoring to use the walrus operator in coordinate parsing improves code conciseness.\n\n---\n\n`296-298`: Ensure that the match from the regex is not None before accessing groups to avoid potential errors.\n\n```diff\n- assert match is not None\n+ if match is None:\n+ raise ValueError(\"Expected pattern not found in line.\")\n```\n\n---\n\n`1035-1036`: Good use of the walrus operator in PCM energy parsing to streamline the code.\n\n---\n\n`1038-1039`: Efficient use of the walrus operator for parsing total energy in PCM calculations.\n\n---\n\n`1041-1042`: Effective use of the walrus operator for parsing PCM parameters, enhancing code clarity.\n\n</blockquote></details>\n<details><summary>pymatgen/io/lobster/lobsterenv.py (1)</summary><blockquote>\n\n`607-610`: Refactor variable name and logic in `_get_plot_label`.\n\nThe renaming from `plotlabel` to `label` and the adjustment in concatenation logic when `per_bond` is True are clear and enhance readability. Ensure that all references to this variable are updated accordingly.\n\n</blockquote></details>\n<details><summary>pymatgen/io/lammps/data.py (2)</summary><blockquote>\n\n`219-219`: Renaming `m` to `matrix` improves code readability.\n\n---\n\n`220-220`: Updating string formatting to use f-strings enhances readability and performance.\n\n</blockquote></details>\n<details><summary>pymatgen/ext/matproj_legacy.py (1)</summary><blockquote>\n\n`645-645`: Optimization of selection process using `min` instead of `sorted` is efficient and correctly implemented.\n\n</blockquote></details>\n<details><summary>pymatgen/core/lattice.py (4)</summary><blockquote>\n\n`9-9`: Replace `collections.defaultdict` with a direct import of `defaultdict` for improved readability and conciseness.\n\n---\n\n`1320-1324`: Update documentation to clarify the return values and parameter names, changing `fcoord` to `frac_coord`.\n\n---\n\n`1378-1382`: Update documentation to clarify the return values and parameter names, changing `fcoord` to `frac_coord`.\n\n---\n\n`1435-1439`: Update documentation to clarify the return values and parameter names, changing `fcoord` to `frac_coord`.\n\n</blockquote></details>\n<details><summary>pymatgen/io/lobster/outputs.py (1)</summary><blockquote>\n\n`1334-1350`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1337-1359]\n\nOptimize the initialization of dictionaries with defaultdict.\n\n```diff\n- eigenvals[Spin.up] = [[defaultdict(float) for _ in range(self.number_kpts)] for _ in range(self.nbands)]\n+ eigenvals[Spin.up] = [[defaultdict(float) for _ in range(self.number_kpts)] for _ in range(self.nbands)]\n- p_eigenvals[Spin.up] = [\n- [\n- {\n- str(elem): {str(orb): defaultdict(float) for orb in atom_orbital_dict[elem]}\n- for elem in atom_names\n- }\n- for _ in range(self.number_kpts)\n- ]\n- for _ in range(self.nbands)\n- ]\n+ p_eigenvals[Spin.up] = [\n+ [\n+ {\n+ str(elem): {str(orb): defaultdict(float) for orb in atom_orbital_dict[elem]}\n+ for elem in atom_names\n+ }\n+ for _ in range(self.number_kpts)\n+ ]\n+ for _ in range(self.nbands)\n+ ]\n```\n\n</blockquote></details>\n<details><summary>pymatgen/core/surface.py (1)</summary><blockquote>\n\n`1908-1908`: The change from `sorted` to `max` in the `build_slabs` method is not visible in the provided code. Please ensure that the intended change is correctly implemented in the codebase.\n\n</blockquote></details>\n<details><summary>pymatgen/electronic_structure/boltztrap.py (1)</summary><blockquote>\n\n`376-391`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [379-425]\n\nVariable renaming enhances clarity and consistency.\n\nConsider refactoring this method to improve readability and maintainability, possibly by breaking it down into smaller, more focused methods.\n\n</blockquote></details>\n<details><summary>pymatgen/io/vasp/inputs.py (1)</summary><blockquote>\n\n`2611-2611`: Ensure proper error handling in `from_file` method.\n\nConsider adding error handling for file operations and parsing to ensure robustness, especially given the complexity of POSCAR file formats.\n\n</blockquote></details>\n<details><summary>pymatgen/core/interface.py (1)</summary><blockquote>\n\n`2784-2784`: Use `max` instead of `sorted` for optimization.\n\nEnsure that the renaming of variables is consistent across the entire codebase.\n\n</blockquote></details>\n<details><summary>pymatgen/electronic_structure/plotter.py (7)</summary><blockquote>\n\nLine range hint `53-66`: Initialization of `DosPlotter` looks good with appropriate defaults and clear documentation.\n\n---\n\nLine range hint `68-86`: Method `add_dos` is well-implemented with considerations for different plotting configurations.\n\n---\n\nLine range hint `88-98`: Method `add_dos_dict` effectively handles adding multiple DOS objects with optional sorting.\n\n---\n\nLine range hint `100-106`: Method `get_dos_dict` correctly ensures JSON serialization of DOS data using `jsanitize`.\n\n---\n\nLine range hint `108-204`: Method `get_plot` is comprehensive and well-implemented, providing extensive configurability and consistent aesthetics for DOS plots.\n\n---\n\nLine range hint `206-211`: Method `save_plot` effectively uses `get_plot` and `matplotlib` functionality to save DOS plots.\n\n---\n\nLine range hint `213-218`: Method `show` correctly uses `get_plot` and `matplotlib` functionality to display DOS plots.\n\n</blockquote></details>\n<details><summary>pymatgen/core/structure.py (1)</summary><blockquote>\n\n`21-21`: Direct import of `defaultdict` used as per summary.\n\n</blockquote></details>\n<details><summary>pymatgen/io/vasp/outputs.py (1)</summary><blockquote>\n\n`2425-2434`: > :memo: **NOTE**\n> This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [2430-2440]\n\nOptimize the parsing of unsymmetrized tensors.\n\nThe current implementation for parsing unsymmetrized tensors involves multiple nested loops and regex searches which can be inefficient. Consider using vectorized operations or more efficient data structures to improve the performance of this section.\n```diff\n- for mt in micro_table_pattern.finditer(table_text):\n- table_body_text = mt.group(\"table_body\")\n- tensor_matrix = []\n- for line in table_body_text.rstrip().split(\"\\n\"):\n- ml = row_pat.search(line)\n- processed_line = [float(v) for v in ml.groups()]\n- tensor_matrix.append(processed_line)\n- unsym_tensors.append(tensor_matrix)\n+ # Example refactored code using more efficient operations\n```\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 4f890f623a3d77a65eb8420da907b569e1a2dfd4 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-04-25T19:06:53
| 2024-04-25T19:21:03
|
2024-04-25T19:17:31Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
plus refactoring
FURB192: https://docs.astral.sh/ruff/rules/sorted-min-max
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3785/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/3785/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3785",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3785",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3785.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3785.patch",
"merged_at": "2024-04-25T19:17:31Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3786
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3786/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3786/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3786/events
|
https://github.com/materialsproject/pymatgen/pull/3786
| 2,264,850,320
|
PR_kwDOACgets5tyxr2
| 3,786
|
Install optional `boltztrap2` and `pygraphviz` in CI
|
{
"login": "DanielYang59",
"id": 80093591,
"node_id": "MDQ6VXNlcjgwMDkzNTkx",
"avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DanielYang59",
"html_url": "https://github.com/DanielYang59",
"followers_url": "https://api.github.com/users/DanielYang59/followers",
"following_url": "https://api.github.com/users/DanielYang59/following{/other_user}",
"gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}",
"starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions",
"organizations_url": "https://api.github.com/users/DanielYang59/orgs",
"repos_url": "https://api.github.com/users/DanielYang59/repos",
"events_url": "https://api.github.com/users/DanielYang59/events{/privacy}",
"received_events_url": "https://api.github.com/users/DanielYang59/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5578251138,
"node_id": "LA_kwDOACgets8AAAABTH1bgg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ci",
"name": "ci",
"color": "4E135C",
"default": false,
"description": "Continuous integration"
},
{
"id": 5585018768,
"node_id": "LA_kwDOACgets8AAAABTOSfkA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/pkg",
"name": "pkg",
"color": "EFE8DB",
"default": false,
"description": "Package health and distribution related stuff"
}
] |
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 |
[
"do we want to merge this as partially complete and leave some of the todos for later?",
"Thanks for asking. I was facing some resistance while trying to install them (maybe that's the reason they're not installed in CI). And what make things worse is that I never use any of these.\r\nSome help would be appreciated:\r\n- `graphviz` seems to install just fine but is still[ skipped in CI](https://github.com/materialsproject/pymatgen/actions/runs/8842426425/job/24281052999) for some reason (check the end of log for split 2).\r\n- `boltztrap2` is installed in Ubuntu, and [revealed one broken unit test](https://github.com/materialsproject/pymatgen/actions/runs/8868223278/job/24347580018)\r\n\r\nUPDATE: `boltztrap2` installation [doesn't look quite reliable](https://github.com/materialsproject/pymatgen/actions/runs/8872222814/job/24356282767) for some reason? It [used to work just fine](https://github.com/materialsproject/pymatgen/pull/3786/commits/68b678a286a35233e594f5a22091b3e68d2346cd), but currently show some installation errors. We would have to drop it if so.\r\n",
"@janosh Perhaps we could merge this as partially finished (as you suggested) and I would work towards the remaining parts shortly. The CI test failure is reported in #3969 and would be fixed by #3972, thanks!",
"Regarding the installation of `BolzTraP2` on Windows, I'm afraid [it wouldn't be an easy fix owing to the difference in `cmake` behavior](https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/20#note_2032779686). Let's install it on Linux only for now until we have a solution. \r\n\r\nI would look into why `uv` failed to install it on Linux later."
] | 2024-04-26T02:42:19
| 2024-08-24T13:43:28
|
2024-08-06T14:57:48Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Install some optional dependencies in CI, to fix #3684.
- Fix patch for `bader_caller` (setting `PATH` to empty is easier than changing the `patch` location, and serves the same result where `bader` cannot be found in `PATH`)
### Partially installed on Ubuntu
- `boltztrap2`: only with `pip` (`uv` wouldn't work for now https://github.com/astral-sh/uv/issues/5816#issuecomment-2272506763)
- `pygraphviz`: [installation guide](https://pygraphviz.github.io/documentation/stable/install.html#macos)
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3786/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/3786/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3786",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3786",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3786.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3786.patch",
"merged_at": "2024-08-06T14:57:48Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3787
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3787/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3787/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3787/events
|
https://github.com/materialsproject/pymatgen/issues/3787
| 2,267,299,218
|
I_kwDOACgets6HJD2S
| 3,787
|
Periodic boundary condition is not considered in the interpolator of VolumetricData
|
{
"login": "goodwilling",
"id": 56999195,
"node_id": "MDQ6VXNlcjU2OTk5MTk1",
"avatar_url": "https://avatars.githubusercontent.com/u/56999195?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/goodwilling",
"html_url": "https://github.com/goodwilling",
"followers_url": "https://api.github.com/users/goodwilling/followers",
"following_url": "https://api.github.com/users/goodwilling/following{/other_user}",
"gists_url": "https://api.github.com/users/goodwilling/gists{/gist_id}",
"starred_url": "https://api.github.com/users/goodwilling/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/goodwilling/subscriptions",
"organizations_url": "https://api.github.com/users/goodwilling/orgs",
"repos_url": "https://api.github.com/users/goodwilling/repos",
"events_url": "https://api.github.com/users/goodwilling/events{/privacy}",
"received_events_url": "https://api.github.com/users/goodwilling/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 |
[
"Using the following revision, expected interpolation results have been obtained. \r\n\r\n self.xpoints = np.linspace(0.0, (self.dim[0]-1)/self.dim[0], num=self.dim[0])\r\n self.ypoints = np.linspace(0.0, (self.dim[1]-1)/self.dim[1], num=self.dim[1])\r\n self.zpoints = np.linspace(0.0, (self.dim[2]-1)/self.dim[2], num=self.dim[2])"
] | 2024-04-28T02:18:08
| 2024-04-28T06:08:48
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.11.4
### Pymatgen version
pymatgen 2024.3.1
### Operating system version
Windows 10
### Current behavior
When I use the interpolation method implemented in pymatgen.io.common.VolumetricData, it is found that the results for valence charge density are slightly different compared to those by other methods like c2x. Moreover, the results become considerably different for all-electron charge density and the expected symmetry is broken.
In the source codes, it seems that periodic boundary condition (PBC) is not considered in the interpolator of VolumetricData as in the following, since in PBC the points of data are not from 0.0 to 1.0 in fractional coordinates.
https://github.com/materialsproject/pymatgen/blob/master/pymatgen/io/common.py#L77
self.xpoints = np.linspace(0.0, 1.0, num=self.dim[0])
self.ypoints = np.linspace(0.0, 1.0, num=self.dim[1])
self.zpoints = np.linspace(0.0, 1.0, num=self.dim[2])
self.interpolator = RegularGridInterpolator(
(self.xpoints, self.ypoints, self.zpoints),
self.data["total"],
bounds_error=True,
)
### Expected Behavior
The interpolation results of electronic density charge should be the same as expected, in particular that the symmetry should not be broken.
### Minimal example
_No response_
### Relevant files to reproduce this bug
_No response_
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3787/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/3787/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3789
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3789/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3789/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3789/events
|
https://github.com/materialsproject/pymatgen/pull/3789
| 2,267,470,112
|
PR_kwDOACgets5t7iXD
| 3,789
|
Remove `gulp` from package data, code base and CI tests
|
{
"login": "DanielYang59",
"id": 80093591,
"node_id": "MDQ6VXNlcjgwMDkzNTkx",
"avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DanielYang59",
"html_url": "https://github.com/DanielYang59",
"followers_url": "https://api.github.com/users/DanielYang59/followers",
"following_url": "https://api.github.com/users/DanielYang59/following{/other_user}",
"gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}",
"starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions",
"organizations_url": "https://api.github.com/users/DanielYang59/orgs",
"repos_url": "https://api.github.com/users/DanielYang59/repos",
"events_url": "https://api.github.com/users/DanielYang59/events{/privacy}",
"received_events_url": "https://api.github.com/users/DanielYang59/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
},
{
"id": 5585018768,
"node_id": "LA_kwDOACgets8AAAABTOSfkA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/pkg",
"name": "pkg",
"color": "EFE8DB",
"default": false,
"description": "Package health and distribution related stuff"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe changes involve streamlining configurations, updating URLs, and enhancing error messages across the project files. These adjustments aim to improve setup clarity, documentation accuracy, and user guidance within the project components.\n\n## Changes\n\n| File Changed | Summary of Changes |\n|-------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| `setup.py`, `.github/workflows/test.yml` | Removed redundant `\"cmd_line\": [\"**/*\"]` from `setup.py` package data. Eliminated `GULP_LIB` declaration and Ubuntu step in `.github/workflows/test.yml`. |\n| `pymatgen/command_line/gulp_caller.py` | Updated docstring URL to `https://gulp.curtin.edu.au/index.html`. Enhanced `GulpError` exception message with a download link. |\n| `.gitattributes`, `.pre-commit-config.yaml` | Adjusted file paths in `.gitattributes` for `linguist-vendored`. Modified exclusion pattern in `.pre-commit-config.yaml` to exclude `tasks.py`. |\n```\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\nsetup.py: ## Short Summary\nRemoved the `\"cmd_line\": [\"**/*\"],` entry from the `package_data` dictionary in `setup.py`.\n\n## Alterations to the declarations of exported or public entities\n- Removed `\"cmd_line\": [\"**/*\"],` from the `package_data` dictionary in `setup.py`.\n\n---\n\n.github/workflows/test.yml: ### Summary\nIn the `.github/workflows/test.yml` file:\n- Removed the `GULP_LIB` environment variable declaration.\n- Removed the step to copy GULP to bin for Ubuntu systems.\n\n---\n\npymatgen/command_line/gulp_caller.py: ## Short Summary\nThe functionality change involves updating the URL in the docstring and enhancing the error message in the `GulpError` exception to include a download link.\n\n## Alterations to the Declarations of Exported or Public Entities\n- Docstring URL updated from `http://projects.ivec.org` to `https://gulp.curtin.edu.au/index.html`\n- Exception message in `GulpError` modified to include a download link: \n - Before: `raise GulpError(\"Executable not found\")`\n - After: `raise GulpError(\"Executable not found, please download from https://gulp.curtin.edu.au/index.html.\")`\n\n---\n\n.gitattributes: ## Alterations to the declarations of exported or public entities\n\n- `cmd_line/*` in `.gitattributes` => Removed from `linguist-vendored`\n\n---\n\n.pre-commit-config.yaml: ## Short Summary\nThe change in functionality involves modifying the exclusion pattern in the configuration file `.pre-commit-config.yaml` to exclude a specific file (`tasks.py`) from certain processes.\n\n## Alterations to the declarations of exported or public entities\n- `exclude: ^(docs|tests/files|cmd_line|tasks.py)` in `.pre-commit-config.yaml` => `exclude: ^(docs|tests/files|tasks.py)` in `.pre-commit-config.yaml`\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe Pull Request #3789 aims to optimize the `pymatgen` package by excluding outdated `gulp` binaries and libraries, significantly reducing the package size from 6.9 MB to 3.0 MB. The PR questions the necessity of retaining these outdated elements in the codebase and highlights the absence of two test files (`test_cli.py` and `test_pkg.py`) in the `setup.py` configuration. These changes streamline the package content and potentially enhance its maintainability.\n\n### Comments Summary\n\nIn the comments, there is a suggestion to direct users to download `gulp` from an external source if needed, as the original link seems to be broken. The discussion also points to a working link from Curtin University as an alternative. This implies a potential shift towards a more modular approach, where external dependencies like `gulp` are not bundled with the package but are recommended for separate installation if required.\n\n### AI-Generated Summary of Generated Summaries\n\nThe PR #3789 optimizes the `pymatgen` package by removing outdated `gulp` components, leading to a substantial size reduction. Key changes include updating `setup.py` to exclude the `cmd_line` directory housing `gulp` files and enhancing error messages in `gulp_caller.py` to provide users with a download link for `gulp`. Adjustments in the test workflow and considerations for external `gulp` downloads indicate a shift towards a more streamlined and efficient package structure.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**File: `setup.py`**\n- **Before Change:**\n - Included `\"cmd_line\": [\"**/*\"],` in the `package_data` dictionary.\n \n- **After Change:**\n - Removed `\"cmd_line\": [\"**/*\"],` from `package_data`.\n\n**File: `.github/workflows/test.yml`**\n- **Before Change:**\n - Declared `GULP_LIB` environment variable.\n - Included a step to copy `GULP` to `bin` for Ubuntu systems.\n \n- **After Change:**\n - Removed `GULP_LIB` environment variable declaration.\n - Eliminated the step to copy `GULP` to `bin` for Ubuntu systems.\n\n**File: `pymatgen/command_line/gulp_caller.py`**\n- **Before Change:**\n - Docstring URL: `http://projects.ivec.org`.\n - `GulpError` exception message: \"Executable not found\".\n \n- **After Change:**\n - Updated docstring URL to `https://gulp.curtin.edu.au/index.html`.\n - Modified `GulpError` exception message to include a download link.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between c954808d504141ccb48ed6aab565ed9d914f9658 and 354b6d762df7ffff818d5d94b111977e7bf6556d.\n</details>\n\n\n<details>\n<summary>Files selected for processing (3)</summary>\n\n* .gitattributes (1 hunks)\n* .pre-commit-config.yaml (1 hunks)\n* setup.py (2 hunks)\n\n</details>\n\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (2)</summary>\n\n* .gitattributes\n* .pre-commit-config.yaml\n\n</details>\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (1)</summary>\n\n* setup.py\n\n</details>\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- d71dfcf446e44eafd5420ff90bed8b4b11752a5a -->\n<!-- c954808d504141ccb48ed6aab565ed9d914f9658 -->\n<!-- 354b6d762df7ffff818d5d94b111977e7bf6556d -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@coderabbitai ignore",
"> > Should we even include them inside the code base?\r\n>\r\n> i think it would be much better to remove and point people at the download page for GULP in a message to the user if pymatgen can't find the binary. \r\n\r\nYes I agree with this. But the original link does not work on my side for some reason?\r\nhttps://github.com/materialsproject/pymatgen/blob/ff94faa5bb490354c420f188f1abeac17cb40931/pymatgen/command_line/gulp_caller.py#L1-L4\r\n\r\nBut this website from Curtin University seems to work (I'm not sure if these two point to the same package though): https://gulp.curtin.edu.au/index.html\r\n\r\n",
"> thanks so much @DanielYang59. this is excellent!! will result in shorter install times from the next `pymatgen` release onwards thanks to no longer downloading outdated `gulp` files.\r\n\r\nThanks for reviewing. Not sure about the installation time, but the package size is reduced by half :) The `GULP` package has been sneaky inside the package for such a long time.\r\n\r\n> btw, there's [this nice tool](https://inspector.pypi.io/project/pymatgen/2024.4.13/packages/a4/7a/69c17fd3e364b6beb5b37a7da2dca2105f609bf83bd80fea5895b609a5b2/pymatgen-2024.4.13-cp310-cp310-macosx_11_0_arm64.whl/) that allows you to get a list of files in a pypi package\r\n\r\nThanks for sharing, it would be very helpful.\r\n\r\n>> Meanwhile it might be hard to automate the download process because the new website requires a form being filled.\r\n\r\n> i think it's fine to ask users to install manually. this is not core pymatgen functionality\r\n\r\nI'm more concerned about autonomous package downloading in CI tests, but we would see when we need it because it's not supported by Ubuntu 20.04 afterwards anyway. \r\n\r\n"
] | 2024-04-28T10:11:06
| 2024-05-15T01:14:34
|
2024-04-28T22:17:04Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Exclude `gulp` from package data
- See discussion in #3788, the binaries and libs of super outdated `gulp` (11 yrs old) should not be included in the package data. And it's taking up half of the package size:
```bash
pymatgen-2024.4.13 % du -sh * | sort -hr
15M pymatgen
10M cmd_line # only `gulp` inside `cmd_line`
56K pymatgen.egg-info
16K PKG-INFO
12K README.md
8.0K tests
8.0K setup.py
8.0K pyproject.toml
4.0K setup.cfg
4.0K LICENSE
```
After removal, the package size decreased from 6.9 MB to 3.0 MB.
- Should we even include them inside the code base?
- Two test files are included but I'm not seeing them inside `setup.py`?:
```
pymatgen-2024.4.13 % ls tests
test_cli.py test_pkg.py
```
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3789/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/3789/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3789",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3789",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3789.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3789.patch",
"merged_at": "2024-04-28T22:17:04Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3790
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3790/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3790/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3790/events
|
https://github.com/materialsproject/pymatgen/pull/3790
| 2,267,849,459
|
PR_kwDOACgets5t8ydu
| 3,790
|
Format doc strings
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
},
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
}
] |
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 |
[
"@janosh : this broke some code in pymatgen-analysis-diffusion and thus also in emmet, particularly the change from `symmop` to `symm_op` in `Structure.apply_operation`. Can we announce breaking changes or avoid them if they're made for code style?",
"@janosh Seriously, stop breaking stuff with this kind of cosmetic stuff. I am going to insist that you maintain backwards compatibility. Otherwise, I am revoking your write privileges and you will submit PRs like everyone else.",
"@esoteric-ephemera sorry about the hassle and thanks for taking the time to fix!\r\n\r\n@shyuep i'll be more careful. i realized that this change could be breaking and did a search for `symmop` being passed as keyword in `pymatgen` and `atomate2` but ofc that leaves a lot of places where it could matter. just to clarify though, i did submit a PR for this like everyone else and CI passed so I doubt a reviewer would have noticed."
] | 2024-04-28T22:20:08
| 2024-05-10T19:41:08
|
2024-04-28T22:41:26Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
plus minor formatting and 1 deprecation of `NRANDOM` -> `n_random` in `coordination_geometry_symmetry_measures_fallback_random`
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3790/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/3790/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3790",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3790",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3790.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3790.patch",
"merged_at": "2024-04-28T22:41:26Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3791
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3791/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3791/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3791/events
|
https://github.com/materialsproject/pymatgen/issues/3791
| 2,268,040,239
|
I_kwDOACgets6HL4wv
| 3,791
|
[Dev] `datetime.datetime.utcnow()` deprecated and replacement breaks `strptime`
|
{
"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 |
[
"It seems I cannot re-open this for some reason. This was closed by the accidentally included `to fix` keyword but was not fixed.\r\n> 7fac0b466bbb18372334b87c990c46a1096b6415 need to fix #3791",
"Thanks for the fix @janosh, the Windows tests failing in CI is due to a matplotlib issue https://github.com/materialsproject/pymatgen/pull/3887/commits/628f737e208985dd193e68b04f564dd062e62f62, but that PR #3887 would need some extra time to be reviewed. Perhaps you could fix that directly on master?\r\n\r\nMeanwhile it looks like [one unit test for `util.provenance` is broken](https://github.com/materialsproject/pymatgen/actions/runs/10235770401/job/28317007124), **probably** because the new API is not a drop-in replacement (with additional timezone info at the end):\r\n\r\n```python\r\nimport datetime\r\n\r\n\r\nprint(datetime.datetime.utcnow()) >>> 2024-08-04 12:55:17.167352\r\nprint(datetime.datetime.now(tz=datetime.timezone.utc)) >>> 2024-08-04 12:55:17.167478+00:00\r\n```",
"thanks, good call!"
] | 2024-04-29T03:17:59
| 2024-08-04T14:06:08
|
2024-08-04T11:16:08Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## `datetime.datetime.utcnow()` deprecated
See discussion in https://github.com/materialsproject/pymatgen/pull/3705#discussion_r1537225117, `datetime.datetime.utcnow()` is marked as deprecated and might be [removed after Python 3.12](https://discuss.python.org/t/deprecating-utcnow-and-utcfromtimestamp/26221/15).
The same issue has been reported to `monty` as well: https://github.com/materialsvirtuallab/monty/issues/275.
But the new replacement returns slightly different output (an additional timezone info `+00:00` at the end), which breaks `strptime`:
```python
import datetime
start_time_old = datetime.datetime.utcnow() # 2024-03-25 08:46:23.748342
start_time_new = datetime.datetime.now(datetime.UTC) # 2024-03-25 08:46:23.748472+00:00
print(start_time_old, start_time_new)
dt_old = datetime.datetime.strptime(
str(start_time_old), "%Y-%m-%d %H:%M:%S.%f"
)
print(dt_old)
dt_new = datetime.datetime.strptime(
str(start_time_new), "%Y-%m-%d %H:%M:%S.%f"
)
print(dt_new)
```
Raises:
```python
Traceback (most recent call last):
File "/Users/yang/developer/test/test.py", line 16, in <module>
dt = datetime.datetime.strptime(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/_strptime.py", line 554, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/_strptime.py", line 336, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: +00:00
```
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3791/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/3791/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3792
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3792/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3792/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3792/events
|
https://github.com/materialsproject/pymatgen/pull/3792
| 2,270,291,348
|
PR_kwDOACgets5uFOHa
| 3,792
|
Imperative doc strings
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
},
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe recent updates across various modules in the `pymatgen` package primarily involve semantic adjustments in docstrings for clarity and consistency, and a notable shift from using `np.average` to `np.mean` for calculations. These changes enhance the readability and maintain the mathematical integrity of the code. Additionally, there are minor refinements in class descriptions and method functionalities to improve the precision of the software's chemical and physical analysis capabilities.\n\n## Changes\n\n| Files | Summary of Changes |\n|-------|--------------------|\n| `adsorption.py`, `ewald.py`, `pourbaix_diagram.py`, `surface_analysis.py`, `core/surface.py` | Replaced `np.average` with `np.mean` in various calculations. |\n| Various files across `chemenv` modules | Updated class and method docstrings for clarity and enhanced descriptions. |\n| `math_utils.py`, `core/lattice.py`, `core/interface.py` | Minor semantic adjustments in docstrings and refined calculation methods. |\n| `gulp_caller.py`, `local_env.py`, `elasticity/elastic.py`, `diffraction/tem.py` | Updated method docstrings for clarity and corrected minor typos. |\n| `battery/insertion_battery.py`, `molecule_structure_comparator.py` | Enhanced descriptions in class docstrings for better understanding of functionality. |\n| `core/bonds.py`, `core/periodic_table.py` | Minor semantic adjustments in class docstrings. |\n| `core/composition.py` | Refined equality and comparison logic for compositions. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n```\npymatgen/analysis/adsorption.py: ## Short Summary\n\n- The function `from_bulk_and_miller` in `adsorption.py` now uses `np.mean` instead of `np.average` to calculate `average_mi_mag`.\n- The method `ensemble_center` in the same file now uses `np.mean` instead of `np.average` for both Cartesian and fractional coordinates calculations.\n\n---\n\npymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py: ## Short Summary\nIn the `chemenv_strategies.py` file of `pymatgen`, the `AbstractChemenvStrategy` class has undergone a semantic change in its docstring, clarifying its purpose.\n\n## Alterations to the declarations of exported or public entities\n- `class AbstractChemenvStrategy(MSONable, abc.ABC)` in `chemenv_strategies.py` => \n - Before: \n ```python\n \n Class used to define a Chemenv strategy for the neighbors and coordination environment to be applied to a StructureEnvironments object.\n \n ```\n - After: \n ```python\n \n Base class to define a Chemenv strategy for the neighbors and coordination environment to be applied to a StructureEnvironments object.\n \n ```\n\n---\n\npymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py: ## Short Summary\n\nThe changes in `coordination_geometries.py` involve refining class descriptions by updating the docstrings for `ExplicitPermutationsAlgorithm`, `SeparationPlane`, and `AllCoordinationGeometries`. Additionally, there are minor variable name changes from `pmeshes` to `p_meshes` for clarity in the `get_pmeshes` method.\n\n---\n\npymatgen/analysis/chemenv/coordination_environments/structure_environments.py: ## Short Summary\n\nThe changes in `structure_environments.py` involve updating docstrings for the `LightStructureEnvironments` and `ChemicalEnvironments` classes to provide clearer descriptions of their purposes.\n\n## Alterations to the declarations of exported or public entities\n\n- `LightStructureEnvironments` class docstring:\n - From: `\"Class used to store the chemical environments of a given structure obtained from a given ChemenvStrategy. Currently,\"`\n - To: `\"Store the chemical environments of a given structure obtained from a given ChemenvStrategy. Currently,\"`\n\n- `ChemicalEnvironments` class docstring:\n - From: `\"Class used to store all the information about the chemical environment of a given site for a given list of\"`\n - To: `\"Store all the information about the chemical environment of a given site for a given list of\"`\n\n---\n\npymatgen/analysis/chemenv/utils/chemenv_config.py: ## Short Summary\nThe `ChemEnvConfig` class in `chemenv_config.py` was modified to update the class docstring, changing the description format without altering the functionality.\n\n## Alterations to the declarations of exported or public entities\n- `class ChemEnvConfig` in `chemenv_config.py`:\n - Updated the class docstring format from multi-line to a single-line description.\n\n---\n\npymatgen/analysis/chemenv/utils/coordination_geometry_utils.py: ## Short Summary\nThe change in functionality involves the removal of a blank line before the function docstring for `matrixTimesVector` in the `coordination_geometry_utils.py` file.\n\n## Alterations to the declarations of exported or public entities\n- No alterations to the declarations of exported or public entities.\n\n---\n\npymatgen/analysis/chemenv/utils/graph_utils.py: ## Short Summary\n\nThe change in functionality involves updating the docstring of the `SimpleGraphCycle` class in `graph_utils.py` to correct a typo and improve clarity.\n\n## Alterations to the declarations of exported or public entities\n\n- `class SimpleGraphCycle(MSONable)` in `graph_utils.py` => Updated docstring from `Class used to describe a cycle in a simple graph (graph without multiple edges).` to `Describe a cycle in a simple graph (graph without multiple edges).`\n\n---\n\npymatgen/analysis/chemenv/utils/math_utils.py: ## Short Summary\nThe changes in `math_utils.py` involve the removal of extraneous comments within function definitions. The logic and control flow remain unchanged.\n\n## Alterations to the declarations of exported or public entities\n- `def get_center_of_arc(p1, p2, radius):` => `def get_center_of_arc(p1, p2, radius):`\n- `def get_linearly_independent_vectors(vectors_list):` => `def get_linearly_independent_vectors(vectors_list):`\n- `def scale_and_clamp(xx, edge0, edge1, clamp0, clamp1):` => `def scale_and_clamp(xx, edge0, edge1, clamp0, clamp1):`\n- `def normal_cdf_step(xx, mean, scale):` => `def normal_cdf_step(xx, mean, scale):`\n- `def smoothstep(xx, edges=None, inverse=False):` => `def smoothstep(xx, edges=None, inverse=False):`\n- `def smootherstep(xx, edges=None, inverse=False):` => `def smootherstep(xx, edges=None, inverse=False):`\n- `def cosinus_step(xx, edges=None, inverse=False):` => `def cosinus_step(xx, edges=None, inverse=False):`\n- `def power3_step(xx, edges=None, inverse=False):` => `def power3_step(xx, edges=None, inverse=False):`\n- `def powern_parts_step(xx, edges=None, inverse=False, nn=2):` => `def powern_parts_step(xx, edges=None, inverse=False, nn=2):`\n- `def powern_decreasing(xx, edges=None, nn=2):` => `def powern_decreasing(xx, edges=None, nn=2):`\n- `def power2_decreasing_exp(xx, edges=None, alpha=1.0):` => `def power2_decreasing_exp(xx, edges=None, alpha=1.0):`\n- `def power2_tangent_decreasing(xx, edges=None, prefactor=None):` => `def power2_tangent_decreasing(xx, edges=None, prefactor=None):`\n- `def power2_inverse_decreasing(xx, edges=None, prefactor=None):` => `def power2_inverse_decreasing(xx, edges=None, prefactor=None):`\n- `def power2_inverse_power2_decreasing(xx, edges=None, prefactor=None):` => `def power2_inverse_power2_decreasing(xx, edges=None, prefactor=None):`\n- `def power2_inverse_powern_decreasing(xx, edges=None, prefactor=None, powern=2.0):` => `def power2_inverse_powern_decreasing(xx, edges=None, prefactor=None, powern=2.0):`\n\n---\n\npymatgen/analysis/diffraction/tem.py: ## Short Summary\nThe change in functionality involves updating the docstring of the `zone_axis_filter` method in the `TEM` class within the `tem.py` file. The wording in the docstring has been modified for clarity.\n\n## Alterations to the declarations of exported or public entities\n- `zone_axis_filter` method in class `TEM` in `pymatgen/analysis/diffraction/tem.py`:\n - Before: \n ```python\n Filters out all points that exist within the specified Laue zone according to the zone axis rule.\n ```\n - After:\n ```python\n Filter out all points that exist within the specified Laue zone according to the zone axis rule.\n ```\n\n---\n\npymatgen/analysis/elasticity/elastic.py: ## Short Summary\nThe change in functionality involves a semantic adjustment in the docstring of the `debye_temperature` method within the `elastic.py` file. The wording was modified from \"Estimates\" to \"Estimate\" for clarity.\n\n## Alterations to the declarations of exported or public entities\n- `def debye_temperature(self, structure: Structure) -> float:` in `elastic.py`\n - Before: `\"Estimates the Debye temperature from longitudinal and transverse sound velocities.\"`\n - After: `\"Estimate the Debye temperature from longitudinal and transverse sound velocities.\"`\n\n---\n\npymatgen/analysis/ewald.py: ## Short Summary\nThe change in functionality involves replacing `np.average` with `np.mean` in the calculation of `avg_frac`, affecting the average calculation in the context of Ewald analysis.\n\n## Alterations to the declarations of exported or public entities\n- `np.average(np.outer(1 - fractions, 1 - fractions))` in function `best_case` in `ewald.py` => `np.mean(np.outer(1 - fractions, 1 - fractions))` in function `best_case` in `ewald.py`\n\n---\n\npymatgen/analysis/local_env.py: ## Short Summary\nThe change in functionality involves a minor modification in the docstring of a method related to computing ionic valences for elements in a structure.\n\n## Alterations to the declarations of exported or public entities\n- Method `_get_valences` in class `SomeClass` in `pymatgen/analysis/local_env.py`:\n - Before: `Computes ionic valences of elements for all sites in the structure.`\n - After: `Compute ionic valences of elements for all sites in the structure.`\n\n---\n\npymatgen/analysis/molecule_structure_comparator.py: ## Short Summary\nThe change in functionality involves modifying the docstring of the `MoleculeStructureComparator` class in `pymatgen/analysis/molecule_structure_comparator.py` to provide a more concise description of its purpose.\n\n## Alterations to the declarations of exported or public entities\n- `class MoleculeStructureComparator(MSONable)` in `pymatgen/analysis/molecule_structure_comparator.py`:\n - From:\n ```python\n \n Class to check whether the connection tables of the two molecules are the\n same. The atom in the two molecule must be paired accordingly.\n \n ```\n - To:\n ```python\n Check whether the connection tables of the two molecules are the same. The atom in the two molecule must be paired accordingly.\n ```\n\n---\n\npymatgen/analysis/pourbaix_diagram.py: ## Short Summary\n\nThe changes in the `pourbaix_diagram.py` file involve replacing `np.average` with `np.mean` in calculating interior points and centers for certain calculations related to Pourbaix diagrams.\n\n## Alterations to the declarations of exported or public entities\n\n- `interior_point = [*np.average(limits, axis=1).tolist(), g_max]` => `interior_point = [*np.mean(limits, axis=1).tolist(), g_max]`\n- `center = np.average(points, axis=0)` => `center = np.mean(points, axis=0)`\n- `center = np.average(vertices, axis=0)` => `center = np.mean(vertices, axis=0)`\n\n---\n\npymatgen/analysis/quasirrho.py: ## Short Summary\n\nThe changes in `pymatgen/analysis/quasirrho.py` involve updating comments for clarity and changing the method of calculating the average of inertia eigenvalues from using `np.average` to `np.mean`.\n\n## Alterations to the declarations of exported or public entities\n\n- `def get_avg_mom_inertia(mol)` => No changes in this function.\n- `iav = np.average(inertia_eigen_vals)` => `iav = np.mean(inertia_eigen_vals)`\n- `class QuasiRRHO`:\n - Updated the class docstring to provide a clearer description.\n\n---\n\npymatgen/analysis/structure_matcher.py: ## Short summary\n\nThe `StructureMatcher` class in `structure_matcher.py` was modified to update the class docstring and change the calculation of translation from using `np.average` to `np.mean`.\n\n---\n\npymatgen/analysis/surface_analysis.py: ## Short Summary\nThe change in functionality involves replacing the `np.average` function with `np.mean` in calculating the center of mass in the `Nsurfs_ads_in_slab` method, affecting the way the center of mass is computed in the context of adsorbed surfaces in a slab structure.\n\n## Alterations to the declarations of exported or public entities\n- `def Nsurfs_ads_in_slab(self)` in `pymatgen/analysis/surface_analysis.py`:\n - Before: `center_of_mass = np.average(struct.frac_coords, weights=weights, axis=0)`\n - After: `center_of_mass = np.mean(struct.frac_coords, weights=weights, axis=0)`\n\n---\n\npymatgen/apps/battery/insertion_battery.py: ## Short Summary\nThe change in functionality involves updating the docstring for the `InsertionVoltagePair` class in `insertion_battery.py` to provide a more descriptive explanation.\n\n## Alterations to the declarations of exported or public entities\n- `class InsertionVoltagePair(AbstractVoltagePair)` in `insertion_battery.py` => Updated docstring from `Defines an Insertion Voltage Pair.` to `A voltage pair for an insertion battery, e.g. LiFePO4 -> FePO4.`\n\n---\n\npymatgen/command_line/gulp_caller.py: ## Short Summary\n\nThe change in functionality involves updating the docstring for the `library_line` method in the `gulp_caller.py` file within the `pymatgen` package. The modification clarifies the purpose of specifying the GULP library file for reading species and potential parameters.\n\n## Alterations to the declarations of exported or public entities\n\n- `def library_line(file_name)` in class `GulpCaller` in `pymatgen/command_line/gulp_caller.py` \n - Before: `Specifies GULP library file to read species and potential parameters.`\n - After: `Specify GULP library file to read species and potential parameters.`\n\n---\n\npymatgen/core/bonds.py: ## Short Summary\nThe change in functionality involves a minor semantic adjustment in the docstring of the `CovalentBond` class in `pymatgen/core/bonds.py`.\n\n## Alterations to the declarations of exported or public entities\n- `class CovalentBond:` in `pymatgen/core/bonds.py` changed docstring from `\"Defines a covalent bond between two sites.\"` to `\"A covalent bond between two sites.\"`\n\n---\n\npymatgen/core/composition.py: ## Short Summary\n\nThe changes in `pymatgen/core/composition.py` involve refining the equality and comparison logic for compositions. The `__eq__` method now considers compositions equal if their elements are the same within a tolerance. The `__ge__` method defines greater than or equal to based on element amounts within a tolerance.\n\n## Alterations to the declarations of exported or public entities\n\n- `def __eq__(self, other: object) -> bool:` in class `Composition` => Updated description and logic for composition equality.\n- `def __ge__(self, other: object) -> bool:` in class `Composition` => Updated description and logic for composition greater than or equal to.\n\nThese changes refine the behavior of composition equality and comparison in the `Composition` class.\n\n---\n\npymatgen/core/interface.py: ## Short Summary\n\nThe changes in `pymatgen/core/interface.py` involve refining calculations related to in-plane shifts based on adsorbate sites, adjusting coordinate shifts, and updating the calculation of plane heights for structures.\n\n## Alterations to the Declarations of Exported or Public Entities\n\n- `get_shifts_based_on_adsorbate_sites` method:\n - Updated docstring: `\"Computes possible in-plane shifts based on an adsorbate site algorithm.\"` => `\"Compute possible in-plane shifts based on an adsorbate site algorithm.\"`\n\n- `from_slabs` method:\n - Updated coordinate shift calculation: `0.5 - np.average(coords[:, 2])` => `0.5 - np.mean(coords[:, 2])`\n\n- `label_termination` function:\n - Revised calculation of `plane_heights` dictionary: `np.average(np.mod([s.frac_coords[2] for s in sites], 1))` => `np.mean(np.mod([s.frac_coords[2] for s in sites], 1))`\n\n- `count_layers` function:\n - Revised calculation of `plane_heights` dictionary: `np.average(np.mod([s.frac_coords[2] for s in sites], 1))` => `np.mean(np.mod([s.frac_coords[2] for s in sites], 1))`\n\n---\n\npymatgen/core/lattice.py: ## Short Summary\nThe functionality change involves updating the module docstring in `pymatgen/core/lattice.py` to provide a more detailed description of the `Lattice` class.\n\n## Alterations to the declarations of exported or public entities\n- Module docstring in `pymatgen/core/lattice.py`:\n - From: `\"Defines the classes relating to 3D lattices.\"`\n - To: `\"This module defines the Lattice class, the fundamental class for representing periodic crystals. It is essentially a matrix with some extra methods and attributes.\"`\n\n---\n\npymatgen/core/periodic_table.py: ## Short Summary\nThe change in functionality involves a minor modification in the docstring of the `__getattr__` method in the `Specie` class within `pymatgen/core/periodic_table.py`.\n\n## Alterations to the declarations of exported or public entities\n- `Allows Specie to inherit properties of underlying element.` in method `__getattr__` in class `Specie` in `pymatgen/core/periodic_table.py` => `Allow Specie to inherit properties of underlying element.` in method `__getattr__` in class `Specie` in `pymatgen/core/periodic_table.py`\n\n---\n\npymatgen/core/spectrum.py: ## Short Summary\nThe `lorentzian` function in `spectrum.py` had a minor change in the docstring formatting.\n\n## Alterations to the declarations of exported or public entities\n- `def lorentzian(x, x_0: float = 0, sigma: float = 1.0):` in `spectrum.py`\n\n---\n\npymatgen/core/surface.py: ## Short Summary\n\nThe changes in `pymatgen/core/surface.py` involve replacing `np.average` with `np.mean` in calculations related to the center of mass and shifting slabs, affecting the logic for determining the center of mass in fractional coordinates.\n\n## Alterations to the declarations of exported or public entities\n\n- `def center_of_mass(self) -> np.ndarray` in class `Slab`:\n - Before: `return np.average(self.frac_coords, weights=weights, axis=0)`\n - After: `return np.mean(self.frac_coords, weights=weights, axis=0)`\n\n- `def center_slab(slab: Slab) -> Slab`:\n - Before: `center_of_mass = np.average(slab.frac_coords, weights=weights, axis=0)`\n - After: `center_of_mass = np.mean(slab.frac_coords, weights=weights, axis=0)`\n\n- `def get_slab(self, shift: float = 0, tol: float = 0.1,\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n## PR Objectives (User Provided Facts)\n\nThis pull request, titled \"Imperative doc strings,\" is a follow-up to PR #3790. The primary focus of this PR appears to be the modification of documentation strings across various modules in the `pymatgen` library, alongside some changes in the usage of numpy functions, specifically replacing `np.average` with `np.mean` in several instances. The PR does not include additional context in the description, suggesting that the changes are straightforward and primarily involve documentation and minor code adjustments for clarity and consistency.\n\n## Comments Summary\n\nThe comments on the PR mainly revolve around the necessity of removing the `Returns` prefix in the docstring for a `property` to align with the expected description of the method as a `property` rather than a function/method. The agreement among contributors indicates a consensus on this adjustment for improved clarity and adherence to Pythonic conventions.\n\n## AI-Generated Summary of Generated Summaries\n\nThe pull request introduces a series of changes across multiple files in the `pymatgen` library, focusing predominantly on updating documentation strings to enhance clarity and modifying some numpy function calls. Here’s a detailed breakdown:\n\n1. **Documentation Updates:**\n - Several classes and methods across the library have had their docstrings updated to use more imperative and clear language. For example, descriptions often changed from passive constructions like \"Class used to...\" to active ones like \"Store...\". This change was applied to classes such as `AbstractChemenvStrategy`, `LightStructureEnvironments`, `ChemicalEnvironments`, and `SimpleGraphCycle`.\n - In some cases, the docstring modifications included corrections of typographical errors and minor clarifications to improve the understanding of the functionalities, such as in the `SimpleGraphCycle` and `zone_axis_filter` method in the `TEM` class.\n\n2. **Functionality Adjustments:**\n - A notable change across several files is the replacement of `np.average` with `np.mean`. This alteration affects calculations in various contexts such as adsorption properties, Ewald analysis, Pourbaix diagrams, surface analysis, and more. The change is consistent across the library, suggesting a standardization effort in statistical calculations within the library.\n\n3. **Minor Code Refinements:**\n - Apart from documentation and numpy function updates, some minor code refinements were made. These include renaming variables for better clarity, removing unnecessary blank lines or comments, and minor adjustments in method functionalities to enhance performance or clarity without altering the core logic.\n\n4. **Enhancements in Class Descriptions:**\n - The PR includes enhanced descriptions for several classes, providing clearer and more concise explanations of their purposes and functionalities. This includes classes like `MoleculeStructureComparator`, `InsertionVoltagePair`, and the `CovalentBond` class.\n\n5. **Equality and Comparison Logic Refinement:**\n - In `pymatgen/core/composition.py`, the logic for equality (`__eq__`) and comparison (`__ge__`) methods in the `Composition` class was refined to consider element amounts within a specified tolerance, enhancing the robustness of these operations.\n\n## Alterations to the Declarations of Exported or Public Entities\n\n- **AbstractChemenvStrategy**:\n - Before: \"Class used to define a Chemenv strategy...\"\n - After: \"Base class to define a Chemenv strategy...\"\n\n- **LightStructureEnvironments**:\n - Before: \"Class used to store the chemical environments...\"\n - After: \"Store the chemical environments...\"\n\n- **ChemicalEnvironments**:\n - Before: \"Class used to store all the information about the chemical environment...\"\n - After: \"Store all the information about the chemical environment...\"\n\n- **SimpleGraphCycle**:\n - Before: \"Class used to describe a cycle in a simple graph...\"\n - After: \"Describe a cycle in a simple graph...\"\n\n- **zone_axis_filter** method in class **TEM**:\n - Before: \"Filters out all points that exist within the specified Laue zone...\"\n - After: \"Filter out all points that exist within the specified Laue zone...\"\n\n- **debye_temperature** method:\n - Before: \"Estimates the Debye temperature from longitudinal and transverse sound velocities.\"\n - After: \"Estimate the Debye temperature from longitudinal and transverse sound velocities.\"\n\n- **InsertionVoltagePair**:\n - Before: \"Defines an Insertion Voltage Pair.\"\n - After: \"A voltage pair for an insertion battery, e.g. LiFePO4 -> FePO4.\"\n\n- **library_line** method in **GulpCaller**:\n - Before: \"Specifies GULP library file to read species and potential parameters.\"\n - After: \"Specify GULP library file to read species and potential parameters.\"\n\n- **CovalentBond**:\n - Before: \"Defines a covalent bond between two sites.\"\n - After: \"A covalent bond between two sites.\"\n\nThese changes reflect a broader effort to make the documentation more active and user-friendly, alongside minor functional adjustments for consistency in numerical calculations.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai --><!-- commit_ids_reviewed_start -->\n\n<!-- 1a5ca3dee6877e63bce98b0a973a443a966e1957 -->\n<!-- b375d85105be929e962258f67e8ac3f77e4510e5 -->\n<!-- a2469cb0f25f6a1a1395eb4327f41d4a733b1143 -->\n<!-- 3e2b25a923e908187944b08430f8fa998258e76a -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"I hope I'm not caring too much about nitty gritty details, but I have a feeling that the `Returns` prefix in the docstring for a `property` should be removed too? It should be a description of the method as a `property`, not as a function/method, right?\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/9964c4a335b69623f1c51d13472cff086c0f0c72/pymatgen/core/composition.py#L290-L340",
"> but I have a feeling that the `Returns` prefix in the docstring for a `property` should be removed too?\r\n\r\ni agree",
"> > but I have a feeling that the `Returns` prefix in the docstring for a `property` should be removed too?\r\n> \r\n> i agree\r\n\r\nI'm afraid there is some misunderstanding. I thought the docstring of a `property` should be describing the `property` itself, instead of the `method`.\r\n\r\nFor example:\r\n```diff\r\n@property\r\n def labels(self):\r\n- \"\"\"Get a dictionary containing kink information:\r\n+ \"\"\"A dictionary containing kink information:\r\n```\r\n\r\nWhat do you think?",
"> I'm afraid there is some misunderstanding. I thought the docstring of a property should be describing the property itself, instead of the method.\r\n\r\nno misunderstanding, that's my goal as well. there may have been some mass find and replace changes where this was not the end result. but i'll get to those in the 2nd pass",
"\r\n> no misunderstanding, that's my goal as well. there may have been some mass find and replace changes where this was not the end result. but i'll get to those in the 2nd pass\r\n\r\nBeautiful! Thanks for the improvements.\r\n\r\nMeanwhile maybe can we set the CodeRabbit to review only when we explicitly call it (like `@CodeRabbit review`)? It seems to be badly polluting conversation history.",
"> It seems to be badly polluting conversation history.\r\n\r\nvery much so! i asked @shyuep if we could disable or configure it differently. e.g. would be nice if it ignored PRs from maintainers",
"There is. Coderabbit.yaml file that can be edited in the repo. "
] | 2024-04-30T01:00:31
| 2024-04-30T17:07:08
|
2024-04-30T11:46:12Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
follow up to #3790
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3792/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/3792/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3792",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3792",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3792.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3792.patch",
"merged_at": "2024-04-30T11:46:12Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3793
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3793/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3793/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3793/events
|
https://github.com/materialsproject/pymatgen/issues/3793
| 2,271,241,689
|
I_kwDOACgets6HYGXZ
| 3,793
|
import `monty.json` slowing down core import
|
{
"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
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 5782768655,
"node_id": "LA_kwDOACgets8AAAABWK4MDw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/needs%20investigation",
"name": "needs investigation",
"color": "C8FE85",
"default": false,
"description": "Needs further research to pinpoint cause of issue"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"this is probably import overhead from loading `pandas` and maybe other big packages. if you start an interactive python session first, wait for it to load and then run `poscar = Structure.from_file(\"./POSCAR\")` on its own, i expect it will be faster\r\n",
"Thanks for the input! I'm not quite sure as I didn't have time to do a thorough investigation (and I don't have extensive experience of import time profiling either). I would look into this later (input from people with more knowledge on this would be hugely appreciated of course).\r\n\r\nI think for DFT calculations, input file import should usually not be the bottleneck, but almost two second to read such a simple file sound too much for me. ",
"have a look at https://github.com/materialsproject/pymatgen/issues/3563 which tried to reduce startup time by lazy-importing `pandas` only in code that actually needs it. that seems to have back-fired though based on this comment https://github.com/materialsproject/pymatgen/issues/3563#issuecomment-1907031585. this takes more careful testing than i did in https://github.com/materialsproject/pymatgen/pull/3568 and https://github.com/materialsvirtuallab/monty/pull/604 to make sure any changes really improve startup time",
"This should also be partially fixed by https://github.com/materialsvirtuallab/monty/pull/713, after that I would dig deeper and see what else is slowing down import\r\n\r\n\r\n"
] | 2024-04-30T11:43:52
| 2024-11-13T17:49:47
|
2024-11-13T17:49:47Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Summary
- `from monty.json import xxx` significantly slowly down core modules, as `torch` is eagerly imported
- [ ] Might need to look into other commonly used modules
For example:
```bash
python -X importtime -c "from pymatgen.core.structure import Structure" 2> pmg.log && tuna pmg.log
```
With `torch` installed (required by optional `matgl`):
<img width="1505" alt="image" src="https://github.com/user-attachments/assets/7c21db99-53a8-4050-ad00-90a8d31d586f">
After removing `torch`:
<img width="1505" alt="image" src="https://github.com/user-attachments/assets/17753ba9-4e62-456c-95c8-c0daffdcf3bc">
|
{
"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/3793/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/3793/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3794
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3794/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3794/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3794/events
|
https://github.com/materialsproject/pymatgen/issues/3794
| 2,272,574,406
|
I_kwDOACgets6HdLvG
| 3,794
|
`get_points_in_sphere()` has inconsistent return types
|
{
"login": "fxcoudert",
"id": 1980544,
"node_id": "MDQ6VXNlcjE5ODA1NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1980544?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fxcoudert",
"html_url": "https://github.com/fxcoudert",
"followers_url": "https://api.github.com/users/fxcoudert/followers",
"following_url": "https://api.github.com/users/fxcoudert/following{/other_user}",
"gists_url": "https://api.github.com/users/fxcoudert/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fxcoudert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fxcoudert/subscriptions",
"organizations_url": "https://api.github.com/users/fxcoudert/orgs",
"repos_url": "https://api.github.com/users/fxcoudert/repos",
"events_url": "https://api.github.com/users/fxcoudert/events{/privacy}",
"received_events_url": "https://api.github.com/users/fxcoudert/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 |
[
"@fxcoudert thanks for reporting! will be fixed by #3797"
] | 2024-04-30T22:17:52
| 2024-05-01T17:18:13
|
2024-05-01T17:18:13Z
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.11.5
### Pymatgen version
2024.4.13
### Operating system version
_No response_
### Current behavior
When `get_points_in_sphere()` is called with `zip_results=False`, it returns a tuple of numpy arrays:
```
return frac_coords, distances, indices, images
```
However, if it found no point in the requested radius, then… the return type changes:
```
return [] if zip_results else [()] * 4
```
So now it's returning four empty tuples. It is very surprising to the use, because using numpy functions of those will raise a type error. For example, I was doing things like `np.any(distances < 1.0)`: that would work perfectly as expected with an empty numpy array, but will crash with an empty tuple.
### Expected Behavior
I don't see what is gained by returning `()` instead of `np.array([])` and it would be less surprising to users (I just spent half an hour understanding this weird behavior).
### Minimal example
_No response_
### Relevant files to reproduce this bug
_No response_
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3794/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/3794/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3795
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3795/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3795/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3795/events
|
https://github.com/materialsproject/pymatgen/issues/3795
| 2,272,804,073
|
I_kwDOACgets6HeDzp
| 3,795
|
Monthly issue metrics report
|
{
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
}
|
[] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[] | 2024-05-01T02:18:00
| 2024-05-07T03:20:18
|
2024-05-07T03:20:17Z
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
# Issue Metrics
| Metric | Average | Median | 90th percentile |
| --- | --- | --- | ---: |
| Time to first response | 1 day, 19:29:22 | 0:20:01 | 3 days, 11:24:24 |
| Time to close | 3 days, 15:49:52 | 1 day, 4:59:30 | 9 days, 14:23:36 |
| Time to answer | None | None | None |
| Metric | Count |
| --- | ---: |
| Number of items that remain open | 10 |
| Number of items closed | 8 |
| Number of most active mentors | 0 |
| Total number of items created | 18 |
| Title | URL | Author | Time to first response | Time to close | Time to answer |
| --- | --- | --- | --- | --- | --- |
| `get_points_in_sphere()` has inconsistent return types | https://github.com/materialsproject/pymatgen/issues/3794 | [fxcoudert](https://github.com/fxcoudert) | None | None | None |
| Read in POSCAR with `Structure.from_file` seems slow? | https://github.com/materialsproject/pymatgen/issues/3793 | [DanielYang59](https://github.com/DanielYang59) | None | None | None |
| [Dev] `datetime.datetime.utcnow()` deprecated and replacement breaks `strptime` | https://github.com/materialsproject/pymatgen/issues/3791 | [DanielYang59](https://github.com/DanielYang59) | None | None | None |
| Periodic boundary condition is not considered in the interpolator of VolumetricData | https://github.com/materialsproject/pymatgen/issues/3787 | [goodwilling](https://github.com/goodwilling) | None | None | None |
| Incompatibility Issue with ALGO Parameter in Incar and Vasprun Classes | https://github.com/materialsproject/pymatgen/issues/3780 | [yanghan234](https://github.com/yanghan234) | None | None | None |
| Collect possible issues might come with Python 3.12 | https://github.com/materialsproject/pymatgen/issues/3775 | [DanielYang59](https://github.com/DanielYang59) | None | 10 days, 22:30:32 | None |
| Atom labels in CIF file are silently rewritten by CifWriter | https://github.com/materialsproject/pymatgen/issues/3772 | [fxcoudert](https://github.com/fxcoudert) | 0:20:01 | None | None |
| ChemEnv unable to identify the environments of supercell | https://github.com/materialsproject/pymatgen/issues/3766 | [Atefeh-Yadegarifard](https://github.com/Atefeh-Yadegarifard) | 0:09:47 | 23:28:57 | None |
| CrystalNN gives incorrect result for simple aromatic ring | https://github.com/materialsproject/pymatgen/issues/3762 | [fxcoudert](https://github.com/fxcoudert) | 0:04:14 | 1 day, 10:30:02 | None |
| `atom_site_label` in CIF file are not unique | https://github.com/materialsproject/pymatgen/issues/3761 | [fxcoudert](https://github.com/fxcoudert) | 0:17:39 | 9 days, 0:37:47 | None |
| 'get_projected_plots_dots()' and 'get_projected_plots_dots_patom_pmorb()' do not work properly | https://github.com/materialsproject/pymatgen/issues/3760 | [HERTZCAI](https://github.com/HERTZCAI) | None | None | None |
| OptimadeRester | https://github.com/materialsproject/pymatgen/issues/3753 | [JaGeo](https://github.com/JaGeo) | 0:10:19 | 18:34:31 | None |
| `typing_extension` imported at run time causing ImportError | https://github.com/materialsproject/pymatgen/issues/3751 | [janosh](https://github.com/janosh) | 9:30:54 | 2:16:54 | None |
| Numerical instability in lattice matrix operations : get_slabs / StructureMatcher / _cart_dists | https://github.com/materialsproject/pymatgen/issues/3747 | [misko](https://github.com/misko) | None | None | None |
| New pymatgen version | https://github.com/materialsproject/pymatgen/issues/3744 | [JaGeo](https://github.com/JaGeo) | 0:20:30 | 5 days, 23:07:43 | None |
| Spacegroup P212121 does not give a valid pointgroup | https://github.com/materialsproject/pymatgen/issues/3735 | [lopsided](https://github.com/lopsided) | None | None | None |
| create a hcp mg grain boundary mgΣ7[0001](0001) too many values to unpack (expected 3) | https://github.com/materialsproject/pymatgen/issues/3733 | [TongaoY](https://github.com/TongaoY) | 1:32:28 | 1:32:28 | None |
| ValueError:dictionary update sequence element #0 has length 1; 2 is required | https://github.com/materialsproject/pymatgen/issues/3731 | [yjhao11](https://github.com/yjhao11) | 15 days, 18:58:24 | 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-04-01..2024-04-30 -reason:"not planned"`
|
{
"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/3795/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/3795/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3796
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3796/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3796/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3796/events
|
https://github.com/materialsproject/pymatgen/issues/3796
| 2,272,851,077
|
I_kwDOACgets6HePSF
| 3,796
|
StructureMatcher might be wrong when used to check if two structures are equal.
|
{
"login": "usccolumbia",
"id": 15660723,
"node_id": "MDQ6VXNlcjE1NjYwNzIz",
"avatar_url": "https://avatars.githubusercontent.com/u/15660723?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/usccolumbia",
"html_url": "https://github.com/usccolumbia",
"followers_url": "https://api.github.com/users/usccolumbia/followers",
"following_url": "https://api.github.com/users/usccolumbia/following{/other_user}",
"gists_url": "https://api.github.com/users/usccolumbia/gists{/gist_id}",
"starred_url": "https://api.github.com/users/usccolumbia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/usccolumbia/subscriptions",
"organizations_url": "https://api.github.com/users/usccolumbia/orgs",
"repos_url": "https://api.github.com/users/usccolumbia/repos",
"events_url": "https://api.github.com/users/usccolumbia/events{/privacy}",
"received_events_url": "https://api.github.com/users/usccolumbia/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 19613987,
"node_id": "MDU6TGFiZWwxOTYxMzk4Nw==",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug",
"name": "bug",
"color": "9222c1",
"default": true,
"description": ""
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"This is a feature not a bug. We have stated explicitly that StructureMatcher is based on coordinate mapping. Unless the coordinates are highly precise and the same tolerances are used, two matched structures do not need to have the same space group. ",
"This report is supposed to be regarded as a warning to the users or improvements needed to the documentation\r\n\r\nIt seems quite many users use this structureMatcher results for calculating success rate in crystal structure prediction, which is misleading due to Pymatgen document reads like this:\r\nhttps://pymatgen.org/pymatgen.analysis.html#pymatgen.analysis.structure_matcher.StructureMatcher\r\n\r\nfit(xxxx)\r\nReturn type:\r\nbool\r\nTrue if the structures are equivalent \r\n\r\nBut if the space groups of the two structures are not even identical, we cannot declare they are equivalent.\r\nso maybe you can add a warning in the documentation. (e.g. this function does not check if the space groups of two structures to be identical, for strict structure match, it is suggested).",
"I don't think your interpretation is correct. Say you have two structures A and B that are exactly the same - say a bcc metal. You move one of the atoms in B by 0.05 A in a certain direction. That breaks symmetry and so, B has space group Pm-3m if you are using a tight tolerance for symmetry determination. Structure A still has Im-3m spacegroup. For the purposes of structure matching, the two structures are the same. In fact, for crystal structure prediciton purposes, the two structures are effectively the same - if you relax both structures properly in DFT, they end up in the same final coordinates.\r\n\r\nIf you wish to force a more stringent check, you can always use SpaceGroupAnalyzer to first compare spacegroups before doing structure matching.\r\n"
] | 2024-05-01T03:15:28
| 2024-05-02T09:36:54
|
2024-05-01T10:11:22Z
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.9 (issue not related to this)
### Pymatgen version
2024.3.1
### Operating system version
Mac Os Sonoma 14.3. (issue not related to this)
### Current behavior
StructureMatcher has been frequently used recently to evaluate crystal structure generators such as CDVAE and crystal structure prediction (CSP) algorithm. In CDVAE paper, the following parameters are used: ltol=0.3, stol=0.5,
angle_tol=10. We used a more strict parameter set: ltol=0.2, stol=0.3, angle_tol=5.
However, when we tried to evaluate CSP performance, we find many cases that the StructureMatcher returns True (identical) while the space group numbers of the two structures do not even match! This leads to spurious performance for some papers. https://arxiv.org/abs/2403.10846
ground truth: Spacegroup 12
# generated using pymatgen
data_Ba2EuTaO6
_symmetry_space_group_name_H-M 'P 1'
_cell_length_a 6.10301173
_cell_length_b 6.10301173
_cell_length_c 6.10301173
_cell_angle_alpha 120.16496379
_cell_angle_beta 120.16496379
_cell_angle_gamma 89.71451102
_symmetry_Int_Tables_number 1
_chemical_formula_structural Ba2EuTaO6
_chemical_formula_sum 'Ba2 Eu1 Ta1 O6'
_cell_volume 160.33470623
_cell_formula_units_Z 1
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x, y, z'
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
Ba Ba0 1 0.25000000 0.75000000 0.50000000 1.0
Ba Ba1 1 0.75000000 0.25000000 0.50000000 1.0
Eu Eu2 1 0.00000000 0.00000000 0.00000000 1.0
Ta Ta3 1 0.50000000 0.50000000 0.00000000 1.0
O O4 1 0.24918800 0.28448400 0.53367200 1.0
O O5 1 0.73214700 0.73214700 0.00000000 1.0
O O6 1 0.28448400 0.75081200 0.03529600 1.0
O O7 1 0.26785300 0.26785300 0.00000000 1.0
O O8 1 0.75081200 0.71551600 0.46632800 1.0
O O9 1 0.71551600 0.24918800 0.96470400 1.0
predicted structure Spacegroup 87.
# generated using pymatgen
data_Ba2EuTaO6
_symmetry_space_group_name_H-M 'P 1'
_cell_length_a 8.62115426
_cell_length_b 8.62115426
_cell_length_c 8.62115426
_cell_angle_alpha 90.00000000
_cell_angle_beta 90.00000000
_cell_angle_gamma 90.00000000
_symmetry_Int_Tables_number 1
_chemical_formula_structural Ba2EuTaO6
_chemical_formula_sum 'Ba8 Eu4 Ta4 O24'
_cell_volume 640.76126225
_cell_formula_units_Z 4
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x, y, z'
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
Ba Ba0 1 0.25000000 0.25000000 0.25000000 1.0
Ba Ba0 1 0.75000000 0.75000000 0.75000000 1.0
Ba Ba0 1 0.75000000 0.25000000 0.25000000 1.0
Ba Ba0 1 0.25000000 0.75000000 0.75000000 1.0
Ba Ba0 1 0.75000000 0.75000000 0.25000000 1.0
Ba Ba0 1 0.25000000 0.25000000 0.75000000 1.0
Ba Ba0 1 0.25000000 0.75000000 0.25000000 1.0
Ba Ba0 1 0.75000000 0.25000000 0.75000000 1.0
Eu Eu1 1 0.00000000 0.00000000 0.50000000 1.0
Eu Eu1 1 0.50000000 0.00000000 0.00000000 1.0
Eu Eu1 1 0.00000000 0.50000000 0.00000000 1.0
Eu Eu1 1 0.50000000 0.50000000 0.50000000 1.0
Ta Ta2 1 0.00000000 0.00000000 0.00000000 1.0
Ta Ta2 1 0.50000000 0.50000000 0.00000000 1.0
Ta Ta2 1 0.50000000 0.00000000 0.50000000 1.0
Ta Ta2 1 0.00000000 0.50000000 0.50000000 1.0
O O3 1 0.00000000 0.00000000 0.23278080 1.0
O O3 1 0.00000000 0.00000000 0.76721920 1.0
O O3 1 0.23278080 0.00000000 0.00000000 1.0
O O3 1 0.76721920 0.00000000 0.00000000 1.0
O O3 1 0.00000000 0.23278080 0.00000000 1.0
O O3 1 0.00000000 0.76721920 0.00000000 1.0
O O3 1 0.50000000 0.50000000 0.23278080 1.0
O O3 1 0.50000000 0.50000000 0.76721920 1.0
O O3 1 0.73278080 0.50000000 0.00000000 1.0
O O3 1 0.26721920 0.50000000 0.00000000 1.0
O O3 1 0.50000000 0.73278080 0.00000000 1.0
O O3 1 0.50000000 0.26721920 0.00000000 1.0
O O3 1 0.50000000 0.00000000 0.73278080 1.0
O O3 1 0.50000000 0.00000000 0.26721920 1.0
O O3 1 0.73278080 0.00000000 0.50000000 1.0
O O3 1 0.26721920 0.00000000 0.50000000 1.0
O O3 1 0.50000000 0.23278080 0.50000000 1.0
O O3 1 0.50000000 0.76721920 0.50000000 1.0
O O3 1 0.00000000 0.50000000 0.73278080 1.0
O O3 1 0.00000000 0.50000000 0.26721920 1.0
O O3 1 0.23278080 0.50000000 0.50000000 1.0
O O3 1 0.76721920 0.50000000 0.50000000 1.0
O O3 1 0.00000000 0.73278080 0.50000000 1.0
O O3 1 0.00000000 0.26721920 0.50000000 1.0
### Expected Behavior
maybe StructureMatcher should at least check Spacegroup number to make sure it matches before it returns True (two structures match)?
### Minimal example
```Python
from pymatgen.core import Structure
from pymatgen.analysis.structure_matcher import StructureMatcher
import pandas as pd
import glob
def PMD(structure1, structure2):
#cdvae(ltol=0.3, stol=0.5, angle_tol=10)
#ma-condition_cond-cdvae(ltol=0.2,stol=0.3, angle_tol=5)
sm = StructureMatcher(ltol=0.3, stol=0.5,angle_tol=10) #
try:
fit = sm.fit(structure1, structure2)
except:
fit = "N/A"
return fit
path1 = f"Ba2EuTaO6.cif"
path2 = f"CSPML_Ba2EuTaO6.cif"
structure1 = Structure.from_file(path1)
structure2 = Structure.from_file(path2)
answer=PMD(structure1, structure2)
print(answer)
```
### 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/3796/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/3796/timeline
| null |
not_planned
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3797
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3797/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3797/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3797/events
|
https://github.com/materialsproject/pymatgen/pull/3797
| 2,273,846,002
|
PR_kwDOACgets5uRO7Z
| 3,797
|
Homogenize return type of `Lattice.get_points_in_sphere` to always be `np.array`(s)
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe updates to the `pymatgen` codebase focus on refining the return types of the `get_points_in_sphere()` method in the Lattice module to ensure consistency, especially in scenarios where no points are found within a specified radius. This adjustment aligns the method's behavior with user expectations, preventing errors related to unexpected return types.\n\n## Changes\n\n| File Path | Change Summary |\n|----------------------------------|------------------------------------------------------------------------------------------------------------------|\n| `.../core/lattice.py` | Standardized return types in `get_points_in_sphere()` to numpy arrays for empty results. |\n| `.../core/test_lattice.py` | Updated variable names and added checks for consistent return types in `test_get_points_in_sphere()`. |\n\n## Assessment against linked issues\n\n| Objective | Addressed | Explanation |\n|------------------------------------------------------|-----------|-------------------------------------------------------|\n| Ensure consistent return types in `get_points_in_sphere()` [#3794] | ✅ | |\n| Prevent type errors due to unexpected empty return types [#3794] | ✅ | |\n| Align method behavior with user expectations [#3794] | ✅ | |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/core/lattice.py: ## Short Summary\n\nThe change in `pymatgen/core/lattice.py` refines the return type handling in the `get_points_in_sphere` method, ensuring consistent return types when the sphere contains no points. It replaces list/tuple returns with numpy arrays for empty results.\n\n## Alterations to the declarations of exported or public entities\n\n- `def get_points_in_sphere(...)` in `pymatgen/core/lattice.py`:\n - Changed return type from `list[tuple[np.ndarray, float, int, np.ndarray]] | tuple[np.ndarray, ...] | list` to `tuple[np.ndarray, ...] | list`\n\n---\n\ntests/core/test_lattice.py: ### Summary\n\nIn the `test_get_points_in_sphere` function of `test_lattice.py`, the changes involve renaming variables and ensuring consistent return types for edge cases. The variables `pts` were renamed to `points`, `fcoords` to `frac_coords`, `inds` to `indices`, and `images` to `images`. Additionally, a check for consistent return types was added for cases where no points are found in the sphere.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe primary objective of Pull Request #3797 is to standardize the return type of the `get_points_in_sphere` method in the `pymatgen` library to always return numpy arrays, regardless of the method's output conditions. This change is proposed to address the issue documented in #3794, where the method exhibited inconsistent return types based on the presence or absence of points within a specified radius. Specifically, when no points were found and `zip_results` was set to `False`, the method returned a tuple of empty tuples, which could lead to unexpected errors when performing numpy operations on the results. The inconsistency in the return types could lead to confusion and errors, as demonstrated by a user who experienced issues when checking distances using numpy functions. The proposed change aims to make the behavior of `get_points_in_sphere` more predictable and user-friendly by ensuring that it consistently returns numpy arrays, thus avoiding type errors and simplifying the handling of the method's outputs.\n\n### AI-Generated Summary of Generated Summaries\n\nThe modifications in `pymatgen/core/lattice.py` focus on refining the return type handling within the `get_points_in_sphere` method to ensure uniformity, particularly when the method finds no points within the specified radius. Previously, the method returned different types (tuples of numpy arrays or lists/tuples) based on the results, which led to potential type errors during numpy operations. The updated implementation standardizes the return type to always be numpy arrays, even when the result set is empty, thereby enhancing the method's reliability and ease of use.\n\nAdditionally, corresponding updates in `tests/core/test_lattice.py` include renaming variables for clarity and adding checks to validate the consistent return types in edge cases. These test modifications ensure that the new behavior of `get_points_in_sphere` is thoroughly verified, particularly in scenarios where no points are detected within the sphere. The variable names `pts`, `fcoords`, `inds`, and `images` were updated to `points`, `frac_coords`, `indices`, and `images` respectively, aligning with more descriptive and standard naming conventions.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**Before Changes:**\n- `pymatgen/core/lattice.py`:\n - `def get_points_in_sphere(...) -> Union[List[Tuple[np.ndarray, float, int, np.ndarray]], Tuple[np.ndarray, ...], List]`\n\n**After Changes:**\n- `pymatgen/core/lattice.py`:\n - `def get_points_in_sphere(...) -> Tuple[np.ndarray, ...] | List[np.ndarray]`\n\nThe alteration clearly shifts from a more complex and varied return type to a more streamlined and consistent return type structure, focusing solely on numpy arrays, whether in tuples or lists. This change simplifies the method's interface and ensures type consistency across different operational scenarios.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 9a3f71449672c8964cf125caee05f3c560d359e0 and 650ee0cf792410ea8e722e82dc46401129a30e41.\n</details>\n\n\n<details>\n<summary>Files selected for processing (2)</summary>\n\n* pymatgen/core/lattice.py (2 hunks)\n* tests/core/test_lattice.py (1 hunks)\n\n</details>\n\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (1)</summary>\n\n* pymatgen/core/lattice.py\n\n</details>\n\n\n\n<details><summary>Additional comments not posted (4)</summary><blockquote>\n<details><summary>tests/core/test_lattice.py (4)</summary><blockquote>\n\n`355-356`: Ensure that the fractional coordinates are correctly calculated from the points.\n\n---\n\n`359-366`: The test case for `get_points_in_sphere` correctly checks for the number of neighbors and their distances. However, ensure that the method now consistently returns numpy arrays as per the PR's objective.\n\n---\n\n`369-372`: The test case for the more complex scenario using `zip_results=True` is well-implemented. It checks the tuple's length and the number of coordinates, distances, indices, and supercell information.\n\n---\n\n`376-388`: This test case effectively checks the consistent return type when no points are found in the sphere, addressing the issue #3794 directly. The use of `isinstance` and checking the types within the tuple to ensure they are all numpy arrays is a good practice.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 650ee0cf792410ea8e722e82dc46401129a30e41 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-05-01T17:06:54
| 2024-05-01T17:18:12
|
2024-05-01T17:18:12Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
closes #3794
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3797/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/3797/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3797",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3797",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3797.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3797.patch",
"merged_at": "2024-05-01T17:18:12Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3798
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3798/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3798/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3798/events
|
https://github.com/materialsproject/pymatgen/pull/3798
| 2,273,975,593
|
PR_kwDOACgets5uRrWB
| 3,798
|
Fix overlayed subplots in `BSPlotterProjected.get_projected_plots_dots()`
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5322856717,
"node_id": "LA_kwDOACgets8AAAABPURZDQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/data%20viz",
"name": "data viz",
"color": "3C19AC",
"default": false,
"description": "PRs and issues about pymatgen plotting functionality"
},
{
"id": 5966808010,
"node_id": "LA_kwDOACgets8AAAABY6ZDyg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/electronic%20structure",
"name": "electronic structure",
"color": "6027F8",
"default": false,
"description": "Electronic structure functionality related"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe recent updates in `pymatgen` have focused on refining method signatures, improving variable naming for clarity, and adjusting enumeration in loops across various modules. These changes aim to enhance code readability and maintain consistency, especially in handling band structures and plotting functionalities.\n\n## Changes\n| Files | Summary of Changes |\n|-------|--------------------|\n| `pymatgen/electronic_structure/plotter.py` | - Updated method signature in `BSPlotterProjected` for `__init__` and `_bs` attribute.<br>- Modified method signature for `get_projections_by_branches` and `get_projected_plots_dots` with additional parameters.<br>- Adjusted return type annotation in `get_elt_projected_plots`. |\n| `tests/electronic_structure/test_bandstructure.py` | - Added a print statement for title display before asserting its value with LaTeX formatting. |\n\n## Assessment against linked issues\n\n| Objective | Addressed | Explanation |\n|-----------|-----------|-------------|\n| Overlayed subplots from `BSPlotterProjected.get_projected_plots_dots()` and `get_projected_plots_dots_patom_pmorb()` [#3760] | ❌ | The changes in `electronic_structure/plotter.py` do not directly address the issue of missing subfigures or extra axes as described. Further investigation or adjustments in the plotting methods are likely needed to resolve the reported problems. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n```plaintext\npymatgen/electronic_structure/plotter.py: ### Alterations to the declarations of exported or public entities:\n\n- `def __init__(self, bs) -> None:` in class `BSPlotterProjected` changed to `def __init__(self, bs: BandStructureSymmLine) -> None:`\n- `self._bs = bs` changed to `self._bs: BandStructureSymmLine = bs`\n- `def _get_projections_by_branches(self, dictio):` changed to `def _get_projections_by_branches(self, project_onto):`\n- `def get_projected_plots_dots(self, dictio, zero_to_efermi=True, ylim=None, vbm_cbm_marker=False):` changed to `def get_projected_plots_dots(self, dictio, zero_to_efermi=True, ylim=None, vbm_cbm_marker=False, band_linewidth: float = 1.0):`\n- `def get_elt_projected_plots(self, zero_to_efermi: bool = True, ylim=None, vbm_cbm_marker: bool = False) -> plt.Axes:` changed to `def get_elt_projected_plots(self, zero_to_efermi: bool = True, ylim=None, vbm_cbm_marker: bool = False) -> plt.Axes:`\n\n---\n\ntests/electronic_structure/test_bandstructure.py: ## Short Summary\nIn the `test_proj_bandstructure_plot` function of `test_bandstructure.py`, a print statement was added to display the title before asserting its value, which was updated to use LaTeX formatting for the title comparison.\n\n## Alterations to the declarations of exported or public entities\n- `test_proj_bandstructure_plot` function in `test_bandstructure.py`:\n - Assertion statement modified to compare the title with LaTeX formatting.\n```\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives (User Provided Facts)\n\nThe pull request (PR) number 3798 titled \"Fix overlayed subplots in `BSPlotterProjected.get_projected_plots_dots()`\" aims to address an issue where all subplots were incorrectly plotted into the first axes in the `BSPlotterProjected` class of the pymatgen library. The PR includes visual representations of the issue before and after the fix. Additionally, there is a concern about the appearance of \"fat lines\" in the `Cu d` subplot, suggesting potential overlaying of multiple band structures. The PR author seeks further investigation from other contributors and requests specific output expectations and relevant files from a user experiencing the issue.\n\n### Comments Summary\n\n- **Contributor Interaction**:\n - Contributors like `DanielYang59` and `JaGeo` engage in discussions about the issue, offering assistance and sharing examples for comparison.\n - `janosh` provides guidance on loading JSON bandstructure files with projections for testing purposes.\n- **Code Tweaks and Fixes**:\n - `DanielYang59` makes adjustments to marker sizes and restricts plots to the actual path, improving visual clarity.\n - Discussions focus on improving the appearance of the `Cu d` orbital plot and addressing overlapping tick labels.\n- **Testing and Validation**:\n - Contributors discuss potential improvements in point sizes for better visual presentation.\n - Code modifications are made to allow users to choose marker sizes and restrict plots to the actual path, enhancing the overall plot quality.\n\n### AI-Generated Summary of Generated Summaries\n\nThe PR introduces enhancements across various files in the pymatgen library, focusing on code clarity, functionality improvements, and testing enhancements:\n\n1. **General Improvements**:\n - Loops that previously started implicitly at index 0 now explicitly start from 1 in multiple files, ensuring clearer code regarding enumeration.\n\n2. **Functionality and Method Signature Changes**:\n - Updates in `bandstructure.py` enhance the `get_projections_on_elements_and_orbitals` method to handle complex inputs and improve robustness.\n - Significant updates in `electronic_structure/plotter.py` include explicit requirements in the `BSPlotterProjected` class constructor and additional parameters for customizable plots.\n\n3. **Code Clarity and Readability Enhancements**:\n - Descriptive variable naming changes in loops across files improve code readability and understanding.\n - Variable renaming in the `phonon` module enhances clarity regarding variable roles in plotting.\n\n4. **Testing and Validation**:\n - Assertive checks in `test_plotter.py` ensure the plotting functionality behaves as expected post changes, enhancing testing coverage.\n\nThese updates collectively enhance the functionality, clarity, and robustness of the pymatgen library, particularly in electronic structure and plotting modules.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n- **pymatgen/apps/borg/queen.py**:\n - `def serial_assimilate(self, root: str | Path) -> None`:\n - Before: `for idx, path in enumerate(valid_paths, 1)`\n - After: `for idx, path in enumerate(valid_paths, start=1)`\n\n- **pymatgen/electronic_structure/bandstructure.py**:\n - `def get_projections_on_elements_and_orbitals(self, el_orb_spec)`:\n - Before: Not specified\n - After: `def get_projections_on_elements_and_orbitals(self, el_orb_spec: dict[str, list[str]])`\n\n- **pymatgen/electronic_structure/plotter.py**:\n - `def __init__(self, bs) -> None`:\n - Before: `self._bs = bs`\n - After: `self._bs: BandStructureSymmLine = bs`\n - `def get_projected_plots_dots(self, dictio, zero_to_efermi=True, ylim=None, vbm_cbm_marker=False)`:\n - Before: Not specified\n - After: `def get_projected_plots_dots(self, dictio, zero_to_efermi=True, ylim=None, vbm_cbm_marker=False, band_linewidth: float = 1.0)`\n\n- **pymatgen/symmetry/kpath.py**:\n - `for b in self.kpath[\"path\"]:`:\n - Before: `for i in range(1, len(b))`\n - After: `for path_step in range(1, len(k_path))`\n\n- **pymatgen/transformations/site_transformations.py**:\n - `def _complete_ordering(self, structure: Structure, num_remove_dict)`:\n - Before: `for idx, all_indices in enumerate(itertools.product(*all_combis), 1)`\n - After: `for idx, all_indices in enumerate(itertools.product(*all_combis), start=1)`\n\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 719793d0df6d5533c7a738ee0a48a8b353ab1e2b and c309689b857cd3308d5948163ad15aeb4c1e8c25.\n</details>\n\n\n<details>\n<summary>Files selected for processing (2)</summary>\n\n* pymatgen/electronic_structure/plotter.py (17 hunks)\n* tests/electronic_structure/test_bandstructure.py (1 hunks)\n\n</details>\n\n\n\n\n\n\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (1)</summary>\n\n* pymatgen/electronic_structure/plotter.py\n\n</details>\n\n\n<details><summary>Additional comments not posted (1)</summary><blockquote>\n<details><summary>tests/electronic_structure/test_bandstructure.py (1)</summary><blockquote>\n\n`363-364`: LGTM! Good addition of an assertion to check the plot title, ensuring it matches the expected format.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 719793d0df6d5533c7a738ee0a48a8b353ab1e2b -->\n<!-- c309689b857cd3308d5948163ad15aeb4c1e8c25 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"> ran out of time on this fix but noticed that the fat lines in the Cu d still look off. like it's still overlaying multiple band structures. maybe someone else has time to take a look @DanielYang59 @JaGeo? \r\n\r\nThanks for ping me. I would definitely be happy to have a look later.\r\n\r\n> also @HERTZCAI could you comment on what output you're expecting and share the vasprun.xml file you were plotting in https://github.com/materialsproject/pymatgen/issues/3760\r\n\r\nYes the desired output and a `vasprun.xml` to create would certainly be helpful (I currently don't have one to test at hand). \r\n",
"@janosh i don't really have the time at the moment. Sorry! ",
"> @janosh i don't really have the time at the moment. Sorry!\r\n\r\nI could give a hand on this then 😄 Thanks!",
"@DanielYang59 you should be able to load any JSON bandstructure file with projections the way the current test does\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/a9667f7e236a1e2120f7b905529e653c994161e8/tests/electronic_structure/test_plotter.py#L183-L191\r\n\r\nif you search the code base for `\"projections\": {\"` you find several.",
"Tweaked a bit (orbital name subscript, and hide empty orbitals), but the `Cu_d` orbital still is a mess.\r\n\r\n\r\n\r\n",
"@DanielYang59 I have one example here with an expected outcome and files. Maybe, this could help? It's based on LOBSTER output but uses the same plotting options.\r\n\r\nhttps://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2019-01-11-How%20to%20plot%20and%20evaluate%20output%20files%20from%20Lobster.ipynb",
"> @DanielYang59 I have one example here with an expected outcome and files. Maybe, this could help? It's based on LOBSTER output but uses the same plotting options.\r\n> \r\n> https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2019-01-11-How%20to%20plot%20and%20evaluate%20output%20files%20from%20Lobster.ipynb\r\n\r\nThanks for sending that through. Sorry to say but that seems to look even worse than what we have now 😓. The title and tick labels badly overlapped. Maybe we should fix that as well?\r\n\r\nIt seems to be using the same Class, maybe we should rerun the plotter to see if things improved?",
"> It seems to be using the same Class, maybe we should rerun the plotter to see if things improved?\r\n\r\nthat would be good. could migrate the `matgenb` repo to `ruff` for linting and formatting while at it\r\n\r\n> The title and tick labels badly overlapped. Maybe we should fix that as well?\r\n\r\nyes please!\r\n\r\ngiven that the example @JaGeo linked also has fat bands, i'm starting to think the `Cu d` is looking as it's supposed to in which case after fixing the overlapping tick labels, we're done here\r\n\r\n\r\n",
"@janosh I think the point sizes are chosen in a way that it looks a bit messy...\r\n\r\nAnd yes, fixing the overlap of labels would be awesome.",
"Could we also restrict the plot to the actual path and not show white space before and after?",
"I just tweaked the code in 0fc39311ac545bd185b2098e6fecaaf50050584e to allow user choosing marker size themselves, which seem to improve the overlapping a bit. Of course they could make it even smaller but the marker for other orbitals might be hard to notice.\r\n\r\n",
"I just tweaked the code in 0fc39311ac545bd185b2098e6fecaaf50050584e to allow user choosing marker size themselves, which seem to improve the overlapping a bit. Of course they could make it even smaller, but the marker for other orbitals might be hard to see.\r\n\r\n> Could we also restrict the plot to the actual path and not show white space before and after?\r\n\r\nAbsolutely! Fixed in 0aee82858edd5934e4ff40dee11fc881582e96bc\r\n\r\n\r\n",
"Soooo much better now! Thanks, @DanielYang59 !"
] | 2024-05-01T18:32:19
| 2024-05-04T04:31:16
|
2024-05-02T14:28:51Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
closes #3760
**before**

**after**

there were multiple issues in `BSPlotterProjected.get_projected_plots_dots`: all subplots were plotted into the 1st axes. the large axis labels from `pretty_plot` were applied to the whole figure, not the individual subplots
ran out of time on this fix but noticed that the fat lines in the `Cu d` still look off. like it's still overlaying multiple band structures. maybe someone else has time to take a look @DanielYang59 @JaGeo? also @HERTZCAI could you comment on what output you're expecting and share the `vasprun.xml` file you were plotting in #3760
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3798/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/3798/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3798",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3798",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3798.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3798.patch",
"merged_at": "2024-05-02T14:28:51Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3799
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3799/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3799/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3799/events
|
https://github.com/materialsproject/pymatgen/pull/3799
| 2,275,387,383
|
PR_kwDOACgets5uWfis
| 3,799
|
Help fix `BSPlotterProjected`
|
{
"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
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5322856717,
"node_id": "LA_kwDOACgets8AAAABPURZDQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/data%20viz",
"name": "data viz",
"color": "3C19AC",
"default": false,
"description": "PRs and issues about pymatgen plotting functionality"
},
{
"id": 5966808010,
"node_id": "LA_kwDOACgets8AAAABY6ZDyg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/electronic%20structure",
"name": "electronic structure",
"color": "6027F8",
"default": false,
"description": "Electronic structure functionality related"
}
] |
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 |
[
"> Wondering what is the best way to push commit to another person's PR without being a maintainer?\r\n\r\nthe way you did is exactly right, i.e. open a PR to the WIP branch",
"@janosh Can you review this please? I also fixed the unit tests.\r\n\r\nHowever I'm not sure if we should set \"orbital\" as subscript, feel free to revert this if you think otherwise :)",
"All good! Thanks for reviewing!"
] | 2024-05-02T12:12:11
| 2024-05-15T01:11:16
|
2024-05-02T14:17:17Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Give a hand on #3798.
- Set orbital in subplot title as subscript, and increase the title font size.
- Allow user to set marker size.
- Docstring tweaks.
- Fixed a typo in `io.adf` for repeated `start` as keyword and position args.
- Minor type fixes.
Wondering what is the best way to push commit to another person's PR without being a maintainer?
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3799/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/3799/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3799",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3799",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3799.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3799.patch",
"merged_at": "2024-05-02T14:17:17Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3800
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3800/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3800/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3800/events
|
https://github.com/materialsproject/pymatgen/pull/3800
| 2,275,647,040
|
PR_kwDOACgets5uXY0R
| 3,800
|
More type annotations
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe recent updates across various files in the Python library focus on refining method definitions and documentation for improved code clarity and type checking. Changes include adding return type hints, updating docstrings, and transitioning setup methods in the test suite from class-level to instance-level for enhanced flexibility and clarity during testing.\n\n## Changes\n\n| File Path | Change Summary |\n|--------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| `.../vasp/inputs.py` | Updated `copy` method in `SomeClass` with a return type hint and a descriptive docstring. |\n| `.../symmetry/structure.py` | Modified `copy` method in `SymmetrizedStructure` to specify the return type as `Self` and update the docstring. |\n| `tests/core/test_interface.py` | Converted class-level setup methods to instance-level in `TestGrainBoundary` and adjusted variable references. |\n| `.../analysis/ewald.py` | Refined docstrings for properties `eta`, `best_m_list`, `minimized_sum`, and `output_lists` for clarity. |\n| `.../analysis/nmr.py` | Updated docstrings for properties related to chemical shielding tensors for improved descriptions. |\n| `.../io/lobster/outputs.py` | Enhanced docstrings for properties `icohplist` and `icohpcollection`, and specified return type for `get_doc`. |\n| `.../io/nwchem.py` | Clarified the docstring for the `as_dict` method to improve its purpose description. |\n| `.../io/pwscf.py` | Added `Any` to `typing` import, updated type annotations, specified return types, and refined docstrings. |\n| `.../io/shengbte.py` | Updated the docstring for the `as_dict` method to improve clarity. |\n| `.../io/vasp/help.py` | Changed documentation for `get_incar_tags` method to provide a clearer description of its functionality. |\n| `.../phonon/bandstructure.py` | Updated the `as_dict` method in `BandStructureSymmLine` for better clarity. |\n| `.../phonon/gruneisen.py` | Made adjustments to method names and docstrings for clarity in thermal conductivity calculations. |\n| `.../symmetry/settings.py` | Changed the return type of the `inverse` property to `Self` and updated the return statement accordingly. |\n| `.../transformations/advanced_transformations.py`,<br>`.../site_transformations.py`,<br>`.../standard_transformations.py` | Removed redundant properties and methods for streamlining code across multiple classes. |\n| `.../transformations/transformation_abc.py` | Removed `@abc.abstractmethod` decorators and updated docstrings for `inverse` and `is_one_to_many` properties. |\n| `.../util/provenance.py` | Updated docstrings for `as_dict` methods in `HistoryNode` and `History` classes for clarity in purpose. |\n| `tests/transformations/test_advanced_transformations.py` | Updated the description for the `get_table` method for improved clarity. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n```\npymatgen/io/vasp/inputs.py: ## Short Summary\n\nIn the `pymatgen/io/vasp/inputs.py` file, the `copy` method in a class has been updated to include a return type hint and a docstring describing its functionality.\n\n## Alterations to the declarations of exported or public entities\n\n- `def copy(self) -> Self` in class `SomeClass` in `pymatgen/io/vasp/inputs.py`\n\n---\n\npymatgen/symmetry/structure.py: ## Short Summary\nThe change in functionality involves modifying the `copy` method in the `SymmetrizedStructure` class within `pymatgen/symmetry/structure.py` to specify the return type as `Self` and update the method description.\n\n## Alterations to the declarations of exported or public entities\n- `def copy(self) -> Self: # type: ignore[override]`\n\n---\n\ntests/core/test_interface.py: ## Short Summary\n\nThe functionality change in `tests/core/test_interface.py` involves converting class-level setup methods to instance-level setup methods and updating the references accordingly. This change affects the initialization and testing of grain boundaries in the test suite.\n\n## Alterations to the declarations of exported or public entities\n\n- `setUpClass(cls)` in class `TestGrainBoundary` => `setUp(self)` in class `TestGrainBoundary`\n- `cls.Cu_conv`, `cls.Cu_GB1`, `cls.Cu_GB2` => `self.Cu_conv`, `self.Cu_GB1`, `self.Cu_GB2` in class `TestGrainBoundary`\n- `def test_init(self)` and `def test_copy(self)` remain unchanged\n\n---\n\npymatgen/analysis/ewald.py: ## Short Summary\n\nThe changes in `ewald.py` involve semantic modifications to the docstrings of properties `eta`, `best_m_list`, `minimized_sum`, and `output_lists`, providing clearer descriptions of their functionality.\n\n## Alterations to the declarations of exported or public entities\n\n- `eta` property:\n - Before: `Returns: eta value used in Ewald summation.`\n - After: `Eta value used in Ewald summation.`\n\n- `best_m_list` property:\n - Before: `Returns: Best m_list found.`\n - After: `The best manipulation list found.`\n\n- `minimized_sum` property:\n - Before: `Returns: Minimized sum.`\n - After: `The minimized Ewald sum.`\n\n- `output_lists` property:\n - Before: `Returns: output lists.`\n - After: `Output lists.`\n\n---\n\npymatgen/analysis/nmr.py: ## Short Summary\n\nThe changes in the `nmr.py` file involve updating docstrings for properties related to chemical shielding tensors, specifically in Haeberlen, Mehring, and Maryland notations. The modifications focus on refining the descriptions of these properties.\n\n## Alterations to the declarations of exported or public entities\n\n- `haeberlen_values` property:\n - From: `Returns: the Chemical shielding tensor in Haeberlen Notation.`\n - To: `The Chemical shielding tensor in Haeberlen Notation.`\n\n- `mehring_values` property:\n - From: `Returns: the Chemical shielding tensor in Mehring Notation.`\n - To: `The Chemical shielding tensor in Mehring Notation.`\n\n- `maryland_values` property:\n - From: `Returns: the Chemical shielding tensor in Maryland Notation.`\n - To: `The Chemical shielding tensor in Maryland Notation.`\n\n- `V_xx` property:\n - From: `Returns: First diagonal element.`\n - To: `First diagonal element.`\n\n- `V_yy` property:\n - From: `Returns: Second diagonal element.`\n - To: `Second diagonal element.`\n\n- `V_zz` property:\n - From: `Returns: Third diagonal element.`\n - To: `Third diagonal element.`\n\n---\n\npymatgen/io/lobster/outputs.py: ## Short Summary\n\nThe changes in `pymatgen/io/lobster/outputs.py` involve updating docstrings for the `icohplist` and `icohpcollection` properties to provide clearer descriptions. Additionally, the `get_doc` method now specifies the return type as `dict[str, Any]` and uses more descriptive variable names within the method.\n\n## Alterations to the Declarations of Exported or Public Entities\n\n- `def icohplist(self) -> dict[Any, dict[str, Any]]` in class `Outputs` => `def icohplist(self) -> dict[Any, dict[str, Any]]` in class `Outputs`\n - Description change: `\"Returns: icohplist compatible with older version of this class.\"` => `\"The ICOHP list compatible with older version of this class.\"`\n\n- `def icohpcollection(self)` in class `Outputs` => `def icohpcollection(self)`\n - Description change: `\"Returns: IcohpCollection object.\"` => `\"The IcohpCollection object.\"`\n\n- `def get_doc(self)` in class `Outputs` => `def get_doc(self) -> dict[str, Any]` in class `Outputs`\n - Description change: `\"Returns: LobsterDict with all the information stored in lobsterout.\"` => `\"Get the LobsterDict with all the information stored in lobsterout.\"`\n - Variable name change: `LobsterDict` => `lobster_dict`\n\n---\n\npymatgen/io/nwchem.py: ## Short Summary\n\nThe changes in `pymatgen/io/nwchem.py` involve updating the docstrings for the `as_dict` method to change the description from \"Returns: MSONable dict.\" to \"Get MSONable dict.\" This modification improves the clarity of the method's purpose.\n\n---\n\npymatgen/io/pwscf.py: ## Short Summary\n\nThe changes in `pymatgen/io/pwscf.py` include adding `Any` to the `typing` import, changing the type annotation of `self.data` to use `Any`, specifying return types for the `final_energy` and `lattice_type` properties, and updating docstrings for these properties.\n\n---\n\npymatgen/io/shengbte.py: ## Short Summary\n\nIn the `pymatgen/io/shengbte.py` file, the `as_dict` method's docstring has been changed from `\"Returns: MSONable dict.\"` to `\"Get MSONable dict.\"`.\n\n## Alterations to the declarations of exported or public entities\n\n- `def as_dict(self)` in `pymatgen/io/shengbte.py` => Docstring changed from `\"Returns: MSONable dict.\"` to `\"Get MSONable dict.\"`\n\n---\n\npymatgen/io/vasp/help.py: ## Alterations to the declarations of exported or public entities\n\n- `def get_incar_tags(cls) -> list[str]` in class `Help` in `pymatgen/io/vasp/help.py` changed documentation from `\"Returns: All incar tags.\"` to `\"Get a list of all INCAR tags from the VASP wiki.\"`\n\n---\n\npymatgen/phonon/bandstructure.py: ## Alterations to the declarations of exported or public entities\n\n- `def as_dict(self) -> dict` in class `BandStructureSymmLine` in `pymatgen/phonon/bandstructure.py` changed from `Returns: MSONable dict.` to `Get MSONable dict.`\n\n---\n\npymatgen/phonon/gruneisen.py: ### Alterations to the declarations of exported or public entities:\n\n- `def thermal_conductivity_slack(...)` in `pymatgen/phonon/gruneisen.py`:\n - Changed the calculation of thermal conductivity, updating variable names and return statement.\n\n- `def tdos(self)` in `pymatgen/phonon/gruneisen.py`:\n - Renamed variables for clarity in the method.\n\n- `def phdos(self) -> PhononDos` in `pymatgen/phonon/gruneisen.py`:\n - Updated the docstring for the method.\n\n---\n\npymatgen/symmetry/settings.py: ## Summary\n\nIn `pymatgen/symmetry/settings.py`, the `inverse` property's return type has been changed from `JonesFaithfulTransformation` to `Self`. The return statement within the property has been updated to use `type(self)` for instantiation.\n\n---\n\npymatgen/transformations/advanced_transformations.py: ## Alterations to the declarations of exported or public entities\n\n- `is_one_to_many` property in class `ChargeBalanceTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return False`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `SuperTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `MultipleSubstitutionTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `EnumerateStructureTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `SubstitutionPredictorTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `MagOrderingTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `DisorderOrderedTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `CubicSupercellTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return False`\n - After: `def is_one_to_many(self) -> bool: return False`\n\n- `is_one_to_many` property in class `AddAdsorbateTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `RemoveAdsorbateTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `SQSDepositionTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return True`\n - After: `def is_one_to_many(self) -> bool: return True`\n\n- `is_one_to_many` property in class `RattleSiteTransformation`:\n - Before: `def is_one_to_many(self) -> bool: return False`\n - After: `def is_one_to_many(self) -> bool: return False`\n\n---\n\npymatgen/transformations/site_transformations.py: ## Short Summary\n\nThe changes in `site_transformations.py` involve removing redundant `inverse` and `is_one_to_many` properties from several transformation classes, streamlining the code by eliminating unnecessary methods.\n\n## Alterations to the declarations of exported or public entities\n\n- `InsertSiteTransformation` class:\n - Removed `inverse` property.\n - Removed `is_one_to_many` property.\n\n- `ReplaceSiteSpeciesTransformation` class:\n - Removed `inverse` property.\n - Removed `is_one_to_many` property.\n\n- `RemoveSitesTransformation` class:\n - Removed `inverse` property.\n - Removed `is_one_to_many` property.\n\n- `TranslateSitesTransformation` class:\n - Removed `is_one_to_many` property.\n\n- `RadialSiteDistortionTransformation` class:\n - Removed `inverse` property.\n\n- `RadialSiteDistortionTransformation` class:\n - Removed `inverse` property.\n - Removed redundant comment in the `inverse` property.\n\n- `RadialSiteDistortionTransformation` class:\n - Removed `inverse` property.\n - Removed `is_one_to_many` property.\n\n---\n\npymatgen/transformations/standard_transformations.py: ## Short Summary\n\nThe diff in `pymatgen/transformations/standard_transformations.py` involves removing `is_one_to_many` properties and associated methods from various classes like `OxidationStateDecorationTransformation`, `AutoOxiStateDecorationTransformation`, `OxidationStateRemovalTransformation`, `SupercellTransformation`, `SubstitutionTransformation`, `RemoveSpeciesTransformation`, `PartialRemoveSpecieTransformation`, `OrderDisorderedStructureTransformation`, `PrimitiveCellTransformation`, `ConventionalCellTransformation`, `PerturbStructureTransformation`, `DeformStructureTransformation`, `DiscretizeOccupanciesTransformation`, `ChargedCellTransformation`, and `ScaleToRelaxedTransformation`.\n\n---\n\npymatgen/transformations/transformation_abc.py: ## Short Summary\n\nThe changes in `transformation_abc.py` involve removing `@abc.abstractmethod` decorators from the `inverse` and `is_one_to_many` properties. The docstrings for these properties have been updated to clarify their default behaviors.\n\n## Alterations to the declarations of exported or public entities\n\n- `@abc.abstractmethod` removed from `inverse` property in `transformation_abc.py`\n- `@abc.abstractmethod` removed from `is_one_to_many` property in `transformation_abc.py`\n\n---\n\npymatgen/util/provenance.py: ## Alterations to the declarations of exported or public entities\n\n- `def as_dict(self) -> dict[str, str]` in class `HistoryNode` in `pymatgen/util/provenance.py` changed from `Returns: Dict.` to `Get MSONable dict.`\n- `def as_dict(self)` in class `HistoryNode` in `pymatgen/util/provenance.py` changed from `Returns: MSONable dict.` to `Get MSONable dict.`\n- `def as_dict(self)` in class `History` in `pymatgen/util/provenance.py` changed from `Returns: MSONable dict.` to `Get MSONable dict.`\n\n---\n\ntests/transformations/test_advanced_transformations.py: ## Alterations to the declarations of exported or public entities\n\n- `def get_table()` in `tests/transformations/test_advanced_transformations.py`:\n - Before: `Loads a lightweight lambda table for use in unit tests to reduce initialization time, and make unit tests insensitive to changes in the default lambda table.`\n - After: `Loads a lightweight lambda table for use in unit tests to reduce initialization time, and make unit tests insensitive to changes in the default lambda table.`\n\n---\n```\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe primary objective of Pull Request #3800, titled \"More type annotations,\" is to enhance the type safety and documentation of the codebase by adding more explicit type annotations and updating method descriptions across several files in the project. This PR focuses on improving the clarity and maintainability of the code by specifying return types and refining docstrings for better developer understanding and tooling support.\n\n### AI-generated Summary of Generated Summaries\n\nThis pull request introduces significant updates to the type annotations and method descriptions in the `pymatgen` library, primarily focusing on the VASP inputs, symmetry modules, and core testing suite.\n\n1. **VASP Inputs Module (`pymatgen/io/vasp/inputs.py`)**:\n - The `copy` method in a class within this module now includes a return type hint of `Self`, enhancing type checking and code clarity. The method's docstring has been updated to provide a detailed description of its functionality, aiding developers in understanding its purpose.\n\n2. **Symmetry Structure Module (`pymatgen/symmetry/structure.py`)**:\n - The `copy` method in the `SymmetrizedStructure` class specifies the return type as `Self`, with an annotation to handle potential type checking conflicts. The method description has been revised to reflect these changes and improve documentation.\n\n3. **Core Test Interface (`tests/core/test_interface.py`)**:\n - Refactoring in this module involves converting class-level setup methods to instance-level setup methods, impacting how grain boundaries are initialized and tested. This change aims to enhance test isolation and independence, while preserving core testing functionality.\n\n4. **Ewald Analysis Module (`pymatgen/analysis/ewald.py`)**:\n - Docstring updates for properties like `eta`, `best_m_list`, `minimized_sum`, and `output_lists` provide clearer descriptions of their functionality, improving code understanding.\n\n5. **NMR Analysis Module (`pymatgen/analysis/nmr.py`)**:\n - Refinements in docstrings for properties related to chemical shielding tensors enhance the descriptions for properties like `haeberlen_values`, `mehring_values`, and `maryland_values`.\n\nThese changes collectively aim to enhance code clarity, maintainability, and developer experience within the `pymatgen` library.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**pymatgen/io/vasp/inputs.py**:\n- Before: `def copy(self)`\n- After: `def copy(self) -> Self`\n\n**pymatgen/symmetry/structure.py**:\n- Before: `def copy(self)`\n- After: `def copy(self) -> Self: # type: ignore[override]`\n\n**tests/core/test_interface.py**:\n- Before: `setUpClass(cls)` with attributes `cls.Cu_conv`, `cls.Cu_GB1`, `cls.Cu_GB2`\n- After: `setUp(self)` with attributes `self.Cu_conv`, `self.Cu_GB1`, `self.Cu_GB2`\n\n**pymatgen/analysis/ewald.py**:\n- Updated docstrings for properties like `eta`, `best_m_list`, `minimized_sum`, and `output_lists` to provide clearer descriptions.\n\n**pymatgen/analysis/nmr.py**:\n- Refined docstrings for properties related to chemical shielding tensors for `haeberlen_values`, `mehring_values`, `maryland_values`, `V_xx`, `V_yy`, and `V_zz`.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 68734ab583d74e12671420ba0eeb7c36e2af4092 and 6e46259e91766c129506c370ff24fca72f5cfa69.\n</details>\n\n\n<details>\n<summary>Files selected for processing (33)</summary>\n\n* dev_scripts/update_pt_data.py (1 hunks)\n* pymatgen/alchemy/filters.py (3 hunks)\n* pymatgen/analysis/ewald.py (2 hunks)\n* pymatgen/analysis/molecule_structure_comparator.py (1 hunks)\n* pymatgen/analysis/nmr.py (3 hunks)\n* pymatgen/analysis/pourbaix_diagram.py (1 hunks)\n* pymatgen/analysis/structure_matcher.py (4 hunks)\n* pymatgen/analysis/structure_prediction/substitution_probability.py (1 hunks)\n* pymatgen/analysis/structure_prediction/substitutor.py (3 hunks)\n* pymatgen/analysis/thermochemistry.py (1 hunks)\n* pymatgen/apps/battery/battery_abc.py (1 hunks)\n* pymatgen/apps/battery/insertion_battery.py (1 hunks)\n* pymatgen/apps/borg/hive.py (3 hunks)\n* pymatgen/command_line/critic2_caller.py (1 hunks)\n* pymatgen/core/operations.py (1 hunks)\n* pymatgen/io/adf.py (1 hunks)\n* pymatgen/io/cif.py (1 hunks)\n* pymatgen/io/feff/outputs.py (1 hunks)\n* pymatgen/io/lammps/outputs.py (1 hunks)\n* pymatgen/io/lobster/outputs.py (3 hunks)\n* pymatgen/io/nwchem.py (2 hunks)\n* pymatgen/io/pwscf.py (3 hunks)\n* pymatgen/io/shengbte.py (1 hunks)\n* pymatgen/io/vasp/help.py (1 hunks)\n* pymatgen/phonon/bandstructure.py (1 hunks)\n* pymatgen/phonon/gruneisen.py (3 hunks)\n* pymatgen/symmetry/settings.py (1 hunks)\n* pymatgen/transformations/advanced_transformations.py (15 hunks)\n* pymatgen/transformations/site_transformations.py (6 hunks)\n* pymatgen/transformations/standard_transformations.py (17 hunks)\n* pymatgen/transformations/transformation_abc.py (1 hunks)\n* pymatgen/util/provenance.py (3 hunks)\n* tests/transformations/test_advanced_transformations.py (1 hunks)\n\n</details>\n\n\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (20)</summary>\n\n* dev_scripts/update_pt_data.py\n* pymatgen/alchemy/filters.py\n* pymatgen/analysis/ewald.py\n* pymatgen/analysis/molecule_structure_comparator.py\n* pymatgen/analysis/nmr.py\n* pymatgen/analysis/pourbaix_diagram.py\n* pymatgen/analysis/structure_matcher.py\n* pymatgen/analysis/structure_prediction/substitution_probability.py\n* pymatgen/analysis/thermochemistry.py\n* pymatgen/apps/battery/battery_abc.py\n* pymatgen/apps/battery/insertion_battery.py\n* pymatgen/apps/borg/hive.py\n* pymatgen/io/adf.py\n* pymatgen/io/lammps/outputs.py\n* pymatgen/io/nwchem.py\n* pymatgen/io/shengbte.py\n* pymatgen/phonon/bandstructure.py\n* pymatgen/transformations/site_transformations.py\n* pymatgen/transformations/transformation_abc.py\n* tests/transformations/test_advanced_transformations.py\n\n</details>\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (1)</summary>\n\n* pymatgen/analysis/structure_prediction/substitutor.py\n\n</details>\n\n\n<details><summary>Additional comments not posted (4)</summary><blockquote>\n<details><summary>pymatgen/io/pwscf.py (2)</summary><blockquote>\n\n`577-578`: The method `final_energy` is well implemented with a clear return type annotation.\n\n---\n\n`582-583`: The method `lattice_type` is correctly implemented with a clear return type annotation.\n\n</blockquote></details>\n<details><summary>pymatgen/core/operations.py (1)</summary><blockquote>\n\n`236-239`: The method `inverse` is correctly implemented with a clear return type annotation.\n\n</blockquote></details>\n<details><summary>pymatgen/command_line/critic2_caller.py (1)</summary><blockquote>\n\n`391-392`: Ensure the `type` property correctly handles invalid types.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 68734ab583d74e12671420ba0eeb7c36e2af4092 -->\n<!-- 6e46259e91766c129506c370ff24fca72f5cfa69 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-05-02T14:11:42
| 2024-05-02T15:20:19
|
2024-05-02T15:20:18Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3800/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/3800/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3800",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3800",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3800.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3800.patch",
"merged_at": "2024-05-02T15:20:18Z"
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3801
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3801/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3801/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3801/events
|
https://github.com/materialsproject/pymatgen/pull/3801
| 2,275,814,923
|
PR_kwDOACgets5uX9g7
| 3,801
|
Fix `_get_dipole_info` for DDEC6 `ChargemolAnalysis` and add test case
|
{
"login": "JonathanSchmidt1",
"id": 54937397,
"node_id": "MDQ6VXNlcjU0OTM3Mzk3",
"avatar_url": "https://avatars.githubusercontent.com/u/54937397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JonathanSchmidt1",
"html_url": "https://github.com/JonathanSchmidt1",
"followers_url": "https://api.github.com/users/JonathanSchmidt1/followers",
"following_url": "https://api.github.com/users/JonathanSchmidt1/following{/other_user}",
"gists_url": "https://api.github.com/users/JonathanSchmidt1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JonathanSchmidt1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JonathanSchmidt1/subscriptions",
"organizations_url": "https://api.github.com/users/JonathanSchmidt1/orgs",
"repos_url": "https://api.github.com/users/JonathanSchmidt1/repos",
"events_url": "https://api.github.com/users/JonathanSchmidt1/events{/privacy}",
"received_events_url": "https://api.github.com/users/JonathanSchmidt1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 6605952379,
"node_id": "LA_kwDOACgets8AAAABib7Vew",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/charge",
"name": "charge",
"color": "084665",
"default": false,
"description": "Electric charge analysis, partitioning, integrations, etc."
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe update involves adjusting the index range for parsing dipole information in `chargemol_caller.py` of `pymatgen` and adding a new test assertion in `test_chargemol_caller.py` to validate the parsed data.\n\n## Changes\n\n| File Path | Change Summary |\n|-----------|----------------|\n| `.../chargemol_caller.py` | Adjusted index range for dipole information parsing from `[7:10]` to `[6:9]`. |\n| `.../test_chargemol_caller.py` | Added assertion for `ca.dipoles` in `test_parse_chargemol2`. |\n\n## Possibly related issues\n\n- **Issue materialsproject/pymatgen#3699**: While this issue focuses on parsing OSZICAR files, the essence of ensuring accurate data extraction aligns with the recent change's goal of improving precision in parsing within `pymatgen`.\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/command_line/chargemol_caller.py: ## Short Summary\nIn the `chargemol_caller.py` file of `pymatgen`, the change involves adjusting the indices used for slicing a line to extract dipole information, specifically modifying the range from `[7:10]` to `[6:9]`.\n\n## Alterations to the declarations of exported or public entities\n- `def _get_dipole_info(filepath)` in `chargemol_caller.py` in `pymatgen`:\n - Before: `dipoles.append([float(d) for d in line.strip().split()[7:10]])`\n - After: `dipoles.append([float(d) for d in line.strip().split()[6:9]])`\n\n---\n\ntests/command_line/test_chargemol_caller.py: ### Summary\n\n- Addition of an assertion for `ca.dipoles` in the `test_parse_chargemol2` function in `tests/command_line/test_chargemol_caller.py`.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe primary objective of this pull request (PR #3801) titled \"Fix `_get_dipole_info` for DDEC6 `ChargemolAnalysis` and add test case\" is to address a critical issue in the `_get_dipole_info` function within the `pymatgen` library's `chargemol_caller.py` file. The function was incorrectly extracting dipole information, leading to inaccurate results. The PR aims to correct this by adjusting the indices used for slicing the output data to capture the correct x, y, and z components of the dipole.\n\nTo validate the fix, a new test case has been introduced to ensure the function behaves as expected when processing non-zero dipole moments. This test case involves data from multiple oxygen atoms with distinct dipole components, verifying the accuracy of the modified function.\n\nThe PR also focuses on maintaining code quality by incorporating Google format doc strings and type annotations, which have been validated using tools like `ruff` and `mypy`. The final step involves a peer review to confirm the correctness of the changes before merging.\n\n### AI-generated Summary of Generated Summaries\n\nIn the `chargemol_caller.py` file of the `pymatgen` library, a crucial adjustment has been made to the `_get_dipole_info` function. The modification involves changing the indices for slicing a line to extract dipole information from `[7:10]` to `[6:9]`. This change ensures that the function now correctly retrieves the x, y, and z components of the dipole from the output files of Chargemol (DDEC6), instead of incorrectly capturing the y, z components and the magnitude.\n\nFurthermore, the `test_chargemol_caller.py` file has been updated to include a new test case in the `test_parse_chargemol2` function. This addition involves an assertion for `ca.dipoles` to validate the corrected behavior of the `_get_dipole_info` function when processing non-zero dipole moments. This test case uses data from three oxygen atoms with specified dipole components, ensuring that the function accurately captures and returns these values.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**File: `pymatgen/command_line/chargemol_caller.py`**\n- **Function: `_get_dipole_info(filepath)`**\n - **Before Change:**\n ```python\n dipoles.append([float(d) for d in line.strip().split()[7:10]])\n ```\n - **After Change:**\n ```python\n dipoles.append([float(d) for d in line.strip().split()[6:9]])\n ```\n\n**File: `tests/command_line/test_chargemol_caller.py`**\n- **Addition in Function: `test_parse_chargemol2`**\n - **New Assertion:**\n ```python\n self.assertEqual(ca.dipoles, expected_dipoles)\n ```\n Where `expected_dipoles` is a list of lists containing the corrected dipole values for the test case scenario.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 6376b61909a534a58f4097122d9aa0694420ffab and 6b0030faf0e9f5132f30b369f2b723d18ce7826e.\n</details>\n\n\n<details>\n<summary>Files selected for processing (1)</summary>\n\n* pymatgen/command_line/chargemol_caller.py (4 hunks)\n\n</details>\n\n\n\n\n\n\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (1)</summary>\n\n* pymatgen/command_line/chargemol_caller.py\n\n</details>\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 6376b61909a534a58f4097122d9aa0694420ffab -->\n<!-- 6b0030faf0e9f5132f30b369f2b723d18ce7826e -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-05-02T15:24:01
| 2024-05-02T16:09:34
|
2024-05-02T16:06:52Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Major changes:
- fix 1: _get_dipole_info was previously getting the y and z component and the magnitude instead of x,y and z. The only test case was 0,0,0 so it was never noticed.
Previously the dipole was only checked for the spin unpolarized structure with no dipoles (I added some extra spaces to make it more readable what is dipole and what is dipole_magn):
```
atom number, atomic symbol, x, y, z, _ net_charge, dipole_x, dipole_y, dipole_z, dipole_mag, Qxy, Qxz, Qyz,Q(x^2-y^2), Q(3z^2 - R^2), three eigenvalues of traceless quadrupole moment tensor
1 Na 0.000000 0.000000 0.000000 0.843200 0.000000 0.000000 -0.000000 0.000000 -0.000003 -0.000003 -0.000003 0.000000 0.000000 -0.000000 0.000000 0.000000
2 Cl 2.829447 2.829447 2.829447 -0.843200 -0.000000 -0.000000 -0.000000 0.000000 -0.000020 -0.000020 -0.000020 -0.000000 -0.000000 -0.000041 0.000020 0.000020
```
New test case for dipole:
```
atom number, atomic symbol, x, y, z, net_charge, dipole_x, dipole_y, dipole_z, dipole_mag, Qxy, Qxz, Qyz,Q(x^2-y^2), Q(3z^2 - R^2), three eigenvalues of traceless quadrupole moment tensor
1 O 0.000000 -0.000000 0.319088 0.482714 -0.000000 0.000000 -0.127251 _0.127251_ -0.000000 -0.000000 -0.000000 0.040943 -0.162587 -0.050728 0.003219 0.047509
2 O 0.000000 1.135186 -0.159544 0.258643 0.000000 -0.027857 -0.010944 _0.029929_ 0.000000 0.000000 -0.096730 -0.074725 -0.273919 -0.128456 0.008578 0.119878
3 O 0.000000 -1.135186 -0.159544 0.258643 0.000000 0.027857 -0.010944 _0.029929_ -0.000000 0.000000 0.096730 -0.074725 -0.273919 -0.128456 0.008578 0.119878
```
output of previous function:
`[[0.0, -0.127251, 0.127251], [-0.027857, -0.010944, 0.029929], [0.027857, -0.010944, 0.029929]]`
new output:
`[[-0.0, 0.0, -0.127251], [0.0, -0.027857, -0.010944], [0.0, 0.027857, -0.010944]]`
## Checklist
- [x] Google format doc strings added. Check with `ruff`.
- [x] Type annotations included. Check with `mypy`.
- [x] Tests added for new features/fixes.
Only thing left to do is that someone else confirms that it's correct now.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3801/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/3801/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3801",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3801",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3801.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3801.patch",
"merged_at": "2024-05-02T16:06:52Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3802
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3802/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3802/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3802/events
|
https://github.com/materialsproject/pymatgen/pull/3802
| 2,275,905,436
|
PR_kwDOACgets5uYRlE
| 3,802
|
Imperative `get_...` method and `@property` doc strings
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
}
] |
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-05-02T16:00:52
| 2024-05-02T16:25:42
|
2024-05-02T16:25:41Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
follow up to #3790 and #3792
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3802/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/3802/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3802",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3802",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3802.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3802.patch",
"merged_at": "2024-05-02T16:25:41Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3803
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3803/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3803/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3803/events
|
https://github.com/materialsproject/pymatgen/pull/3803
| 2,277,024,411
|
PR_kwDOACgets5ucGiq
| 3,803
|
Add `strict_anions` option to `MaterialsProject2020Compatibility`
|
{
"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
}
|
[
{
"id": 5414010766,
"node_id": "LA_kwDOACgets8AAAABQrM_jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/needs%20discussion",
"name": "needs discussion",
"color": "D96543",
"default": false,
"description": "Needs discussion to agree on actionable next steps"
},
{
"id": 5457867742,
"node_id": "LA_kwDOACgets8AAAABRVBz3g",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/breaking",
"name": "breaking",
"color": "41396E",
"default": false,
"description": "Breaking change"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
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 |
[
"Notifying @munrojm too, since this would affect MP database builds.",
"To remind ourselves of the anions including in the experimental data used to fit the corrections, I re-generated this list using the same `oxi_state_guess` logic used within the correction scheme:\r\n\r\n| Element | Oxidation State | Count |\r\n|:--------|------------:|--------:|\r\n| O | -2 | 385 |\r\n| Cl | -1 | 100 |\r\n| F | -1 | 74 |\r\n| S | -2 | 73 |\r\n| Br | -1 | 52 |\r\n| I | -1 | 51 |\r\n| Si | -4 | 44 |\r\n| N | -3 | 35 |\r\n| C | -4 | 30 |\r\n| Se | -2 | 29 |\r\n| Pt | -2 | 28 |\r\n| B | -3 | 28 |\r\n| Te | -2 | 22 |\r\n| H | -1 | 22 |\r\n| Au | -1 | 16 |\r\n| P | -3 | 16 |\r\n| As | -3 | 8 |\r\n| Sb | -3 | 6 |\r\n| Sb | -2 | 5 |\r\n| C | -2 | 5 |\r\n| Os | -2 | 5 |\r\n| Os | -1 | 3 |\r\n| P | -1 | 2 |\r\n| S | -1 | 2 |\r\n| P | -2 | 1 |\r\n| Se | -1 | 1 |\r\n| C | -3 | 1 |\r\n\r\nThis list will not be complete.\r\n\r\nThe strictest application of the correction scheme would limit to just these oxidation states, excepting the oxides which have special handling for peroxides/superoxides.",
"## Illustration of Consequences of Over-Stabilization\r\n\r\nTo better illustrate the issue, attached is a graph generated from a set of new structures that are calculated to be on the convex hull when using the correction scheme. The area of concern is this region between a reported -1 oxidation state and 0 oxidation state.\r\n\r\nThe algorithm used to generate the structures shown in this plot heavily samples this region because the correction scheme so heavily stabilizes the structures, but manual inspection suggests the structures are not physically reasonable.\r\n\r\n\r\n\r\nThe y-axis is not particularly meaningful since it is the total energy adjustment, but to give a sense of the consequence, here is the total number of \"anions\" as a fraction of total number of sites in the structure: structures with many purported anions are heavily over-represented. As a reminder, all of these structures are apparently on the convex hull as a result of the applied corrections.\r\n\r\n\r\n\r\nAlso tagging @esoteric-ephemera too, since you may have opinions -- trying to tag a lot of people in this issue because downstream effects of any change may be significant.\r\n\r\n## Further Thoughts on Resolution\r\n\r\nI am thinking perhaps we should be even more strict, and only apply the empirical corrections when the oxidation state is positively identified as an oxidation state in the experimental data used for fitting the corrections. However, I am aware there are many edge cases in the MP database that will be affected by this change, so this will have a subtle knock-on effect in the convex hulls of many chemical systems. However, I think this is a clear bug that does need to be resolved in some way.",
"Thanks for the thoughtful and detailed explanation @mkhorton . I am onboard with your suggestion to not apply corrections if the oxidation state is > -1 (though I would defer to @munrojm and other MP staff due to effects on database builds).\r\n\r\n> I am thinking perhaps we should be even more strict, and only apply the empirical corrections when the oxidation state is positively identified as an oxidation state in the experimental data used for fitting the corrections.\r\n\r\nI see value in this. What if instead of a boolean, we make `strict_anions` a multi-level `int` where\r\n- `0` = current behavior\r\n- `1` (new default) = ignore anions with oxi state >-1\r\n- `2` = ignore anions when oxi state is not in the experimental data\r\n\r\nThat would make it quite easy to test the effects of different choices on hulls during builds, and potentially to let users make different choices depending on their specific needs.\r\n\r\n> However, this does not resolve the case where oxidation states could not be determined. Therefore, I also suggest we might consider a more significant breaking change to only apply the anion corrections where oxidation state is supplied.\r\n\r\nThe current behavior when oxi states are missing is to apply anion corrections IFF the anion is the most electronegative element in the structure. Maybe we add an option `3` that disables this?\r\n\r\n\r\n",
"I concur @rkingsbury, we can have choose more explicit options rather than the int for readability but otherwise I agree. Maybe a `Literal[\"no_check\", \"require_bound\", \"require_exact\"]` to be a bit clearer rather than the int, and maybe a separate flag `require_oxidation_states` (i.e., do not apply correction if no oxidation state provided).\r\n\r\nThe most difficult question is which should be the default I think.",
"> I concur @rkingsbury, we can have choose more explicit options rather than the int for readability but otherwise I agree. Maybe a `Literal[\"no_check\", \"require_bound\", \"require_exact\"]` to be a bit clearer rather than the int, and maybe a separate flag `require_oxidation_states` (i.e., do not apply correction if no oxidation state provided).\r\n\r\nGood ideas, no objections here\r\n\r\n> The most difficult question is which should be the default I think.\r\n\r\nHere, I think we can be pragmatic and make the choice based on what will yield the most accurate hulls overall for the MP database. The formation energy benchmarking dataset we created (part of the r2SCAN workflow paper, also in matbench I think) could be a simple heuristic.\r\n\r\nThe other philosophy would be to use what I said in the previous paragraph to determine the default setting for MP builds only, but then set the default kwarg in pymatgen to either 1) preserve backward compatibility OR 2) for maximum correctness (i.e., no correction unless oxi states are provided).\r\n",
"Thanks Ryan.\r\n\r\nFor MP, the discriminator here is if it is mostly sourced from experimental crystal structures, or if the database also includes hypothetical structures too. I have seen discussion about MP accepting third party calculations for example, and if this happens it might pollute the hull considerably if this issue is not addressed. In other words, I think MP has \"gotten away with\" the correction scheme as it currently is, but the new default should work in the more general case.\r\n\r\nAll this to say, I am thinking maximum correctness should be the default, and maybe limiting to applying the correction only for identified, common oxidation states, and not applying the correction for, say, any assigned non-integer oxidation state.\r\n\r\nHowever I would like MP folks to weigh in here. I am happy to merge this as a fix, but I do not want to cause problems for downstream usage.",
"@mkhorton I agree that with the increase in generative models we almost certainly need better handling of corrections and you presented a pretty compelling case for excluding anion oxidation states >-1.\r\n\r\nI am in favor of @rkingsbury's suggestion to include the strict option as well. However is there any chance this could lead to weird changes in the hull if there is any instability in oxidation state determination? For example, are there any experimentally stable structures where we cannot reliably determine the oxidation states (or they are close to an integer but not exactly an integer)? Would this mean these phases were not compatible with the correction scheme and thus would be essentially \"removed\" from the hull? If there were even a few of these examples it would make me more hesitant to make the stricter options the default behavior",
"> @mkhorton I agree that with the increase in generative models we almost certainly need better handling of corrections and you presented a pretty compelling case for excluding anion oxidation states >-1.\r\n> \r\n> I am in favor of @rkingsbury's suggestion to include the strict option as well. However is there any chance this could lead to weird changes in the hull if there is any instability in oxidation state determination? For example, are there any experimentally stable structures where we cannot reliably determine the oxidation states (or they are close to an integer but not exactly an integer)? Would this mean these phases were not compatible with the correction scheme and thus would be essentially \"removed\" from the hull? If there were even a few of these examples it would make me more hesitant to make the stricter options the default behavior\r\n\r\nYes, there are. Al2O. Mostly because +1 is not an allowed Oxidation state. Surely, it is a suboxide but it does exist\r\nSee https://next-gen.materialsproject.org/materials/mp-8022?formula=Al2O\r\n\r\nThere will be more cases like this. ",
"Thanks @mattmcdermott, @JaGeo, welcome any suggestions here.\r\n\r\n> For example, are there any experimentally stable structures where we cannot reliably determine the oxidation states (or they are close to an integer but not exactly an integer)? \r\n\r\nI would distinguish these cases. The former, certainly. The latter (close to integer but not exactly integer) I think more unlikely?\r\n\r\n> Yes, there are. Al2O. Mostly because +1 is not an allowed Oxidation state. Surely, it is a suboxide but it does exist\r\n\r\nAgree, I mentioned suboxides in the original post, there are other examples too. The correction scheme already distinguishes between peroxides/superoxides/ozonides/regular oxides because there was enough experimental data for materials containing oxygen to fit these and because the correction is meaningfully different as the oxidation state changes. However, it does not make this distinction for other anions due to lack of experimental data.\r\n\r\nThe question really is if the correction would still be suitable for these more uncommon oxidation states. What is our null hypothesis? I think if a correction is fitted for an ion in one particular oxidation state, there is no reason to assume this correction would be transferrable to other oxidation states, and probably good physical reasons to suggest it should not be, as well as the example of e.g. oxygen that demonstrates this.\r\n\r\n> However is there any chance this could lead to weird changes in the hull if there is any instability in oxidation state determination? [...] Would this mean these phases were not compatible with the correction scheme and thus would be essentially \"removed\" from the hull?\r\n\r\nGoing back to @mattmcdermott's question, I'd be surprised if this didn't have some kind of unexpected side effect somewhere. It's definitely a concern. With that said, we are weighing a known error that is already over-stabilizing some compounds, against a possible error which we have not yet observed, so maybe we fix the known error first and then search for additional issues after that? Noting that the examples I provided in the plots above were not even from a generative model, but from a more traditional structure search.",
"Adding that there may be better ways of doing oxidation state assignment too, to minimize this risk.\r\n\r\nNotably, three examples:\r\n\r\n1. The improvement offered by [`doped`](https://github.com/SMTG-Bham/doped) and @kavanase\r\n2. The [`BERTOS`](https://github.com/usccolumbia/BERTOS) model\r\n3. The [electrochemical series](https://chemrxiv.org/engage/chemrxiv/article-details/65ebdbce9138d231610ebf6d) method from Tim Mueller et al. See https://oxi.matr.io, they say a library [will be available](https://github.com/TRI-AMDD/oxidation-state-api-public) too but the link currently does not work (@montoyjh ?)",
"> Adding that there may be better ways of doing oxidation state assignment too, to minimize this risk.\r\n> \r\n> Notably, three examples:\r\n> \r\n> 1. The improvement offered by [`doped`](https://github.com/SMTG-Bham/doped) and @kavanase\r\n> 2. The [`BERTOS`](https://github.com/usccolumbia/BERTOS) model\r\n> 3. The [electrochemical series](https://chemrxiv.org/engage/chemrxiv/article-details/65ebdbce9138d231610ebf6d) method from Tim Mueller et al. See https://oxi.matr.io, they say a library [will be available](https://github.com/TRI-AMDD/oxidation-state-api-public) too but the link currently does not work (@montoyjh ?)\r\n\r\nYes, I think it would be great to improve this.",
"> Adding that there may be better ways of doing oxidation state assignment too, to minimize this risk.\r\n\r\nAn approach that I like, but have not seen applied to inorganic materials, is training an ML classifier based on the user-reported oxidation states in the Cambridge Structural Database (which now includes ICSD structures) as originally done by [Jablonka et al.](https://www.nature.com/articles/s41557-021-00717-y). As with all things metadata, it is by no means perfect, but it is pretty good (certainly better than BVS). Of course, this is more of a research project than a quick implementation. The model will also still be biased against properly handling very odd structures that may be generated by a diffusion model.",
"> > Adding that there may be better ways of doing oxidation state assignment too, to minimize this risk.\r\n> \r\n> An approach that I like, but have not seen applied to inorganic materials, is training an ML classifier based on the user-reported oxidation states in the Cambridge Structural Database (which now includes ICSD structures) as originally done by [Jablonka et al.](https://www.nature.com/articles/s41557-021-00717-y). As with all things metadata, it is by no means perfect, but it is pretty good (certainly better than BVS). Of course, this is more of a research project than a quick implementation. The model will also still be biased against properly handling very odd structures that may be generated by a diffusion model.\r\n\r\nYup. It would be a nice project. (There is a todo list 😅.) But the most critical point would be the dataset. ",
"@Andrew-S-Rosen are you sure this has not been done by some of what I linked above? It depends how broadly you interpret \"classifier\", but e.g. the BERTOS work is a transformer trained with annotated oxidation states from ICSD. I think I prefer Tim's method though, simply for its chemical interpretability.\r\n\r\nIf you mean structural-based assignment rather than composition-based I see your point. I'm not sure if the bond valence method in pymatgen is simply using an old dataset too, so perhaps performance can also be improved there.",
"I think we would certainly need a structure-based approach.",
"I'm biased by a world where composition is meaningless and the only thing that matters is structure. A MOF, after all, is basically all C, H, and O when your squint at it. 😉\n\nThat said, I wouldn't be surprised if it has been done. Thanks for the references too! ",
"Point very well taken! :)",
"> 3. The [electrochemical series](https://chemrxiv.org/engage/chemrxiv/article-details/65ebdbce9138d231610ebf6d) method from Tim Mueller et al. See https://oxi.matr.io, they say a library [will be available](https://github.com/TRI-AMDD/oxidation-state-api-public) too but the link currently does not work (@montoyjh ?)\r\n\r\nWill ask. Also @TimMueller-TRI-ctr may be able to answer.\r\n",
"Will merge this. I have added the new default, `require_bound`, as originally proposed. I have also added `require_exact` as a more conservative option that may be a more sensible default, but which I feel requires more due diligence before being made a default.\r\n\r\nI have some concerns that regardless of the exact value of the correction, if it is oxidation state dependent, there will always be edge cases where the correction leads to distorted and/or inaccurate convex hulls."
] | 2024-05-03T06:37:47
| 2024-06-09T02:58:48
|
2024-06-09T02:58:47Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Issue
This PR relates to the `MaterialsProject2020Compatibility` scheme, and cases in which structures might be heavily over-stabilized in error, leading to unrealistic structures potentially being placed on the convex hull.
In brief,
* Anion corrections are applied in cases where an element may not be an anion.
* This can happen either because (1) oxidation states are not known, and it is assumed to be an anion based on the element being the most electronegative element present or (2) `oxi_state_guesses` might give a very small fractional oxidation state in the range (-1, 0).
* Case (1) was decided as a conservative choice due to unreliability of oxidation state guessing.
* Case (2) I think was not considered, since this is not typically encountered in realistic materials.
During exploratory materials discovery, hypothetical structures might be generated that will encounter these cases. As an example, consider the composition CuI9, which results in the oxidation state guess of `{'Cu': 3.0, 'I': -0.33333}`. This becomes heavily over-stabilized by the correction scheme. This might lead to the hypothetical structure then being placed on the convex hull in error.
The experimental data used to fit the correction scheme did not consider any oxidation state in the domain (-1, 0), and so the corrections should be presumed invalid unless appropriately benchmarked. I want to acknowledge cases of anions which are > -1 such as suboxides, metal-rich pnictides, chacogenides, etc. do exist but as far as I can tell we did not have these in the experimental data used to fit the correction scheme.
## Suggested Resolution
This PR adds a `strict_anion` keyword argument which is set to **True** by default. This is a breaking change. This will skip applying the anion correction if oxidation state is supplied and the oxidation state is > -1, i.e. the element is not present as an anion that is included in the experimental data used for fitting, and might not be acting as an anion at all.
However, this does not resolve the case where oxidation states could not be determined. Therefore, I also suggest we might consider a more significant breaking change to only apply the anion corrections where oxidation state is supplied.
## Request for Comment
Notifying MP correction folks for option to comment: @awvio, @rkingsbury, @mattmcdermott, @computron, @shyamd
|
{
"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/3803/reactions",
"total_count": 4,
"+1": 4,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3803/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3803",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3803",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3803.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3803.patch",
"merged_at": "2024-06-09T02:58:47Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3804
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3804/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3804/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3804/events
|
https://github.com/materialsproject/pymatgen/pull/3804
| 2,277,888,883
|
PR_kwDOACgets5ufBm2
| 3,804
|
Add `is_radioactive` property to Element class
|
{
"login": "AntObi",
"id": 30937913,
"node_id": "MDQ6VXNlcjMwOTM3OTEz",
"avatar_url": "https://avatars.githubusercontent.com/u/30937913?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AntObi",
"html_url": "https://github.com/AntObi",
"followers_url": "https://api.github.com/users/AntObi/followers",
"following_url": "https://api.github.com/users/AntObi/following{/other_user}",
"gists_url": "https://api.github.com/users/AntObi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AntObi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AntObi/subscriptions",
"organizations_url": "https://api.github.com/users/AntObi/orgs",
"repos_url": "https://api.github.com/users/AntObi/repos",
"events_url": "https://api.github.com/users/AntObi/events{/privacy}",
"received_events_url": "https://api.github.com/users/AntObi/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"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThe recent updates to the `pymatgen` library enhance its chemical composition and periodic table functionalities by incorporating the concept of radioactivity. These changes introduce a new `radioactive` category to identify and categorize radioactive elements, improving the library's ability to handle different element types in materials science.\n\n## Changes\n\n| File Path | Change Summary |\n|--------------------------------|----------------------------------------------------------------------------------------------------------|\n| `.../core/composition.py` | Added \"radioactive\" to categories in `contains_element_type` method. |\n| `.../core/periodic_table.py` | Introduced `is_radioactive` property and added \"radioactive\" to `ElementType` enum. |\n| `tests/core/test_periodic_table.py` | New tests for `is_radioactive` attribute and updated `ElementType` enum length test from 17 to 18. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/core/composition.py: ## Short Summary\n\nThe change in functionality involves adding the \"radioactive\" category to the `contains_element_type` method in the `Composition` class in `pymatgen/core/composition.py`.\n\n## Alterations to the declarations of exported or public entities\n\n- `def contains_element_type(self, category: str) -> bool` in class `Composition` in `pymatgen/core/composition.py`\n - Before: `\"actinoid\", \"quadrupolar\", \"s-block\", \"p-block\", \"d-block\", \"f-block\"`\n - After: `\"actinoid\", \"radioactive\", \"quadrupolar\", \"s-block\", \"p-block\", \"d-block\", \"f-block\"`\n\n---\n\npymatgen/core/periodic_table.py: ## Short Summary\n\nThe `pymatgen/core/periodic_table.py` file introduces a new property `is_radioactive` to determine if an element is radioactive based on its atomic number. Additionally, the `ElementType` enum now includes a `radioactive` category for elements with certain atomic numbers.\n\n---\n\ntests/core/test_periodic_table.py: ## Short Summary\n\nThe change introduces new attributes `is_radioactive` for elements Technetium (Tc) and Polonium (Po) in the `test_attributes` function. Additionally, the test for the length of the `ElementType` enum has been updated from 17 to 18 in the `test_element_type` function.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe pull request (PR) number 3804 titled \"Add `is_radioactive` property to Element class\" aims to enhance the chemical materials library by introducing the `is_radioactive` property to the `Element` class. This addition enables users to identify radioactive elements within compositions more effectively. Motivated by findings in the GNoME database, the PR seeks to provide tools for screening and analyzing compositions containing radioactive elements. The key features include adding the `is_radioactive` property to the `Element` class for radioactive element identification and updating the `contains_element_type` method in the `Composition` class to include a \"radioactive\" category for composition analysis.\n\n### AI-generated Summary of Generated Summaries\n\nThe PR introduces changes in `pymatgen/core/composition.py` and `pymatgen/core/periodic_table.py`, along with updates to the test suite. In `pymatgen/core/composition.py`, the `contains_element_type` method now includes the \"radioactive\" category, enhancing composition analysis capabilities. In `pymatgen/core/periodic_table.py`, the `is_radioactive` property is added to the `Element` class for radioactive element identification, with an expanded `ElementType` enum to accommodate this new classification. The test suite in `tests/core/test_periodic_table.py` has been updated to test the `is_radioactive` property and validate the correct classification of elements like Technetium and Polonium.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**pymatgen/core/composition.py:**\n- **Before:** `def contains_element_type(self, category: str) -> bool` supported categories: `\"actinoid\", \"quadrupolar\", \"s-block\", \"p-block\", \"d-block\", \"f-block\"`\n- **After:** `def contains_element_type(self, category: str) -> bool` supported categories: `\"actinoid\", \"radioactive\", \"quadrupolar\", \"s-block\", \"p-block\", \"d-block\", \"f-block\"`\n\n**pymatgen/core/periodic_table.py:**\n- **Addition:** Introduction of a new property `is_radioactive` to the `Element` class to determine if an element is radioactive based on its atomic number and specific criteria.\n- **Addition:** Expansion of the `ElementType` enum to include a new category \"radioactive\" for elements classified based on the new criteria.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between fc66bdf34c128a76a2a4e7081187dc8fd312cf4f and c06a24c76ef42e37b0bf044b011e06316f091610.\n</details>\n\n\n<details>\n<summary>Files selected for processing (2)</summary>\n\n* pymatgen/core/periodic_table.py (2 hunks)\n* tests/core/test_periodic_table.py (3 hunks)\n\n</details>\n\n\n\n\n\n\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (2)</summary>\n\n* pymatgen/core/periodic_table.py\n* tests/core/test_periodic_table.py\n\n</details>\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- fc66bdf34c128a76a2a4e7081187dc8fd312cf4f -->\n<!-- c06a24c76ef42e37b0bf044b011e06316f091610 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"> thanks for adding this! 👍 \n> \n> > Agree upon which elements are considered radioactive. Currently, my PR has the following elements considered radioactive: Tc, Pm, and all elements with atomic number greater than 83 (Z>83) i.e. Po-Lr (Og).\n> \n> looks good to me. is this not widely agreed upon?\n\nI would say yes they are. "
] | 2024-05-03T15:10:51
| 2024-05-03T16:29:31
|
2024-05-03T16:29:31Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Major changes:
* This PR adds an `is_radioactive` property to the `Element` class which allows users to check if an Element is radioactive.
* The `contains_element_type` method in the `Composition` class has radioactive as a possible category added, so users can check if a composition contains radioactive elements.
Feature motivation:
Motivated by a recent publication (https://pubs.acs.org/doi/10.1021/acs.chemmater.4c00643) which identifies that some of the discovered compounds in the GNoME database (https://github.com/google-deepmind/materials_discovery) contain radioactive elements, it would be useful to be able to screen out compositions containing radioactive elements or to be able to characterise how many radioactive compositions exist in a dataset of compositions/structures.
## Todos
* Agree upon which elements are considered radioactive. Currently, my PR has the following elements considered radioactive: Tc, Pm, and all elements with atomic number greater than 83 (Z>83) i.e. Po-Lr (Og).
## Checklist
- [x] Google format doc strings added. Check with `ruff`.
- [x] Type annotations included. Check with `mypy`.
- [x] Tests added for new features/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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3804/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/3804/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3804",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3804",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3804.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3804.patch",
"merged_at": "2024-05-03T16:29:31Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3805
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3805/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3805/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3805/events
|
https://github.com/materialsproject/pymatgen/pull/3805
| 2,278,301,458
|
PR_kwDOACgets5ugaan
| 3,805
|
Doc string standardization
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
}
] |
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-05-03T19:31:38
| 2024-05-03T19:53:15
|
2024-05-03T19:53:14Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
e.g. imperative style and remove leading Get/Return verbs from `@property`
following #3802, #3792, #3790
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3805/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/3805/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3805",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3805",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3805.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3805.patch",
"merged_at": "2024-05-03T19:53:14Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3806
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3806/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3806/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3806/events
|
https://github.com/materialsproject/pymatgen/pull/3806
| 2,278,449,208
|
PR_kwDOACgets5ug6eS
| 3,806
|
mixing scheme: change default for verbose
|
{
"login": "tschaume",
"id": 1404564,
"node_id": "MDQ6VXNlcjE0MDQ1NjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1404564?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tschaume",
"html_url": "https://github.com/tschaume",
"followers_url": "https://api.github.com/users/tschaume/followers",
"following_url": "https://api.github.com/users/tschaume/following{/other_user}",
"gists_url": "https://api.github.com/users/tschaume/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tschaume/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tschaume/subscriptions",
"organizations_url": "https://api.github.com/users/tschaume/orgs",
"repos_url": "https://api.github.com/users/tschaume/repos",
"events_url": "https://api.github.com/users/tschaume/events{/privacy}",
"received_events_url": "https://api.github.com/users/tschaume/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
},
{
"id": 5680875673,
"node_id": "LA_kwDOACgets8AAAABUptImQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/mixing-schemes",
"name": "mixing-schemes",
"color": "44BAE9",
"default": false,
"description": "About mixing energies from different DFT functionals"
}
] |
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-05-03T21:27:59
| 2024-05-31T19:07:36
|
2024-05-03T23:29:50Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Reduce default verbosity for libraries dependent on pymatgen.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3806/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/3806/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3806",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3806",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3806.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3806.patch",
"merged_at": "2024-05-03T23:29:50Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3807
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3807/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3807/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3807/events
|
https://github.com/materialsproject/pymatgen/pull/3807
| 2,278,493,154
|
PR_kwDOACgets5uhELy
| 3,807
|
Bump tqdm from 4.66.2 to 4.66.3
|
{
"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": 5452530206,
"node_id": "LA_kwDOACgets8AAAABRP8CHg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/python",
"name": "python",
"color": "2b67c6",
"default": false,
"description": "Pull requests that update Python 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 |
[
"OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting `@dependabot ignore this major version` or `@dependabot ignore this minor version`.\n\nIf you change your mind, just re-open this PR and I'll resolve any conflicts on it."
] | 2024-05-03T22:07:47
| 2024-05-04T10:47:03
|
2024-05-04T10:47:01Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.2 to 4.66.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tqdm/tqdm/releases">tqdm's releases</a>.</em></p>
<blockquote>
<h2>tqdm v4.66.3 stable</h2>
<ul>
<li><code>cli</code>: <code>eval</code> safety (fixes CVE-2024-34062, GHSA-g7vv-2v7x-gj9p)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/tqdm/tqdm/commit/4e613f84ed2ae029559f539464df83fa91feb316"><code>4e613f8</code></a> Merge pull request from GHSA-g7vv-2v7x-gj9p</li>
<li><a href="https://github.com/tqdm/tqdm/commit/b53348c73080b4edeb30b4823d1fa0d8d2c06721"><code>b53348c</code></a> cli: eval safety</li>
<li>See full diff in <a href="https://github.com/tqdm/tqdm/compare/v4.66.2...v4.66.3">compare view</a></li>
</ul>
</details>
<br />
[](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": "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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3807/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/3807/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3807",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3807",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3807.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3807.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3808
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3808/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3808/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3808/events
|
https://github.com/materialsproject/pymatgen/pull/3808
| 2,278,940,489
|
PR_kwDOACgets5uih2C
| 3,808
|
`ruff` 0.4.3 auto-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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\n\nThis update involves a series of refinements across various Python files, focusing on simplifying and streamlining code. Key changes include updating logger initializations, refining method implementations for clarity and efficiency, and enhancing string operations. The modifications also include updates to version numbers in configuration files, demonstrating a maintenance effort to keep dependencies current.\n\n## Changes\n\n| File Path | Change Summary |\n|-----------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| `.pre-commit-config.yaml` | Updated versions for pre-commit hooks. |\n| `pymatgen/.../eos.py`, `pymatgen/io/abinit/inputs.py` | Changed logger initialization from `__file__` to `__name__`. |\n| `pymatgen/analysis/transition_state.py` | Simplified search sequence setup for OUTCAR files. |\n| `pymatgen/core/sites.py`, `pymatgen/io/aims/inputs.py` | Streamlined comparison methods in classes. |\n| `pymatgen/electronic_structure/plotter.py` | Simplified assignment of `None` using the `or` operator. |\n| `pymatgen/io/...` (multiple files) | Updated string handling, comparison logic, and method signatures. |\n| `pymatgen/util/testing/aims.py`, `tests/analysis/test_molecule_matcher.py` | Improved file reading operations. |\n\nThis table groups files with similar types of changes together to provide a concise overview of the updates made in this patch.\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n.pre-commit-config.yaml: ## Short Summary\nThe diff updates the versions of pre-commit hooks in the `.pre-commit-config.yaml` file, changing `ruff-pre-commit` to v0.4.3, `markdownlint-cli` to v0.40.0, and `pyright-python` to v1.1.361.\n\n## Alterations to the declarations of exported or public entities\n- `repo: https://github.com/astral-sh/ruff-pre-commit`\n - `rev: v0.4.2` → `rev: v0.4.3`\n\n- `repo: https://github.com/igorshubovych/markdownlint-cli`\n - `rev: v0.39.0` → `rev: v0.40.0`\n\n- `repo: https://github.com/RobertCraigie/pyright-python`\n - `rev: v1.1.360` → `rev: v1.1.361`\n\n---\n\npymatgen/analysis/eos.py: ## Short Summary\n\nIn the `pymatgen/analysis/eos.py` file, the change involves updating the logger initialization from using `__file__` to `__name__`.\n\n## Alterations to the declarations of exported or public entities\n\n- `logger = logging.getLogger(__file__)` in class `EOSBase` in `pymatgen/analysis/eos.py` → `logger = logging.getLogger(__name__)` in class `EOSBase` in `pymatgen/analysis/eos.py`\n\n---\n\npymatgen/analysis/transition_state.py: ## Short Summary\nThe change in functionality involves refactoring the setup of search sequences for OUTCAR files in terminal directories. The modification simplifies the code by using list comprehension and conditional assignment to populate `terminal_dirs`.\n\n## Alterations to the declarations of exported or public entities\n- `def from_dir(cls, root_dir, relaxation_dirs=None, **kwargs) -> Self` in class `TransitionState` in `pymatgen/analysis/transition_state.py`\n - Before: \n ```python\n terminal_dirs = []\n if relaxation_dirs is not None:\n terminal_dirs.append(relaxation_dirs)\n terminal_dirs.append((neb_dirs[0][1], neb_dirs[-1][1]))\n terminal_dirs.append([os.path.join(root_dir, d) for d in [\"start\", \"end\"]])\n terminal_dirs.append([os.path.join(root_dir, d) for d in [\"initial\", \"final\"]])\n ```\n - After:\n ```python\n terminal_dirs = [] if relaxation_dirs is None else [relaxation_dirs]\n terminal_dirs += [(neb_dirs[0][1], neb_dirs[-1][1])]\n terminal_dirs += [[os.path.join(root_dir, folder) for folder in [\"start\", \"end\"]]]\n terminal_dirs += [[os.path.join(root_dir, folder) for folder in [\"initial\", \"final\"]]]\n ```\n\n---\n\npymatgen/core/sites.py: ## Short Summary\nIn the `pymatgen/core/sites.py` file, the `__lt__` method was simplified by directly returning the result of comparing `self.species_string` with `other.species_string`, eliminating unnecessary conditional statements.\n\n## Alterations to the declarations of exported or public entities\n- `def __lt__(self, other)` in class `Site` in `pymatgen/core/sites.py`:\n - Before: \n ```python\n if self.species_string < other.species_string:\n return True\n return False\n ```\n - After:\n ```python\n return self.species_string < other.species_string\n ```\n\n---\n\npymatgen/electronic_structure/plotter.py: ## Summary\n\nIn the `plot_fermi_surface` function in `pymatgen/electronic_structure/plotter.py`, the change involves the assignment of `None` to the variable `fig` using the `or` operator instead of the previous assignment using `if-else`.\n\n## Alterations to the declarations of exported or public entities\n\n- `def plot_fermi_surface(...)` in `pymatgen/electronic_structure/plotter.py`\n - Change from: `fig = mlab_figure if mlab_figure else None`\n - Change to: `fig = mlab_figure or None`\n\n---\n\npymatgen/io/abinit/inputs.py: ## Short Summary\n\nIn the `pymatgen/io/abinit/inputs.py` file, the change involves updating the logger initialization from using `__file__` to `__name__`.\n\n## Alterations to the declarations of exported or public entities\n\n- `logger = logging.getLogger(__file__)` in `pymatgen/io/abinit/inputs.py` → `logger = logging.getLogger(__name__)` in `pymatgen/io/abinit/inputs.py`\n\n---\n\npymatgen/io/abinit/pseudos.py: ## Short Summary\n\nThe `to_str` method in the `Pseudo` class within `pymatgen/io/abinit/pseudos.py` has been modified to concatenate strings using the `+=` operator instead of individual `append` calls.\n\n## Alterations to the declarations of exported or public entities\n\n- `def to_str(self, verbose=0) -> str` in class `Pseudo` in `pymatgen/io/abinit/pseudos.py`:\n - Changed the way strings are concatenated within the method.\n\n---\n\npymatgen/io/aims/inputs.py: ## Short Summary\nIn the `pymatgen/io/aims/inputs.py` file, the `__eq__` method was modified to simplify the comparison logic for the `elf_type` attribute.\n\n## Alterations to the Declarations of Exported or Public Entities\n- `def __eq__(self, other: object) -> bool` in class `SomeClass` in `pymatgen/io/aims/inputs.py`:\n - Removed the explicit check for `elf_type` in the comparison logic.\n - Updated the return statement to directly compare `elf_type` attributes.\n\n---\n\npymatgen/io/ase.py: ## Short Summary\n\nThe change in functionality involves modifying the `as_dict` method in the `MSONAtoms` class in `pymatgen/io/ase.py` to use `self` instead of `atoms` for certain operations, affecting how information is handled and returned.\n\n## Alterations to the declarations of exported or public entities\n\n- `def as_dict(atoms: Atoms) -> dict[str, Any]` in class `MSONAtoms` in `pymatgen/io/ase.py` changed to `def as_dict(self: Atoms) -> dict[str, Any]`\n- `atoms_no_info = atoms.copy()` changed to `atoms_no_info = self.copy()`\n- `\"atoms_info\": jsanitize(atoms.info, strict=True)` changed to `\"atoms_info\": jsanitize(self.info, strict=True)`\n\n---\n\npymatgen/io/feff/inputs.py: ### Alterations to the declarations of exported or public entities\n\n- `def get_str(self, sort_keys: bool = False, pretty: bool = False) -> str` in class `SomeClass` in `pymatgen/io/feff/inputs.py`:\n - Modified the structure of `lines` by using `+=` to append multiple values instead of individual `append` calls for `self[key][\"ANGLES\"]`, `self[key][\"MESH\"]`, and `self[key][\"POSITION\"]`.\n\n---\n\npymatgen/io/lobster/inputs.py: ## Short Summary\n\nThe change in functionality involves refining the key normalization process in the `__contains__` method of a class in `pymatgen/io/lobster/inputs.py`. The logic for checking key existence has been simplified and improved to handle different key casings more effectively.\n\n## Alterations to the declarations of exported or public entities\n\n- `def __contains__(self, key) -> bool` in class `SomeClass` in `pymatgen/io/lobster/inputs.py`:\n - Before: \n ```python\n def __contains__(self, key) -> bool:\n Implements getitem from dict to avoid problems with cases.\n ```\n - After:\n ```python\n def __contains__(self, key) -> bool:\n Implements getitem from dict to avoid problems with different key casing.\n ```\n\n - Changes in logic:\n - Simplified the key existence check logic for improved handling of different key casings.\n\n---\n\npymatgen/io/pwmat/inputs.py: ## Short Summary\n- The `virial_tensor` variable in the `get_virial` method is now explicitly typed as a list of floats.\n- The `virial_tensor` list in `get_virial` is now extended using the `+=` operator instead of appending individual elements.\n- The loop in the `get_str` method now uses a different variable name (`idx`) instead of `ii` for iteration.\n- The loop in `get_str` for iterating over sites now uses `site_idx` instead of `ii` for clarity.\n\n---\n\npymatgen/io/xcrysden.py: ## Short Summary\n\nThe `to_str` method in `pymatgen/io/xcrysden.py` now uses `extend` to add multiple lines at once for \"CRYSTAL\", lattice vectors, and coordinates, streamlining the code structure.\n\n## Alterations to the declarations of exported or public entities\n\n- `to_str(self, atom_symbol: bool = True) -> str` in `pymatgen/io/xcrysden.py`:\n - Replaced individual `append` calls with `extend` to add multiple lines at once for \"CRYSTAL\", lattice vectors, and coordinates.\n\n---\n\npymatgen/util/testing/aims.py: ## Short Summary\nThe change in functionality involves modifying how lines are read from files in the `compare_files` function in `pymatgen/util/testing/aims.py`. The modification affects the filtering of lines based on length and comments.\n\n## Alterations to the declarations of exported or public entities\n- `def compare_files(test_name: str, work_dir: Path, ref_dir: Path) -> None` in `pymatgen/util/testing/aims.py`\n - Before: \n ```python\n test_lines = [line.strip() for line in test_file.readlines() if len(line.strip()) > 0 and line[0] != \"#\"]\n ```\n - After:\n ```python\n test_lines = [line.strip() for line in test_file if len(line.strip()) > 0 and line[0] != \"#\"]\n ```\n\n---\n\ntests/analysis/test_molecule_matcher.py: ## Short Summary\n\nIn the `test_group_molecules` function of `test_molecule_matcher.py`, the modification involves changing how `filename_list` is populated from reading lines in a file.\n\n## Alterations to the declarations of exported or public entities\n\n- `def test_group_molecules(self)` in class `TestMoleculeMatcher` in `tests/analysis/test_molecule_matcher.py`:\n - Modified line: `filename_list = [line.strip() for line in file.readlines()]` → `filename_list = [line.strip() for line in file]`\n\n---\n\npymatgen/util/provenance.py: ## Summary\n\nIn `pymatgen/util/provenance.py`, the `__eq__` method in the `StructureNL` class now includes a docstring `\"Check for equality between two StructureNL objects.\"`.\n\n---\n\npymatgen/vis/structure_vtk.py: ### Alterations to the declarations of exported or public entities\n\n- `from typing import TYPE_CHECKING` in `pymatgen/vis/structure_vtk.py` → `from typing import TYPE_CHECKING, ClassVar` in `pymatgen/vis/structure_vtk.py`\n- `DEFAULT_ANIMATED_MOVIE_OPTIONS = dict(` in class `MultiStructuresVis` in `pymatgen/vis/structure_vtk.py` → `DEFAULT_ANIMATED_MOVIE_OPTIONS: ClassVar = dict(` in class `MultiStructuresVis` in `pymatgen/vis/structure_vtk.py`\n\n---\n\ntests/analysis/test_interface_reactions.py: ## Short Summary\nThe change in functionality involves updating the import statement for `Figure` from `matplotlib.figure` to `matplotlib.Figure` in the `test_interface_reactions.py` file. This modification affects the assertions related to the figure instances created during testing.\n\n## Alterations to the declarations of exported or public entities\n- `from matplotlib.figure import Figure as mpl_figure` in `tests/analysis/test_interface_reactions.py` → `from matplotlib.figure import Figure as MplFigure` in `tests/analysis/test_interface_reactions.py`\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe pull request titled \"ruff 0.4.3 auto-fixes\" with number 3808 aims to streamline code and address minor logging issues. The changes involve simplifying code structures and enhancing logging practices across various files within the `pymatgen` library. The updates include dependency version adjustments in the `.pre-commit-config.yaml` file and optimizations in method implementations to improve code readability and maintainability.\n\n### AI-generated Summary of Generated Summaries\n\nThis pull request encompasses a series of enhancements and optimizations across multiple files, predominantly within the `pymatgen` library, to boost maintainability and performance. Key modifications include:\n\n1. **Dependency Updates in `.pre-commit-config.yaml`:** Version updates for pre-commit hooks like `ruff-pre-commit` to v0.4.3, `markdownlint-cli` to v0.40.0, and `pyright-python` to v1.1.361.\n\n2. **Logging Improvements:** Files such as `pymatgen/analysis/eos.py` and `pymatgen/io/abinit/inputs.py` refine logger initialization from `__file__` to `__name` for more informative logging outputs.\n\n3. **Code Simplification and Refactoring:**\n - Refactored search sequence setup in `pymatgen/analysis/transition_state.py` for OUTCAR files using list comprehension and conditional assignment.\n - Simplified comparison logic in the `__lt__` method of `pymatgen/core/sites.py` and assignment optimization in `pymatgen/electronic_structure/plotter.py`.\n\n4. **Method Signature and Logic Adjustments:**\n - Enhanced string concatenation methods in `pymatgen/io/abinit/pseudos.py` and `pymatgen/io/feff/inputs.py`.\n - Streamlined the `__eq__` method in `pymatgen/io/aims/inputs.py` for efficient attribute comparison.\n\n5. **Enhancements in File Handling and Data Processing:**\n - Improved file reading and processing in `pymatgen/util/testing/aims.py` and `tests/analysis/test_molecule_matcher.py` for better efficiency.\n\nThese changes collectively aim to refine the codebase, making it cleaner, more efficient, and easier to maintain.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n- **pymatgen/analysis/eos.py:**\n - `logger = logging.getLogger(__file__)` → `logger = logging.getLogger(__name__)`\n\n- **pymatgen/analysis/transition_state.py:**\n - Before:\n ```python\n terminal_dirs = []\n if relaxation_dirs is not None:\n terminal_dirs.append(relaxation_dirs)\n terminal_dirs.append((neb_dirs[0][1], neb_dirs[-1][1]))\n terminal_dirs.append([os.path.join(root_dir, d) for d in [\"start\", \"end\"]])\n terminal_dirs.append([os.path.join(root_dir, d) for d in [\"initial\", \"final\"]])\n ```\n - After:\n ```python\n terminal_dirs = [] if relaxation_dirs is None else [relaxation_dirs]\n terminal_dirs += [(neb_dirs[0][1], neb_dirs[-1][1])]\n terminal_dirs += [[os.path.join(root_dir, folder) for folder in [\"start\", \"end\"]]]\n terminal_dirs += [[os.path.join(root_dir, folder) for folder in [\"initial\", \"final\"]]]\n ```\n\n- **pymatgen/core/sites.py:**\n - `def __lt__(self, other)`:\n - Before: `if self.species_string < other.species_string: return True return False`\n - After: `return self.species_string < other.species_string`\n\n- **pymatgen/electronic_structure/plotter.py:**\n - `fig = mlab_figure if mlab_figure else None` → `fig = mlab_figure or None`\n\n- **pymatgen/io/abinit/inputs.py:**\n - `logger = logging.getLogger(__file__)` → `logger = logging.getLogger(__name__)`\n\n- **pymatgen/io/abinit/pseudos.py:**\n - `def to_str(self, verbose=0) -> str`: Changed the way strings are concatenated within the method.\n\n- **pymatgen/io/aims/inputs.py:**\n - `def __eq__(self, other: object) -> bool`: Simplified comparison logic for `elf_type`.\n\n- **pymatgen/io/ase.py:**\n - `def as_dict(atoms: Atoms) -> dict[str, Any]` changed to `def as_dict(self: Atoms) -> dict[str, Any]`\n\n- **pymatgen/io/lobster/inputs.py:**\n - `def __contains__(self, key) -> bool`: Simplified the key existence check logic for improved handling of different key casings.\n\nThese alterations enhance the clarity, efficiency, and maintainability of the codebase, reflecting a systematic effort to improve the software's overall quality and performance.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 8f011ff61b4010d048e43709061f60ea3e909e26 and d1040a7bff3d0aa828c37e28ea8657e9f1013ea9.\n</details>\n\n\n<details>\n<summary>Files selected for processing (3)</summary>\n\n* pymatgen/util/provenance.py (1 hunks)\n* pymatgen/vis/structure_vtk.py (2 hunks)\n* tests/analysis/test_interface_reactions.py (2 hunks)\n\n</details>\n\n\n\n\n\n<details>\n<summary>Files skipped from review due to trivial changes (1)</summary>\n\n* pymatgen/util/provenance.py\n\n</details>\n\n\n\n\n<details><summary>Additional comments not posted (2)</summary><blockquote>\n<details><summary>tests/analysis/test_interface_reactions.py (1)</summary><blockquote>\n\n`7-7`: The addition of `MplFigure` import is appropriate for the type checking in the `test_plot` method.\n\n</blockquote></details>\n<details><summary>pymatgen/vis/structure_vtk.py (1)</summary><blockquote>\n\n`883-883`: The addition of `DEFAULT_ANIMATED_MOVIE_OPTIONS` enhances the flexibility of the `MultiStructuresVis` class by allowing customizable animated movie settings.\n\n</blockquote></details></blockquote></details>\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 8f011ff61b4010d048e43709061f60ea3e909e26 -->\n<!-- d1040a7bff3d0aa828c37e28ea8657e9f1013ea9 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-05-04T11:08:53
| 2024-05-04T11:22:06
|
2024-05-04T11:22:05Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
simplified code plus some minor logging 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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3808/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/3808/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3808",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3808",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3808.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3808.patch",
"merged_at": "2024-05-04T11:22:05Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3809
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3809/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3809/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3809/events
|
https://github.com/materialsproject/pymatgen/issues/3809
| 2,279,698,122
|
I_kwDOACgets6H4W7K
| 3,809
|
Error in CP2K output parser structure parsing
|
{
"login": "stevenkbennett",
"id": 25821470,
"node_id": "MDQ6VXNlcjI1ODIxNDcw",
"avatar_url": "https://avatars.githubusercontent.com/u/25821470?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stevenkbennett",
"html_url": "https://github.com/stevenkbennett",
"followers_url": "https://api.github.com/users/stevenkbennett/followers",
"following_url": "https://api.github.com/users/stevenkbennett/following{/other_user}",
"gists_url": "https://api.github.com/users/stevenkbennett/gists{/gist_id}",
"starred_url": "https://api.github.com/users/stevenkbennett/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stevenkbennett/subscriptions",
"organizations_url": "https://api.github.com/users/stevenkbennett/orgs",
"repos_url": "https://api.github.com/users/stevenkbennett/repos",
"events_url": "https://api.github.com/users/stevenkbennett/events{/privacy}",
"received_events_url": "https://api.github.com/users/stevenkbennett/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-05-05T19:43:32
| 2024-05-06T15:46:06
|
2024-05-06T15:46:06Z
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.12
### Pymatgen version
2024.5.1
### Operating system version
Ubuntu 20
### Current behavior
Parsing CP2K output files gets stuck in an infinite loop during the function `parse_initial_structure` on line 319 in `pymatgen/io/cp2k/outputs.py`. I believe this is due to the string on line 334 not matching with the string in the CP2K output, which instead reads `Atom Kind Element X Y Z Z(eff) Mass`, with only a single space between `Atom` and `Kind`.
This is resulting in the while loop never escaping.
CP2K version is 2023.2.
### Expected Behavior
Correct string matched and structure parsed.
### Minimal example
```Python
from pymatgen.io.cp2k.outputs import Cp2kOutput
output = Cp2kOutput("test.out")
output.parse_initial_structure()
```
### Relevant files to reproduce this bug
[output.zip](https://github.com/materialsproject/pymatgen/files/15214250/output.zip)
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3809/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/3809/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3810
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3810/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3810/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3810/events
|
https://github.com/materialsproject/pymatgen/pull/3810
| 2,281,168,884
|
PR_kwDOACgets5upv5n
| 3,810
|
`Cp2kOutput.parse_initial_structure()` use regex for line matching to allow arbitrary white space between Atom/Kind/Element/...
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 6809609890,
"node_id": "LA_kwDOACgets8AAAABleJmog",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/cp2k",
"name": "cp2k",
"color": "FA6833",
"default": false,
"description": "CP2K quantum chemistry package"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe recent updates to the `pymatgen/io/cp2k/outputs.py` focus on refining the parsing process of initial structures from CP2K output files. This includes better regex pattern management, clearer variable naming, and enhanced data handling, aimed at improving the reliability and readability of the code.\n\n## Changes\n\n| File Path | Change Summary |\n|----------------------------|--------------------------------------------------------------------------------|\n| `.../cp2k/outputs.py` | Refactored parsing logic for initial structures, updated variable names, improved regex and data handling. |\n\n## Assessment against linked issues\n\n| Objective | Addressed | Explanation |\n|------------------------------------|-----------|-----------------------------------------------------------------------------------------------------|\n| Correct string matching and parsing in CP2K output parser [#3809] | ✅ | The refactoring includes improvements in regex patterns, which likely address the matching issue. |\n| Prevent infinite loop in `parse_initial_structure` [#3809] | ✅ | The changes in variable and loop handling should prevent the previously encountered infinite loops. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/io/cp2k/outputs.py: ## Short Summary\n\nThe changes in `pymatgen/io/cp2k/outputs.py` involve refactoring the parsing logic for initial structures from a CP2K output file. The modifications include consolidating regex patterns, updating variable names, and improving data handling within loops.\n\n## Alterations to the Declarations of Exported or Public Entities\n\n- `patterns` dictionary in `parse_initial_structure` method:\n - Before: `pattern = re.compile(r\"- Atoms:\\s+(\\d+)\")`\n - After: `patterns = {\"num_atoms\": re.compile(r\"- Atoms:\\s+(\\d+)\")}`\n\n- `ghost_atoms` dictionary in `parse_initial_structure` method:\n - Before: `gs = {}`\n - After: `ghost_atoms = {}`\n\n- Loop variables in `parse_initial_structure` method:\n - Before: `for v in self.data[\"atomic_kind_info\"].values():`\n - After: `for val in self.data[\"atomic_kind_info\"].values():`\n\n- Loop variables in `parse_initial_structure` method:\n - Before: `for c in coord_table:`\n - After: `for coord in coord_table:`\n\n- `site_properties` assignment in `parse_initial_structure` method:\n - Before: `site_properties={\"ghost\": [gs.get(int(i[1])) for i in coord_table]},`\n - After: `site_properties={\"ghost\": [ghost_atoms.get(int(i[1])) for i in coord_table]},`\n\n- `Molecule` and `Structure` initialization in `parse_initial_structure` method:\n - Before: `species=[i[2] for i in coord_table],`\n - After: `species=[coord[2] for coord in coord_table],`\n\n- `Molecule` and `Structure` initialization in `parse_initial_structure` method:\n - Before: `coords=[[float(i[4]), float(i[5]), float(i[6])] for i in coord_table],`\n - After: `coords=[[float(i[4]), float(i[5]), float(i[6])] for i in coord_table],`\n\n- `Molecule` and `Structure` initialization in `parse_initial_structure` method:\n - Before: `site_properties={\"ghost\": [gs.get(int(i[1])) for i in coord_table]},`\n - After: `site_properties={\"ghost\": [ghost_atoms.get(int(i[1])) for i in coord_table]},`\n\n##\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe pull request (PR) titled \"Cp2kOutput.parse_initial_structure() use regex for line matching to allow arbitrary white space between Atom/Kind/Element/...\" aims to address an issue identified in issue #3809. The problem involves the `parse_initial_structure` function in the `pymatgen/io/cp2k/outputs.py` file, which enters an infinite loop when parsing CP2K output files. This malfunction is traced back to a mismatch in expected and actual strings in the output file, specifically the spacing between the words \"Atom\" and \"Kind\". The current parser expects a different format, leading to a failure in exiting the loop.\n\nThe PR proposes a solution by refactoring the parsing logic to use regular expressions (regex) that can handle arbitrary whitespace in the CP2K output files. This change is intended to make the parser more robust and flexible, accommodating variations in the formatting of CP2K output files. The PR includes modifications to regex patterns, variable names, and data handling within loops to enhance readability and maintainability of the code.\n\n### AI-Generated Summary of Generated Summaries\n\nThe modifications in `pymatgen/io/cp2k/outputs.py` primarily focus on enhancing the parsing mechanism of initial structures from CP2K output files through several key changes:\n\n1. **Regex Patterns**: The implementation shifts from a fixed string matching to a more flexible regex-based matching system. This is evident from the change in the `patterns` dictionary where the regex for counting atoms is defined. This adjustment allows the parser to handle varying amounts of whitespace in the output files, addressing the core issue that led to the infinite loop.\n\n2. **Variable Renaming**: Several variables have been renamed to improve clarity and consistency. For example, `gs` has been changed to `ghost_atoms`, and loop variables like `v` and `c` have been renamed to `val` and `coord`, respectively. These changes make the code easier to understand and maintain.\n\n3. **Data Handling in Loops**: The handling of data structures and loops has been refined. For instance, the construction of `site_properties` and the initialization of `Molecule` and `Structure` objects have been updated to use the new variable names and structures. This not only aligns with the new parsing logic but also ensures that the data flow within the function is more streamlined and less prone to errors.\n\n4. **Enhanced Flexibility and Robustness**: By employing regex for data parsing and refining the data handling logic, the updated code is better equipped to handle variations in input formats. This makes the parser more robust against format changes in CP2K output files, potentially reducing future issues related to file parsing.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n- **`patterns` Dictionary**:\n - **Before**: `pattern = re.compile(r\"- Atoms:\\s+(\\d+)\")`\n - **After**: `patterns = {\"num_atoms\": re.compile(r\"- Atoms:\\s+(\\d+)\")}`\n\n- **`ghost_atoms` Dictionary**:\n - **Before**: `gs = {}`\n - **After**: `ghost_atoms = {}`\n\n- **Loop Variables**:\n - **Before**: `for v in self.data[\"atomic_kind_info\"].values():`\n - **After**: `for val in self.data[\"atomic_kind_info\"].values():`\n - **Before**: `for c in coord_table:`\n - **After**: `for coord in coord_table:`\n\n- **`site_properties` Assignment**:\n - **Before**: `site_properties={\"ghost\": [gs.get(int(i[1])) for i in coord_table]},`\n - **After**: `site_properties={\"ghost\": [ghost_atoms.get(int(i[1])) for i in coord_table]},`\n\n- **`Molecule` and `Structure` Initialization**:\n - **Before**: `species=[i[2] for i in coord_table], coords=[[float(i[4]), float(i[5]), float(i[6])] for i in coord_table], site_properties={\"ghost\": [gs.get(int(i[1])) for i in coord_table]},`\n - **After**: `species=[coord[2] for coord in coord_table], coords=[[float(coord[4]), float(coord[5]), float(coord[6])] for coord in coord_table], site_properties={\"ghost\": [ghost_atoms.get(int(coord[1])) for coord in coord_table]},`\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between a16ac3926c61b2e12b14b2bceb475da70cc0d755 and 945dc77e03fb9c09f11e31b2a0293c71c54cd911.\n</details>\n<details>\n<summary>Files ignored due to path filters (1)</summary>\n\n* `tests/files/io/cp2k/cp2k.out` is excluded by `!**/*.out`\n\n</details>\n\n<details>\n<summary>Files selected for processing (1)</summary>\n\n* pymatgen/io/cp2k/outputs.py (3 hunks)\n\n</details>\n\n\n\n\n\n\n\n\n\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- 945dc77e03fb9c09f11e31b2a0293c71c54cd911 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->"
] | 2024-05-06T15:34:54
| 2024-05-06T15:46:06
|
2024-05-06T15:46:05Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
closes #3809
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3810/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/3810/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3810",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3810",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3810.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3810.patch",
"merged_at": "2024-05-06T15:46:05Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3811
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3811/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3811/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3811/events
|
https://github.com/materialsproject/pymatgen/pull/3811
| 2,281,976,533
|
PR_kwDOACgets5use5T
| 3,811
|
Copy `matgenb` repo into new `pymatgen` `examples/` folder
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- This is an auto-generated comment: review paused by coderabbit.ai -->\n\n> [!NOTE]\n> ## Reviews Paused\n> \n> Use the following commands to manage reviews:\n> - `@coderabbitai resume` to resume automatic reviews.\n> - `@coderabbitai review` to trigger a single review.\n\n<!-- end of auto-generated comment: review paused by coderabbit.ai --><!-- walkthrough_start -->\n\n## Walkthrough\n\nThis batch of updates introduces a variety of new functionalities and enhancements across several Jupyter notebooks and data files within the pymatgen library. Key additions include tools for calculating reaction energies, retrieving crystal structures, managing units, predicting structures, and identifying coordination environments. The updates also extend to several configuration and data files, improving the library's integration with computational tools and databases.\n\n## Changes\n\n| File(s) | Change Summary |\n|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `examples/2013-01-01-Basic functionality.ipynb`<br>`examples/2013-01-01-Units.ipynb` | Introduced core pymatgen functionalities, unit management, and related I/O operations. |\n| `examples/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb` | Demonstrated calculation of reaction energies using pymatgen and the Materials API. |\n| `examples/2013-01-01-Getting crystal structures from online sources.ipynb` | Added functionality to retrieve crystal structures from online databases. |\n| `examples/2013-01-01-Molecule.ipynb`<br>`examples/2013-01-01-Ordering Disordered Structures.ipynb` | Focused on molecule manipulation and ordering disordered structures using pymatgen. |\n| `examples/2016-09-08-Data-driven First Principles Methods... Part 1 - Structure Generation.ipynb`<br>`examples/2017-05-11-Running Jupyter Notebook on clusters.ipynb`<br>`examples/2018-09-25-Structure Prediction using Pymatgen and the Materials API.ipynb` | Enhanced structure prediction capabilities and provided guidelines for running Jupyter notebooks on clusters. |\n| `examples/2018-01-01-ChemEnv - How to automatically identify coordination environments in a structure.ipynb` | Introduced tools for identifying coordination environments in structures. |\n| `examples/2018-11-6-Dopant suggestions using Pymatgen.ipynb`<br>`examples/2021-5-12-Explanation of Corrections.ipynb` | Enhanced dopant prediction and explained energy corrections in computed entries. |\n| `examples/2020-07-15-How to plot a Fermi surface.ipynb` | Provided a guide on plotting Fermi surfaces using BoltzTraP and BoltzTraP 2. |\n| `examples/2022-07-23 Interactive Crystal Toolkit Structure Viewer.ipynb` | Showcased an interactive structure viewer for predicting refractive indices. |\n| `pyproject.toml`<br>`examples/.../CsCl.cif`<br>`examples/.../INCAR.lobster`<br>`examples/.../LICENSE`<br>`examples/.../POSCAR`<br>`examples/.../README.md`<br>`examples/.../EntryWithCollCode418490.cif`<br>`examples/.../lpo_entries.json`<br>`examples/.../vasprun.xml`<br>`examples/.../lobster_data/...` | Updated various configuration and data files, including crystallographic data, simulation parameters, and licensing information. |\n\nThis summary provides a concise overview of significant changes, focusing on new functionalities and enhancements in the pymatgen library and associated examples.\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\nexamples/2013-01-01-Basic functionality.ipynb: ## Summary\n\nThe new file `2013-01-01-Basic functionality.ipynb` demonstrates the core functionality of `pymatgen`, showcasing core objects like Elements, Species, Lattices, and Structures. It covers basic operations, unit handling, compositions, lattice creation, structure manipulation, analyses, and I/O operations.\n\n## Alterations to the declarations of exported or public entities\n\n- Added functionality for creating Elements, Species, and Compositions in `pymatgen.core`.\n- Added functionality for creating Lattices and Structures in `pymatgen.core`.\n- Introduced analyses functions for Structures in `pymatgen.symmetry.analyzer`.\n- Added a structure matching tool in `pymatgen.analysis.structure_matcher`.\n- Provided I/O support for various file formats in `pymatgen.io`.\n\n---\n\nexamples/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb: ### Summary\n\nThe file `2013-01-01-Calculating Reaction Energies with the Materials API.ipynb` showcases the process of calculating reaction energies using the Materials API and pymatgen. It provides code examples for determining reaction energies and comparing them against experimental data.\n\n---\n\nexamples/2013-01-01-Getting crystal structures from online sources.ipynb: ## Summary\n\nThe file `2013-01-01-Getting crystal structures from online sources.ipynb` introduces functionality to retrieve crystal structures from online sources using Pymatgen. It demonstrates querying crystal structures from the Materials Project and the Crystallographic Open Database (COD) using Pymatgen's interfaces.\n\n## Alterations to the declarations of exported or public entities\n\n- Added a cell with markdown content introducing the purpose of the notebook.\n- Added a cell with code to install dependencies for Google Colab.\n- Added a cell with markdown content explaining the usage of Materials Project interface in Pymatgen.\n- Added a cell with code to interact with the Materials Project API using MPRester.\n- Added a cell with code to query crystal structures by formula from the Materials Project.\n- Added a cell with code to query crystal structures by chemical system from the Materials Project.\n- Added a cell with markdown content explaining the usage of COD interface in Pymatgen.\n- Added a cell with code to interact with the Crystallographic Open Database (COD).\n- Added a cell with code to retrieve a crystal structure by its ID from COD.\n- Added a cell with code to retrieve crystal structures by formula from COD.\n- Added a cell with code to print out a specific crystal structure from the retrieved structures.\n\n---\n\nexamples/2013-01-01-Molecule.ipynb: ## Summary\n\nThe file `2013-01-01-Molecule.ipynb` showcases pymatgen's capabilities in creating and manipulating molecules, along with its integration with OpenBabel. It includes demonstrations on creating molecules, breaking bonds, detecting bonds, generating boxed structures, interfacing with OpenBabel, input/output operations, and more.\n\n---\n\nexamples/2013-01-01-Ordering Disordered Structures.ipynb: ## Summary\n\nThe file `2013-01-01-Ordering Disordered Structures.ipynb` demonstrates how to perform ordering of a disordered structure using `pymatgen`. It showcases two methods: `OrderDisorderedStructureTransformation` and `EnumerateStructureTransformation` for ordering/enumeration of structures.\n\n## Alterations to the declarations of exported or public entities\n\n- `OrderDisorderedStructureTransformation` in `pymatgen.transformations.standard_transformations`:\n - Added a method `apply_transformation(cuau, return_ranked_list=100)`.\n\n- `EnumerateStructureTransformation` in `pymatgen.transformations.advanced_transformations`:\n - Added a method `apply_transformation(cuau, return_ranked_list=1000)`.\n\n- `StructureMatcher` in `pymatgen.analysis.structure_matcher`:\n - Added a method `group_structures([d[\"structure\"] for d in ss])`.\n\n---\n\nexamples/2013-01-01-Units.ipynb: ## Summary\n\nThe file `2013-01-01-Units.ipynb` introduces the functionality of managing units in `pymatgen` starting from version 2.8.0. It demonstrates how to attach units to quantities, perform conversions, and handle unit combinations using subclasses of float and numpy arrays.\n\n## Alterations to the declarations of exported or public entities\n\n- `def Energy(x, unit)` in `pymatgen.core` → `def Energy(x, unit)` in `pymatgen.core`\n- `def Length(x, unit)` in `pymatgen.core` → `def Length(x, unit)` in `pymatgen.core`\n- `def Time(x, unit)` in `pymatgen.core` → `def Time(x, unit)` in `pymatgen.core`\n- `def Mass(x, unit)` in `pymatgen.core` → `def Mass(x, unit)` in `pymatgen.core`\n- `def FloatWithUnit(x, unit)` in `pymatgen.core` → `def FloatWithUnit(x, unit)` in `pymatgen.core`\n- `def UnitError` in `pymatgen.units` → `def UnitError` in `pymatgen.units`\n- `def LengthArray(arr, unit)` in `pymatgen.units` → `def LengthArray(arr, unit)` in `pymatgen.units`\n- `def TimeArray(arr, unit)` in `pymatgen.units` → `def TimeArray(arr, unit)` in `pymatgen.units`\n- `def EnergyArray(arr, unit)` in `pymatgen.units` → `def EnergyArray(arr, unit)` in `pymatgen.units`\n- `def ArrayWithUnit(arr, unit)` in `pymatgen.units` → `def ArrayWithUnit(arr, unit)` in `pymatgen.units`\n\n---\n\nexamples/2016-09-08-Data-driven First Principles Methods for the Study and Design of Alkali Superionic Conductors Part 1 - Structure Generation.ipynb: ## Summary\n\nThe file `2016-09-08-Data-driven First Principles Methods for the Study and Design of Alkali Superionic Conductors Part 1 - Structure Generation.ipynb` showcases structure enumeration using Python Materials Genomics (pymatgen). It includes importing necessary modules, adjusting structure compositions, obtaining primitive cells, enumerating structures, and generating VASP input files.\n\n---\n\nexamples/2017-05-11-Running Jupyter Notebook on clusters.ipynb: ## Summary\nThe new file provides detailed instructions on running Jupyter notebooks on different high-performance computing clusters like TSCC, Comet, and Cori. It includes scripts for setting up tunnels, launching notebooks, and accessing them via web browsers.\n\n---\n\nexamples/2018-01-01-ChemEnv - How to automatically identify coordination environments in a structure.ipynb: ## Summary\n\nThe file `2018-01-01-ChemEnv - How to automatically identify coordination environments in a structure.ipynb` is a tutorial on using ChemEnv, a tool for automatically identifying coordination environments in chemical structures. It covers analyzing coordination environments, calculating continuous symmetry measures (CSMs), and using different strategies to refine results.\n\n## Alterations to the declarations of exported or public entities\n\n- Added `SimplestChemenvStrategy` class in `pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies`\n- Added `LocalGeometryFinder` class in `pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder`\n- Added `LightStructureEnvironments` class in `pymatgen.analysis.chemenv.coordination_environments.structure_environments`\n- Added `MPRester` class in `pymatgen.ext.matproj`\n\n---\n\nexamples/2018-09-25-Structure Prediction using Pymatgen and the Materials API.ipynb: ## Summary\n\nThe file `2018-09-25-Structure Prediction using Pymatgen and the Materials API.ipynb` showcases how to predict structures using `pymatgen`'s `structure_prediction` package. It involves gathering potential structures via the Materials API, predicting specie substitutions, filtering duplicates, and outputting newly predicted structures.\n\n## Alterations to the declarations of exported or public entities\n\n- Added `SubstitutionPredictor` class in `pymatgen.analysis.structure_prediction.substitution_probability`\n- Added `Substitutor` class in `pymatgen.analysis.structure_prediction.substitutor`\n- Added `Specie` class in `pymatgen.core.periodic_table`\n- Added `MPRester` class in `pymatgen.ext.matproj`\n- Added `AutoOxiStateDecorationTransformation` class in `pymatgen.transformations.standard_transformations`\n\n---\n\nexamples/2018-11-6-Dopant suggestions using Pymatgen.ipynb: ## Summary\n\nThe file `2018-11-6-Dopant suggestions using Pymatgen.ipynb` demonstrates how to predict likely n- and p-type dopant atoms using Pymatgen. It showcases two methods for choosing dopants based on Shannon radii comparison and substitution probabilities, utilizing the Materials API to download the structure of interest.\n\n## Alterations to the declarations of exported or public entities\n\n- Added `get_dopants_from_shannon_radii` and `get_dopants_from_substitution_probabilities` functions in `pymatgen.analysis.structure_prediction.dopant_predictor`\n- Added `MPRester` class in `pymatgen.ext.matproj`\n- Added `CrystalNN` class in `pymatgen.analysis.local_env`\n\n---\n\nexamples/2020-07-15-How to plot a Fermi surface.ipynb: ## Summary:\nThe file `2020-07-15-How to plot a Fermi surface.ipynb` provides a detailed guide on how to plot Fermi surfaces using BoltzTraP and BoltzTraP 2 in Python. It includes examples for materials like PbTe and AlAs, demonstrating how to visualize Fermi surfaces for different band structures.\n\n## Alterations to the declarations of exported or public entities:\n- Added `from pymatgen.electronic_structure.boltztrap2 import BztInterpolator, VasprunBSLoader`\n- Added `from BoltzTraP2 import fermisurface`\n- Modified `data = VasprunBSLoader(vrun)` to include `VasprunBSLoader(vrun)`\n- Modified `bztI = BztInterpolator(data, lpfac=10)` to include `BztInterpolator(data, lpfac=10)`\n- Modified `fermisurface.plot_fermisurface(data, bztI.equivalences, bztI.eband[2:3, :], mu=-0.003)` to include `fermisurface.plot_fermisurface(data, bztI.equivalences, bztI.eband[2:3, :], mu=-0.003)`\n\n---\n\nexamples/2021-5-12-Explanation of Corrections.ipynb: ## Summary\n\nThe file `2021-5-12-Explanation of Corrections.ipynb` demonstrates how to apply and understand energy corrections in the Materials Project database. It covers default corrections for `ComputedEntry` objects and switching between `MaterialsProject2020Compatibility` and legacy `MaterialsProjectCompatibility` schemes.\n\n## Alterations to the declarations of exported or public entities\n\n- Added `MaterialsProject2020Compatibility` and `MaterialsProjectCompatibility` classes in `pymatgen.entries.compatibility`.\n- Added `MPRester` class in `pymatgen.ext.matproj`.\n\n---\n\nexamples/2022-07-23 Interactive Crystal Toolkit Structure Viewer.ipynb: ### Summary\n\nThe file `2022-07-23 Interactive Crystal Toolkit Structure Viewer.ipynb` presents a Jupyter notebook demonstrating the `matbench_dielectric` dataset for predicting refractive index from material structures using interactive visualization with `crystal-toolkit` and `dash`.\n\n### Alterations to the declarations of exported or public entities\n\n- Added import statements for various modules and components.\n- Defined global variables `__author__`, `__date__`, and `__email__`.\n- Created a callback function `update_structure` for updating the displayed structure based on user interactions.\n\n---\n\npyproject.toml: ## Summary\n\nAdded `extend-include = [\"*.ipynb\"]` to the `pyproject.toml` file, allowing the inclusion of `*.ipynb` files for linting.\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives (User Provided Facts)\n\nThe pull request aims to integrate the `matgenb` repository, which contains a collection of Jupyter notebook examples, into the `pymatgen` repository under a new `examples/` folder. This move is motivated by the current state of the `pymatgen` documentation, which primarily consists of class/method and function doc strings. These are helpful for users who already have a clear idea of what they want to do but can be challenging for beginners who are unfamiliar with the library's capabilities.\n\nThe integration of `matgenb` into `pymatgen` is expected to make these practical examples more visible and accessible to a broader audience, thereby lowering the entry barrier to using `pymatgen`. It also allows for the application of higher code quality standards to these examples and potentially integrates them into Continuous Integration (CI) processes to ensure they remain functional over time.\n\nA decision is pending on whether to keep the examples in Jupyter notebook format or convert them to simple Python scripts with Visual Studio Code style `# %%` cell delimiters. This conversion would facilitate running the scripts in CI environments but would lose the ability to save cell outputs, which could be a significant disadvantage.\n\nCollaborators mentioned in the PR include @DanielYang59, @JaGeo, and @mkhorton, indicating a team effort in executing this integration.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request introduces a series of Jupyter notebooks into the `pymatgen` repository, each covering different functionalities and applications of the library:\n\n1. **Basic Functionality**: Demonstrates core objects and operations in `pymatgen` such as Elements, Species, Lattices, Structures, and their manipulations, including I/O operations.\n\n2. **Calculating Reaction Energies**: Utilizes the Materials API to calculate and compare reaction energies with experimental values.\n\n3. **Retrieving Crystal Structures**: Shows how to fetch crystal structures from online sources like the Materials Project and the Crystallographic Open Database using `pymatgen` interfaces.\n\n4. **Molecule Manipulation**: Focuses on creating and manipulating molecules, interfacing with OpenBabel, and related I/O operations.\n\n5. **Ordering Disordered Structures**: Introduces methods for ordering disordered structures using specific transformations in `pymatgen`.\n\n6. **Units Management**: Explains managing units in `pymatgen`, demonstrating conversions and handling of unit combinations.\n\n7. **Structure Generation and Prediction**: Covers structure enumeration and prediction using `pymatgen`, including generating input files for VASP and predicting structures using the Materials API.\n\n8. **Running Jupyter Notebooks on Clusters**: Provides instructions for setting up and running Jupyter notebooks on various high-performance computing clusters.\n\n9. **ChemEnv**: Tutorial on identifying coordination environments in structures using ChemEnv tools within `pymatgen`.\n\n10. **Dopant Suggestions**: Demonstrates predicting likely dopants using Shannon radii comparison and substitution probabilities.\n\n11. **Plotting Fermi Surfaces**: Guides on visualizing Fermi surfaces using BoltzTraP and BoltzTraP2 for materials like PbTe and AlAs.\n\n12. **Energy Corrections**: Discusses applying and understanding energy corrections in the Materials Project database, detailing correction schemes.\n\n13. **Interactive Crystal Toolkit**: Introduces an interactive structure viewer using `crystal-toolkit` and `dash` for visualizing material structures.\n\nAdditionally, various data files and configurations related to simulations, crystallographic data, and population analysis are added or updated across the repository.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n- **Basic Functionality**: Added methods for creating and analyzing Elements, Species, Compositions, Lattices, and Structures.\n- **Ordering Disordered Structures**: Added methods in `OrderDisorderedStructureTransformation` and `EnumerateStructureTransformation` for applying transformations.\n- **Units Management**: Updated methods in `pymatgen.core` and `pymatgen.units` for handling different units and arrays with units.\n- **ChemEnv**: Added classes `SimplestChemenvStrategy`, `LocalGeometryFinder`, and `LightStructureEnvironments` for coordination environment analysis.\n- **Structure Prediction**: Introduced `SubstitutionPredictor`, `Substitutor`, and `AutoOxiStateDecorationTransformation` for structure prediction tasks.\n- **Dopant Suggestions**: Added methods for dopant prediction in `pymatgen.analysis.structure_prediction.dopant_predictor`.\n- **Plotting Fermi Surfaces**: Added and modified methods in `pymatgen.electronic_structure.boltztrap2` and `BoltzTraP2` for Fermi surface plotting.\n- **Energy Corrections**: Added `MaterialsProject2020Compatibility` and `MaterialsProjectCompatibility` classes for handling energy corrections.\n- **Interactive Crystal Toolkit**: Defined global variables and callback functions for interactive structure visualization.\n\nThese changes enhance the functionality and usability of `pymatgen`, making it more accessible and robust for materials science research and applications.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai --><!-- commit_ids_reviewed_start -->\n\n<!-- 761bae94c25bf0eba8b56a33b0f2962f52bad1eb -->\n<!-- df433dbb0615722dd0a75b4f2d8a9f4ed47e2555 -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@coderabbitai ignore",
"<!-- This is an auto-generated reply by CodeRabbit -->\n@coderabbitai ignore\n\n<details>\n<summary>Actions Performed</summary>\n\nReviews paused.\n\n</details>",
"@janosh I think it is a great idea to bring this back to main pymatgen. \r\nThere might be several failing examples now with all the recent code changes. I also never updated the second LOBSTER notebook and wrote a completely new one.",
"> I also never updated the second LOBSTER notebook and wrote a completely new one.\r\n\r\ncool, feel free to push the new lobster notebook to this PR and delete the old one",
"@janosh. Can we set CodeRabbit to review only when we explicitly call it ([On-Demand Reviews](https://coderabbit.ai/changelog))? It's badly polluting conversations. What do you think?\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/a9da16e86f072febe3f25efe73a38f9ac611acd1/.coderabbit.yaml#L10-L11",
"@janosh currently, the folders are not correctly linked. Some Notebooks require files.",
"> Can we set CodeRabbit to review only when we explicitly call it ([On-Demand Reviews](https://coderabbit.ai/changelog))?\r\n\r\ni suggested that to @shyuep a couple weeks ago but he was not in favor. i think it would require some community discussion",
"Concur, I think this is a great idea! I’m not sure the genesis of matgenb, but I know that many people do not know it exists. I’ve been asked many times for example notebooks from people, and having some example notebooks directly in the pymatgen repo would definitely help with discoverability.",
"The reason is because matgenb is not just about pymatgen. There are examples for pymatgen as well as non-pymatgen packages. Instead of unilaterally doing such stuff, I suggest you first *ask* and then do. It is a simple question or Issue. All this is leading to wasted effort. If you feel discoverability is an issue, by all means add a link to matgenb from pymatgen/examples. Also, matgenb is already mentioned multiple times in the docs. I can't help if people don't read the docs. ",
"I would like to clarify our intention, as proposed to @janosh. Our goal is to augment the `pymatgen` documentation by incorporating practical examples of how to use `pymatgen` along with its related packages (which might include non-pymatgen packages). To achieve this, we plan to integrate the content from matgenb rather than merely duplicating it.",
"@shyuep i'll address your points one by one.\r\n\r\n> The reason is because matgenb is not just about pymatgen. There are examples for pymatgen as well as non-pymatgen packages.\r\n\r\ni don't see that as being an issue. `pymatgen` is an ecosystem package. many people would come here to look for examples on how to use pymatgen in combination with other codes\r\n\r\n> If you feel discoverability is an issue, by all means add a link to matgenb from pymatgen/examples. Also, matgenb is already mentioned multiple times in the docs\r\n\r\nlike you said, there are multiple `matgenb` links in the docs and discoverability is clearly _still_ an issue. i definitely spent time reading the docs when i started using and contributing to PMG and yet i wasn't aware of `matgenb` for the longest time. see my OP:\r\n\r\n> > given that i only discovered `matgenb` over a year after starting to contribute to pymatgen \r\n\r\nfinally, i would like push back on your last statement:\r\n\r\n> I can't help if people don't read the docs.\r\n\r\nthis is not true. you could simply not unilaterally close PRs to improve the docs, esp. if they attracted broad stakeholder support like this one! this too creates wasted effort by requiring me to argue what i believe are the obvious merits of this PR",
"@janosh As I said, discuss with me. I don't want to go round and round with you in GitHub issues on this kind of thing. There are ways to improve the discoverability without doing this duplication.\n\nNote that matgenb is literally in the third paragraph in the intro of pymatgen.org. There is an entire section called Examples right after the Intro that talks about it. You are basically saying \"oh damn I missed those obvious mentions and something must be wrong with discoverability.\" ",
"\r\nThis is what the front page looks like now. There are links not only in the SECOND paragraph, but also the auxiliary links at the top. There is also an examples folder that has a README pointing people to matgenb. \r\n",
"discoverability is only one of several problems. have you tried running the example notebooks? many of them are broken. by blocking this PR, you're preventing them from becoming better maintained and continuously tested. see again my OP:\r\n\r\n> it also allows us to subject them to pymatgen's higher code quality standards and potentially even integrate them into CI to ensure they don't break over time.",
"By all means add CI to matgenb. Again, the answer cannot be \"just move everything to the pymatgen repo to make life easier for the maintainer\". By that argument, we should have one giant repo for all the codes. ",
"> the answer cannot be \"just move everything to the pymatgen repo to make life easier for the maintainer\"\r\n\r\nwhy not? that's exactly what should be done if it's the easiest way of improving usage examples\r\n\r\nwe're talking about moving docs for pymatgen into the pymatgen repo... just like other packages have their example notebooks in the same repo.\r\n\r\n> By that argument, we should have one giant repo for all the codes.\r\n\r\nthat's basically what pymatgen is already! plus that's exactly how even huge companies like Google handle it internally: one giant monorepo. i really don't see how this is a counterargument",
"My outside perspective: it would certainly be nice to ensure that these examples are still working in the future. Automatic execution in CI would be great."
] | 2024-05-06T23:56:18
| 2024-05-15T15:01:55
|
2024-05-15T14:03:47Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
motivation: current pymatgen docs are purely class/method and function doc strings. pretty dry stuff which mostly helps you if you already have a good idea of what you want to do and just need to be reminded of what parameters are available or what their defaults are. to get familiar with a new part of pymatgen, you often have to go straight to reading the source code which can be a significant learning curve (a high activation barrier if you like 😄), esp. for beginners.
luckily `matgenb` has provided a decent collection of usage example notebooks for years. given that i only discovered it over a year after starting to contribute to pymatgen (not the start of using it mind you), it's likely unknown to a large part of the pymatgen user base.
merging those Jupyter notebooks into the `pymatgen` repo will greatly increase visibility. it also allows us to subject them to `pymatgen` higher code quality standards and potentially even integrate them into CI to ensure they don't break over time.
### To do
decide what format we want the examples to have. currently jupyter notebooks but could be converted to simple python scripts with VSCode style `# %%` cell delimeters. these can be converted to `.ipynb` format on the fly and from there converted to HTML to be rendered in the `pymatgen` docs at some point. this simplifies running the scripts in CI for testing but has the significant disadvantage that cell outputs cannot be saved
---
pinging @DanielYang59 as we're planning to pool our effort on this PR. also pinging @JaGeo @mkhorton since it ties in with private communication about lowering the barrier to entry to the MP ecosystem
|
{
"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/3811/reactions",
"total_count": 3,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3811/timeline
| null | true
| true
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3811",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3811",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3811.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3811.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3812
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3812/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3812/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3812/events
|
https://github.com/materialsproject/pymatgen/pull/3812
| 2,282,162,985
|
PR_kwDOACgets5utHCM
| 3,812
|
Add a `from_ase_atoms()` method to `Structure`
|
{
"login": "Andrew-S-Rosen",
"id": 8674072,
"node_id": "MDQ6VXNlcjg2NzQwNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Andrew-S-Rosen",
"html_url": "https://github.com/Andrew-S-Rosen",
"followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers",
"following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}",
"gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions",
"organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs",
"repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos",
"events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}",
"received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 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"
},
{
"id": 5529392097,
"node_id": "LA_kwDOACgets8AAAABSZPT4Q",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/api",
"name": "api",
"color": "D21149",
"default": false,
"description": "Application programming interface"
},
{
"id": 5585129979,
"node_id": "LA_kwDOACgets8AAAABTOZR-w",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ase",
"name": "ase",
"color": "B8E879",
"default": false,
"description": "Atomic simulation environment"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n## Walkthrough\nThe recent update involves enhancing the `pymatgen` `Structure` class with a new method for converting `ase.Atoms` to `pymatgen` structures. This improvement is complemented by an additional assertion in the test suite to validate the conversion process.\n\n## Changes\n\n| File Path | Change Summary |\n|-------------------------|---------------------------------------------------------------------|\n| `pymatgen/core/structure.py` | Added `from_ase_atoms` method to `Structure` class for converting `ase.Atoms` to `pymatgen Structure`. |\n| `tests/core/test_structure.py` | Added assertion in `test_to_ase_atoms` to verify the new conversion method. |\n\n> 🐰✨\n> In the garden of code, where the data trees sway,\n> A new method hops in, oh what a day!\n> From ASE to pymatgen, a leap so bold,\n> Ensuring each atom is perfectly molded.\n> Cheers to the coders, with brains so bright,\n> For making our data dance just right! 🌟\n> 🐇\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/core/structure.py: ## Short Summary\nAdded a new method `from_ase_atoms` to the `Structure` class in `pymatgen/core/structure.py` for converting `ase.Atoms` to `pymatgen Structure`.\n\n## Alterations to the declarations of exported or public entities\n- Added method:\n - From: `def to_ase_atoms(self, **kwargs) -> Atoms` in class `Structure`\n - To: `def from_ase_atoms(self, **kwargs) -> Structure` in class `Structure`\n\n---\n\ntests/core/test_structure.py: ## Short Summary\n\nIn the `test_to_ase_atoms` function within `test_structure.py`, a new assertion `assert Structure.from_ase_atoms(atoms) == self.struct` has been added.\n\n## Alterations to the declarations of exported or public entities\n\n- `test_to_ase_atoms` function in `test_structure.py`:\n - Added assertion: `assert Structure.from_ase_atoms(atoms) == self.struct`\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe pull request (PR) number 3812 titled \"Add a `from_ase_atoms()` method to `Structure`\" aims to introduce a new method to the `Structure` class within the `pymatgen` library. This method, `.from_ase_atoms()`, is designed to convert `ase.Atoms` objects into `pymatgen`'s `Structure` objects, thereby complementing the existing `.to_ase_atoms()` method which performs the reverse conversion. The addition of this method addresses the asymmetry in the current implementation, where only the conversion from `pymatgen` to `ASE` was facilitated.\n\nThe PR includes thorough documentation updates, type annotations, and tests to ensure the functionality and integration of the new method. It also encourages the use of `pre-commit` hooks to maintain code quality and adherence to formatting standards. Additionally, the new method and relevant changes are documented with `duecredit` annotations to acknowledge and reference pertinent scientific papers, ensuring proper citation and credit within the academic and development communities.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request introduces a new method `from_ase_atoms` to the `Structure` class in the `pymatgen/core/structure.py` file. This method enables the conversion of `ase.Atoms` objects to `pymatgen`'s `Structure` objects, effectively mirroring the existing `to_ase_atoms` method which converts `Structure` objects to `ase.Atoms`. The addition of `from_ase_atoms` completes the bidirectional conversion capability between `pymatgen` and `ASE` structures, enhancing the library's utility for users who work interchangeably with both types of structure representations.\n\nIn addition to the method implementation, the PR includes updates to the unit tests in `tests/core/test_structure.py`. Specifically, a new assertion has been added to the `test_to_ase_atoms` function to verify that the conversion from `ase.Atoms` back to `pymatgen`'s `Structure` using the new `from_ase_atoms` method retains the integrity and properties of the original `Structure` object. This ensures that both conversion methods are reliable and function as expected.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**pymatgen/core/structure.py:**\n- **Added method:**\n - **Previous:** `def to_ase_atoms(self, **kwargs) -> Atoms`\n - **New:** `def from_ase_atoms(cls, ase_atoms, **kwargs) -> Structure`\n\n**tests/core/test_structure.py:**\n- **Modified function: `test_to_ase_atoms`**\n - **Added assertion:** `assert Structure.from_ase_atoms(atoms) == self.struct`\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai -->\n\n---\n\n<details>\n<summary>Recent Review Details</summary>\n\n**Configuration used: .coderabbit.yaml**\n**Review profile: CHILL**\n\n<details>\n<summary>Commits</summary>\nFiles that changed from the base of the PR and between 6aa43fa7f4e1fec1ae70f28d246acb6a4a8d8b42 and 803f3158c47f02338753c7fccd17bb391c839fec.\n</details>\n\n\n<details>\n<summary>Files selected for processing (2)</summary>\n\n* pymatgen/core/structure.py (1 hunks)\n* tests/core/test_structure.py (2 hunks)\n\n</details>\n\n\n\n\n\n\n\n\n<details>\n<summary>Files skipped from review as they are similar to previous changes (2)</summary>\n\n* pymatgen/core/structure.py\n* tests/core/test_structure.py\n\n</details>\n\n\n\n\n</details><!-- commit_ids_reviewed_start -->\n\n<!-- f57d3bef551e1e041bfdac7c299ed9daf87c037a -->\n<!-- 6aa43fa7f4e1fec1ae70f28d246acb6a4a8d8b42 -->\n<!-- 803f3158c47f02338753c7fccd17bb391c839fec -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"Now I can simplify a lot of my lecture code. 😅\r\nThanks, @Andrew-S-Rosen !!",
"@shyuep --- just chiming in with another vote to remove coderabbit. It's super annoying. If not though, I'll just keep sass talking back to it until it spontaneously decides not to review anymore.",
"@Andrew-S-Rosen Yes, it is just an experiment. But a question - are the proposed changes useful? I can understand the boiler is annoying and I can try to kill those off. Just wanted to know if there is any value or there is no value at all.",
"> @Andrew-S-Rosen Yes, it is just an experiment. But a question - are the proposed changes useful? I can understand the boiler is annoying and I can try to kill those off. Just wanted to know if there is any value or there is no value at all.\r\n\r\n@shyuep: In general, [not really](https://github.com/materialsproject/pymatgen/pull/3812#discussion_r1591753624). I'm sure sometimes the proposed changes are useful, but the signal:noise ratio (both in terms of the chattiness and usefulness of the suggestions) is likely too low for contributors to get much value from it in my opinion. The only redeeming feature, in my view, is the edit of the original summary.",
"@Andrew-S-Rosen I don't really care for the summary. Ok, I will disable it. \r\n\r\nOne thing - I am not sure I want a from_ase_atoms. I would prefer a simple Structure.from_object. this will support ASE atoms for now, but I am sure there are a lot of different formats we can convert a structure from. ",
"> @Andrew-S-Rosen I don't really care for the summary. Ok, I will disable it.\r\n\r\nMuch appreciated!\r\n\r\n> One thing - I am not sure I want a from_ase_atoms. I would prefer a simple Structure.from_object. this will support ASE atoms for now, but I am sure there are a lot of different formats we can convert a structure from.\r\n\r\nThis is a very good point. For instance, a `Phonopy` object might be relevant. In any case, I am fine with changes in this regard. "
] | 2024-05-07T02:51:25
| 2024-05-07T19:12:30
|
2024-05-07T11:38:34Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Adds a `.from_ase_atoms()` method to `Structure` to complement the pre-existing `.to_ase_atoms()`. In reality, this is just a shorthand for the adapter, but it felt awkward to have one direction but not the other.
## Checklist
- [X] Google format doc strings added. Check with `ruff`.
- [X] Type annotations included. Check with `mypy`.
- [X] Tests added for new features/fixes.
- [X] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
Tip: Install `pre-commit` hooks to auto-check types and linting before every commit:
```sh
pip install -U pre-commit
pre-commit install
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a method for converting `ase.Atoms` to `pymatgen Structure`, enhancing interoperability between different scientific libraries.
- **Tests**
- Added new assertions to ensure reliability of the new conversion functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3812/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/3812/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3812",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3812",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3812.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3812.patch",
"merged_at": "2024-05-07T11:38:34Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3813
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3813/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3813/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3813/events
|
https://github.com/materialsproject/pymatgen/pull/3813
| 2,282,202,539
|
PR_kwDOACgets5utPMv
| 3,813
|
Re-enable some useful `ruff` rules
|
{
"login": "DanielYang59",
"id": 80093591,
"node_id": "MDQ6VXNlcjgwMDkzNTkx",
"avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DanielYang59",
"html_url": "https://github.com/DanielYang59",
"followers_url": "https://api.github.com/users/DanielYang59/followers",
"following_url": "https://api.github.com/users/DanielYang59/following{/other_user}",
"gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}",
"starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions",
"organizations_url": "https://api.github.com/users/DanielYang59/orgs",
"repos_url": "https://api.github.com/users/DanielYang59/repos",
"events_url": "https://api.github.com/users/DanielYang59/events{/privacy}",
"received_events_url": "https://api.github.com/users/DanielYang59/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- This is an auto-generated comment: review paused by coderabbit.ai -->\n\n> [!NOTE]\n> ## Reviews Paused\n> \n> Use the following commands to manage reviews:\n> - `@coderabbitai resume` to resume automatic reviews.\n> - `@coderabbitai review` to trigger a single review.\n\n<!-- end of auto-generated comment: review paused by coderabbit.ai --><!-- walkthrough_start -->\n\n## Walkthrough\n\nThe recent updates across various files in the `pymatgen` library primarily involve the introduction of `ClassVar` type annotations to class attributes, enhancing clarity on which variables are class-level constants. This change streamlines the handling of configurations and settings across the library, ensuring that these attributes are correctly recognized as static properties of their respective classes.\n\n## Changes\n\n| Files | Change Summary |\n|------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| `.../chemenv/...`, `.../eos.py`, `.../composition.py`, `.../xcfunc.py`, `.../molecule_structure_comparator.py` | Added `ClassVar` to class dictionary attributes to clarify their usage as static class properties. |\n| `.../io/abinit/...`, `.../io/adf.py`, `.../io/icet.py`, `.../io/nwchem.py`, `.../io/pwscf.py`, `.../io/vasp/inputs.py` | Introduction of `ClassVar` annotations for various class attributes to enforce their static nature. |\n| `.../symmetry/groups.py` | Type annotations (`ClassVar`) added to dictionaries to explicitly define them as class-level attributes. |\n| `pyproject.toml` | Modifications in linting rules, including the removal of specific checks and adjustments in documentation and exception handling practices. |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\n```\npymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py: ### Alterations to the declarations of exported or public entities:\n\n- `DEFAULT_EFFECTIVE_CSM_ESTIMATOR` in class `SelfCSMNbSetWeight`:\n - Before: `dict(function=\"power2_inverse_decreasing\", options={\"max_csm\": 8.0})`\n - After: `ClassVar = dict(function=\"power2_inverse_decreasing\", options={\"max_csm\": 8.0})`\n\n- `DEFAULT_WEIGHT_ESTIMATOR` in class `SelfCSMNbSetWeight`:\n - Before: `dict(function=\"power2_decreasing_exp\", options={\"max_csm\": 8.0, \"alpha\": 1})`\n - After: `ClassVar = dict(function=\"power2_decreasing_exp\", options={\"max_csm\": 8.0, \"alpha\": 1})`\n\n- `DEFAULT_EFFECTIVE_CSM_ESTIMATOR` in class `DeltaCSMNbSetWeight`:\n - Before: `dict(function=\"power2_inverse_decreasing\", options={\"max_csm\": 8.0})`\n - After: `ClassVar = dict(function=\"power2_inverse_decreasing\", options={\"max_csm\": 8.0})`\n\n- `DEFAULT_WEIGHT_ESTIMATOR` in class `DeltaCSMNbSetWeight`:\n - Before: `dict(function=\"smootherstep\", options={\"delta_csm_min\": 0.5, \"delta_csm_max\": 3.0})`\n - After: `ClassVar = dict(function=\"smootherstep\", options={\"delta_csm_min\": 0.5, \"delta_csm_max\": 3.0})`\n\n- `DEFAULT_SURFACE_DEFINITION` in class `DistanceAngleAreaNbSetWeight`:\n - Before: `dict(type=\"standard_elliptic\", distance_bounds={\"lower\": 1.2, \"upper\": 1.8}, angle_bounds={\"lower\": 0.1, \"upper\": 0.8})`\n - After: `ClassVar = dict(type=\"standard_elliptic\", distance_bounds={\"lower\": 1.2, \"upper\": 1.8}, angle_bounds={\"lower\": 0.1, \"upper\": 0.8})`\n\n- `DEFAULT_CE_ESTIMATOR` in class `WeightedNbSetChemenvStrategy`:\n - Before: `dict(function=\"power2_inverse_power2_decreasing\", options={\"max_csm\": 8.0})`\n - After: `ClassVar = dict(function=\"power2_inverse_power2_decreasing\", options={\"max_csm\": 8.0})`\n\n- `DEFAULT_CE_ESTIMATOR` in class `MultiWeightsChemenvStrategy`:\n - Before: `dict(function=\"power2_inverse_power2_decreasing\", options={\"max_csm\": 8.0})`\n - After: `ClassVar = dict(function=\"power2_inverse_power2_decreasing\", options={\"max_csm\": 8.0})`\n\n---\n\npymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py: ## Short Summary\n\nThe changes in `coordination_geometry_finder.py` include the introduction of type hinting for `ClassVar` and the conversion of certain class attributes to `ClassVar` type annotations.\n\n## Alterations to the declarations of exported or public entities\n\n- `BVA_DISTANCE_SCALE_FACTORS: ClassVar = dict(`\n- `DEFAULT_SPG_ANALYZER_OPTIONS: ClassVar = dict(`\n- `PRESETS: ClassVar = {`\n\n---\n\npymatgen/analysis/chemenv/utils/chemenv_config.py: ## Short Summary\n- Added `from typing import ClassVar` import.\n- Changed `DEFAULT_PACKAGE_OPTIONS` declaration from a dictionary to a `ClassVar`.\n\n---\n\npymatgen/analysis/chemenv/utils/defs_utils.py: ## Short Summary\n\nThe change in `defs_utils.py` involves adding a `ClassVar` import and specifying `ClassVar` for `CONDITION_DESCRIPTION` in the `AdditionalConditions` class.\n\n## Alterations to the declarations of exported or public entities\n\n- `CONDITION_DESCRIPTION: ClassVar = {` in class `AdditionalConditions` in `pymatgen/analysis/chemenv/utils/defs_utils.py`\n\n---\n\npymatgen/analysis/chemenv/utils/func_utils.py: ## Short Summary\n\nThe changes in `func_utils.py` involve removing the import of `ClassVar` from `typing` and redefining `ALLOWED_FUNCTIONS` as a `ClassVar` dictionary in classes `RatioFunction`, `CSMFiniteRatioFunction`, `CSMInfiniteRatioFunction`, and `DeltaCSMRatioFunction`.\n\n## Alterations to the declarations of exported or public entities\n\n- `from typing import TYPE_CHECKING, ClassVar` in `func_utils.py`\n- `ALLOWED_FUNCTIONS: ClassVar = dict(...)` in classes `RatioFunction`, `CSMFiniteRatioFunction`, `CSMInfiniteRatioFunction`, and `DeltaCSMRatioFunction` in `func_utils.py`\n\n---\n\npymatgen/analysis/eos.py: ## Short Summary\nThe change in functionality involves adding a type hint for `ClassVar` from the `typing` module and updating the declaration of the `MODELS` attribute within the `EOS` class in the `pymatgen/analysis/eos.py` file.\n\n## Alterations to the declarations of exported or public entities\n- `MODELS: ClassVar = dict(` in class `EOS` in `pymatgen/analysis/eos.py`\n\n---\n\npymatgen/analysis/molecule_structure_comparator.py: ## Short Summary\n\nIn the `molecule_structure_comparator.py` file of `pymatgen`, the change involves adding a `ClassVar` annotation to the `radius` dictionary within the `CovalentRadius` class.\n\n## Alterations to the declarations of exported or public entities\n\n- `radius: ClassVar = dict(` in class `CovalentRadius` in `pymatgen/analysis/molecule_structure_comparator.py`\n\n---\n\npymatgen/core/composition.py: ## Short Summary\nThe change in `pymatgen/core/composition.py` introduces a new import statement for `ClassVar` from the `typing` module and modifies the declaration of `special_formulas` by adding the `ClassVar` type hint.\n\n## Alterations to the declarations of exported or public entities\n- `special_formulas: ClassVar = dict(` in class `Composition` in `pymatgen/core/composition.py`\n\n---\n\npymatgen/core/xcfunc.py: ## Short Summary\n\nThe changes in `pymatgen/core/xcfunc.py` involve the addition of type hints for `ClassVar` from the `typing` module and the assignment of `ClassVar` annotations to dictionaries within the `XcFunc` class.\n\n## Alterations to the declarations of exported or public entities\n\n- `defined_aliases: ClassVar = {` in class `XcFunc` in `pymatgen/core/xcfunc.py`\n- `abinitixc_to_libxc: ClassVar = {` in class `XcFunc` in `pymatgen/core/xcfunc.py`\n\n---\n\npymatgen/ext/optimade.py: ## Summary\n\nThe changes in `pymatgen/ext/optimade.py` include:\n- Added an import statement for `ClassVar`.\n- Updated the comment from `importing optimade-python-tool's data structures will make more sense` to `import optimade-python-tool's data structures will make more sense`.\n- Changed the declaration of `aliases` from a dictionary to a `ClassVar`.\n\n---\n\npymatgen/io/abinit/abiobjects.py: ### Summary\n\n- Renamed `_mode2occopt: ClassVar` in class `Smearing` in `pymatgen/io/abinit/abiobjects.py`.\n- Renamed `_DEFAULT: ClassVar` in class `ElectronsAlgorithm` in `pymatgen/io/abinit/abiobjects.py`.\n- Renamed `_default_vars: ClassVar` in class `RelaxationMethod` in `pymatgen/io/abinit/abiobjects.py`.\n- Renamed `_WTYPES: ClassVar` and `_SC_MODES: ClassVar` in class `Screening` in `pymatgen/io/abinit/abiobjects.py`.\n- Renamed `_SIGMA_TYPES: ClassVar` and `_SC_MODES: ClassVar` in class `SelfEnergy` in `pymatgen/io/abinit/abiobjects.py`.\n- Renamed `_EXC_TYPES: ClassVar`, `_ALGO2VAR: ClassVar`, and `_COULOMB_MODES` in class `ExcHamiltonian` in `pymatgen/io/abinit/abiobjects.py`.\n\n---\n\npymatgen/io/abinit/pseudos.py: ## Short Summary\n\nThe changes in `pymatgen/io/abinit/pseudos.py` involve updating the declaration of `_VARS` in classes `NcAbinitHeader` and `PawAbinitHeader` and `_PSPCODES` in class `PseudoParser` to use `ClassVar` from `typing`.\n\n## Alterations to the declarations of exported or public entities\n\n- `NcAbinitHeader` class in `pymatgen/io/abinit/pseudos.py`:\n - `_VARS: ClassVar = dict(`\n \n- `PawAbinitHeader` class in `pymatgen/io/abinit/pseudos.py`:\n - `_VARS: ClassVar = dict(`\n \n- `PseudoParser` class in `pymatgen/io/abinit/pseudos.py`:\n - `_PSPCODES: ClassVar = {`\n\n---\n\npymatgen/io/adf.py: ## Short Summary\nIn the `pymatgen/io/adf.py` file, the change involves adding a type hint import for `ClassVar` from the `typing` module and modifying the declaration of the `operations` attribute within the `AdfTask` class to use type hinting.\n\n## Alterations to the declarations of exported or public entities\n- `operations: ClassVar = dict(` in class `AdfTask` in `pymatgen/io/adf.py`\n\n---\n\npymatgen/io/icet.py: ## Short Summary\n\nThe changes in `pymatgen/io/icet.py` involve updating the type hint import in the `if TYPE_CHECKING` block and changing the type annotations of class variables `sqs_kwarg_names` and `_sqs_kwarg_defaults` to use `ClassVar`.\n\n## Alterations to the declarations of exported or public entities\n\n- `from typing import Any, ClassVar` in `pymatgen/io/icet.py`\n- `sqs_kwarg_names: ClassVar[dict[str, tuple[str, ...]]]` in class `IcetSQS` in `pymatgen/io/icet.py`\n- `_sqs_kwarg_defaults: ClassVar[dict[str, Any]]` in class `IcetSQS` in `pymatgen/io/icet.py`\n\n---\n\npymatgen/io/nwchem.py: ## Short Summary\nThe diff in `pymatgen/io/nwchem.py` introduces changes to the declarations of class variables `theories` and `operations` in the `NwTask` class, specifying them as `ClassVar` using type annotations.\n\n## Alterations to the declarations of exported or public entities\n- `theories: ClassVar = { ... }` in class `NwTask` in `pymatgen/io/nwchem.py`\n- `operations: ClassVar = { ... }` in class `NwTask` in `pymatgen/io/nwchem.py`\n\n---\n\npymatgen/io/pwscf.py: ## Short Summary\nThe change in functionality involves adding a type hint for `ClassVar` in the `PWOutput` class within the `pymatgen/io/pwscf.py` file.\n\n## Alterations to the declarations of exported or public entities\n- `patterns: ClassVar = dict(...)` in class `PWOutput` in `pymatgen/io/pwscf.py`\n\n---\n\npymatgen/io/vasp/inputs.py: ## Short Summary\n\nIn the `pymatgen/io/vasp/inputs.py` file:\n- The import statement for `Literal` was replaced with `ClassVar`.\n- The dictionaries `functional_dir`, `functional_tags`, and `parse_functions` were updated to use `ClassVar` for type hinting.\n```\n\n---\n\npymatgen/symmetry/groups.py: ## Short Summary\n\nIn `pymatgen/symmetry/groups.py`, the changes involve adding type annotations (`ClassVar`) to `translations` and `full_sg_mapping` dictionaries.\n\n## Alterations to the declarations of exported or public entities\n\n- `translations: ClassVar = {k: Fraction(v) for k, v in SYMM_DATA[\"translations\"].items()}` in class `SpaceGroup` in `pymatgen/symmetry/groups.py`\n- `full_sg_mapping: ClassVar = {v[\"full_symbol\"]: k for k, v in SYMM_DATA[\"space_group_encoding\"].items()}` in class `SpaceGroup` in `pymatgen/symmetry/groups.py`\n\n---\n\npyproject.toml: ## Short Summary\nThe diff in `pyproject.toml` involves removing the linting rule `COM812` for missing trailing commas and adjusting linting rules related to docstrings, numpy usage, and exception handling.\n\n## Alterations to the declarations of exported or public entities\n- Removed linting rule `COM812` for missing trailing commas.\n- Adjusted linting rules related to docstrings, numpy usage, and exception handling.\n```\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives (User Provided Facts)\n\nThe pull request aims to make the `ruff` linter stricter by enabling specific rules that were previously ignored. Specifically, the rule `COM812`, which pertains to missing trailing commas, is highlighted. The rule's details can be found in the documentation linked in the PR description. This change is part of an effort to enforce stricter coding standards and ensure consistency across the codebase.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request introduces a series of changes across various modules of the `pymatgen` library, primarily focusing on the use of `ClassVar` from the `typing` module to define class-level constants. This change affects multiple files and classes within the `pymatgen` project, indicating a systematic update to enhance the clarity and correctness of type annotations across the library.\n\n1. **General Changes Across Multiple Files:**\n - The introduction of `ClassVar` type annotations for various class attributes that are meant to be constants. This includes dictionaries and other data structures that define properties and configurations relevant to the classes.\n - Removal of the `COM812` linting rule for missing trailing commas, alongside adjustments to other linting rules concerning docstrings, numpy usage, and exception handling.\n\n2. **Specific Changes in Key Modules:**\n - In `chemenv` related files, adjustments were made to class attributes such as `DEFAULT_EFFECTIVE_CSM_ESTIMATOR`, `DEFAULT_WEIGHT_ESTIMATOR`, `DEFAULT_SURFACE_DEFINITION`, and others, marking them as `ClassVar`.\n - The `eos.py` file saw the addition of `ClassVar` type hint for the `MODELS` dictionary.\n - In `composition.py`, the `special_formulas` dictionary was updated with a `ClassVar` type hint.\n - The `io` submodules (`abinit`, `adf`, `icet`, `nwchem`, `pwscf`, `vasp`) saw similar updates where various configurations and operational dictionaries were defined as `ClassVar`.\n - `symmetry/groups.py` included type annotations for `translations` and `full_sg_mapping` dictionaries using `ClassVar`.\n\nThese changes are part of an overarching effort to standardize and enforce type safety and immutability of class-level data across the `pymatgen` library, which is crucial for maintaining the integrity and predictability of the library's behavior.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n- **chemenv_strategies.py**:\n - `DEFAULT_EFFECTIVE_CSM_ESTIMATOR`, `DEFAULT_WEIGHT_ESTIMATOR`, `DEFAULT_SURFACE_DEFINITION`, `DEFAULT_CE_ESTIMATOR` in various classes: Added `ClassVar` to the existing dictionary declarations.\n\n- **coordination_geometry_finder.py**:\n - `BVA_DISTANCE_SCALE_FACTORS`, `DEFAULT_SPG_ANALYZER_OPTIONS`, `PRESETS`: Defined as `ClassVar`.\n\n- **chemenv_config.py**, **defs_utils.py**, **func_utils.py**, **eos.py**, **molecule_structure_comparator.py**, **composition.py**, **xcfunc.py**, **optimade.py**:\n - Various configuration dictionaries such as `DEFAULT_PACKAGE_OPTIONS`, `CONDITION_DESCRIPTION`, `ALLOWED_FUNCTIONS`, `MODELS`, `radius`, `special_formulas`, `defined_aliases`, `abinitixc_to_libxc`, `aliases`: Updated to `ClassVar`.\n\n- **io/abinit/abiobjects.py**, **pseudos.py**, **adf.py**, **icet.py**, **nwchem.py**, **pwscf.py**, **vasp/inputs.py**:\n - Class attributes like `_mode2occopt`, `_DEFAULT`, `_default_vars`, `_WTYPES`, `_SC_MODES`, `_SIGMA_TYPES`, `_EXC_TYPES`, `_ALGO2VAR`, `_COULOMB_MODES`, `_VARS`, `_PSPCODES`, `operations`, `theories`, `patterns`, `functional_dir`, `functional_tags`, `parse_functions`: Redefined with `ClassVar`.\n\n- **symmetry/groups.py**:\n - `translations`, `full_sg_mapping`: Added `ClassVar` to the dictionary comprehensions.\n\nThese alterations ensure that the attributes are correctly recognized as class-level constants, enhancing the code's maintainability and clarity regarding the mutability of these properties.\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai --><!-- commit_ids_reviewed_start -->\n\n<!-- 4386596d6f2138a6144a8a8dfd413265d6003edd -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@coderabbitai ignore",
"<!-- This is an auto-generated reply by CodeRabbit -->\n@coderabbitai ignore\n\n<details>\n<summary>Actions Performed</summary>\n\nReviews paused.\n\n</details>",
"> i actually often prefer the `dict(foo=bar)` version over `{\"foo\": bar}` since it's more compact due to not needing so many quotes. this sometimes avoids a line break which imo helps readability. \r\n\r\n`dict(foo=bar)` has one more character than `{\"foo\": bar}` including the whitespace. So I assume there is no reason `dict()` is more compact than `{}`?\r\n\r\nAnd it seems [`{}` should be faster than `dict()`](https://docs.astral.sh/ruff/rules/unnecessary-collection-call/):\r\n> It's unnecessary to call, e.g., dict() as opposed to using an empty literal ({}). The former is slower because the name dict must be looked up in the global scope in case it has been rebound.\r\n\r\n\r\n",
"It should be ready for review now @janosh. Thanks. Let me know if want to enable any more/less `ruff` rules.\r\n\r\nI tried to enable: https://github.com/materialsproject/pymatgen/blob/46b018ddc66bc8b60c9528a040bf7fce010f2dca/pyproject.toml#L72\r\n\r\nBut it seems to force all kind of list builder into list comprehensions (especially some nested conditions list), which would greatly reduce readability.",
"> dict(foo=bar) is 13 characters and {\"foo\": bar} is 12 (including the whitespace).\r\n\r\nthat inverts once you have 2 or more keys in your dict. at that point the collection call is shorter",
"> > dict(foo=bar) is 13 characters and {\"foo\": bar} is 12 (including the whitespace).\r\n> \r\n> that inverts once you have 2 or more keys in your dict. at that point the collection call is shorter\r\n\r\nThat's true. But if you look into the commit 38a5aa7c800e7d048922d4d80271dcbe28f7c761, it appears among all changes, this case you mentioned (where a line is broken by extra characters) only happened once for: https://github.com/materialsproject/pymatgen/blob/46b018ddc66bc8b60c9528a040bf7fce010f2dca/pymatgen/io/vasp/sets.py#L2219\r\n\r\nAnd all other changes didn't introduce any additional line.\r\n\r\nBut anyway, feel free to revert that commit if you really prefer not to change that (it's all automatically changed by `ruff` so wasn't any effort from me). But at least we should search and replace some `list()` or `dict()`.",
"Beautiful. Thanks for reviewing @janosh Appreciate it.",
"I just look into [this speed comparison](https://switowski.com/blog/dict-function-vs-literal-syntax/) between `dict()` and `{}`, and it surprised me as the speed improvement seems quite significant (could be more than 2x the time for `dict()`). I thought it was just minor improvement like ~10%."
] | 2024-05-07T03:38:24
| 2024-05-08T03:03:39
|
2024-05-07T11:54:27Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Re-enable some useful `ruff` rules
- `COM812`: [missing-trailing-comma](https://docs.astral.sh/ruff/rules/missing-trailing-comma/): no change to code base
- `ISC001`: [single-line-implicit-string-concatenation](https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/): might conflict with other `ruff` rules sometimes
- `RUF012`: [mutable-class-default](https://docs.astral.sh/ruff/rules/mutable-class-default/)
- `PLC1901`: [compare-to-empty-string](https://docs.astral.sh/ruff/rules/compare-to-empty-string/): no change to code base
- `PYI024`[collections-named-tuple](https://docs.astral.sh/ruff/rules/collections-named-tuple/): make typing of `namedtuple` possible
**REVERTED**
- `C408`: [unnecessary-collection-call](https://docs.astral.sh/ruff/rules/unnecessary-collection-call/) (confirmed no comment is dropped)
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3813/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/3813/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3813",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3813",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3813.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3813.patch",
"merged_at": "2024-05-07T11:54:27Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3814
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3814/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3814/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3814/events
|
https://github.com/materialsproject/pymatgen/pull/3814
| 2,285,421,346
|
PR_kwDOACgets5u3xZO
| 3,814
|
Add types for `core.periodic_table/bonds/composition/ion/lattice/libxcfunc`, new type `MillerIndex` and fix Lattice hash
|
{
"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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- This is an auto-generated comment: review paused by coderabbit.ai -->\n\n> [!NOTE]\n> ## Reviews Paused\n> \n> Use the following commands to manage reviews:\n> - `@coderabbitai resume` to resume automatic reviews.\n> - `@coderabbitai review` to trigger a single review.\n\n<!-- end of auto-generated comment: review paused by coderabbit.ai --><!-- walkthrough_start -->\n\n## Walkthrough\nThe updates to `pymatgen/core/periodic_table.py` enhance functionality and consistency in the representation of chemical elements. Key changes include making certain properties non-optional, introducing methods for comparison and representation, and refining type annotations for more precise data handling. These modifications improve the robustness and usability of the module, facilitating easier manipulation and comparison of element properties in scientific computations.\n\n## Changes\n\n| File | Summary of Changes |\n|-------------------------------|------------------------------------------------------------------------------------------------------|\n| `.../periodic_table.py` | - Non-optional properties for atomic radius and mass<br>- Added comparison and representation methods<br>- Updated type annotations for radii properties<br>- New method to create elements from names<br>- Modified validity check for symbols |\n\n<!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai -->\n<!--\n\n\npymatgen/core/periodic_table.py: ### Alterations to the declarations of exported or public entities\n\n- `@property def atomic_radius(self) -> FloatWithUnit | None` changed to `@property def atomic_radius(self) -> FloatWithUnit`\n- `@property def atomic_mass_number(self) -> FloatWithUnit | None` changed to `@property def atomic_mass_number(self) -> FloatWithUnit`\n- Added `def __eq__(self, other: object) -> bool`\n- Added `def __hash__(self) -> int`\n- Added `def __repr__(self) -> str`\n- Added `def __str__(self) -> str`\n- Added `def __lt__(self, other)`\n- Added `def __deepcopy__(self, memo) -> Element`\n- `@property def average_anionic_radius(self) -> float` changed to `@property def average_anionic_radius(self) -> FloatWithUnit`\n- `@property def ionic_radii(self) -> dict[int, float]` changed to `@property def ionic_radii(self) -> dict[int, FloatWithUnit]`\n- Added `@staticmethod def from_name(name: str) -> Element`\n- Modified `def is_valid_symbol(symbol: str) -> bool`\n- Modified `@property def block(self) -> str`\n- Removed `def __deepcopy__(self, memo)`\n\n-->\n<!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: short summary by coderabbit.ai -->\n<!--\n\n\n### PR Objectives\n\nThe pull request (PR) number 3814 titled \"Tweak `core.periodic_table` types and docstring\" introduces several modifications to the `core.periodic_table` module in the pymatgen library. The changes include adjustments to type annotations and docstrings, reorganization of class structure, and a query regarding the classification of certain elements as rare-earth metals.\n\n1. **Type and Docstring Adjustments**: The PR includes commits that refine the type annotations and update the docstrings for better clarity and accuracy in the code documentation.\n\n2. **Class Structure Reorganization**: The PR proposes a reordering of dunder methods (like `__eq__`, `__hash__`, `__repr__`, etc.) to the top of the class definitions. This change aims to enhance the readability and consistency of the class structure. However, the contributor is open to reverting this change if it is deemed to negatively impact the Git history more than it benefits the code structure.\n\n3. **Element Classification Query**: The contributor raises a specific question regarding the classification of Scandium (Sc) and Yttrium (Y) as rare-earth elements within the code. This query points to a potential need for adjustment in the element categorization based on scientific definitions or prevailing standards in the field of materials science.\n\n### AI-Generated Summary of Generated Summaries\n\nThe pull request introduces several significant changes to the `core.periodic_table` module in the pymatgen library, focusing on enhancing type safety, improving documentation, and refining the class structure for better code readability and maintenance.\n\n- **Type Enhancements**: The PR makes the type annotations more specific and removes the allowance for `None` in properties such as `atomic_radius` and `atomic_mass_number`, indicating a shift towards ensuring that these properties always have a defined value. Similarly, properties like `average_anionic_radius` and the values in `ionic_radii` dictionary are now expected to be instances of `FloatWithUnit` instead of plain floats, providing more detailed information about the units of measurement.\n\n- **Addition of Class Methods and Properties**: New methods including `__eq__`, `__hash__`, `__repr__`, `__str__`, `__lt__`, and `__deepcopy__` have been added, enhancing the functionality of the Element class by supporting comparison, representation, ordering, and copying operations. A new static method `from_name` has been introduced to instantiate an Element object based on its name.\n\n- **Documentation and Code Structure**: The PR includes updates to docstrings, making them more informative and aligned with the new type annotations. The reorganization of dunder methods to the top of the class is intended to standardize the structure across classes, although this change is open for reversion based on its impact on the Git history.\n\n- **Element Classification**: The PR also touches on the scientific classification of elements, specifically questioning the current categorization of Scandium and Yttrium as non-rare-earth elements, which might suggest a need for further review and possible correction in line with scientific standards.\n\n### Alterations to the Declarations of Exported or Public Entities\n\n**Before Changes:**\n- `@property def atomic_radius(self) -> FloatWithUnit | None`\n- `@property def atomic_mass_number(self) -> FloatWithUnit | None`\n- `@property def average_anionic_radius(self) -> float`\n- `@property def ionic_radii(self) -> dict[int, float]`\n- `def __deepcopy__(self, memo)`\n\n**After Changes:**\n- `@property def atomic_radius(self) -> FloatWithUnit`\n- `@property def atomic_mass_number(self) -> FloatWithUnit`\n- `@property def average_anionic_radius(self) -> FloatWithUnit`\n- `@property def ionic_radii(self) -> dict[int, FloatWithUnit]`\n- Added `def __eq__(self, other: object) -> bool`\n- Added `def __hash__(self) -> int`\n- Added `def __repr__(self) -> str`\n- Added `def __str__(self) -> str`\n- Added `def __lt__(self, other)`\n- Added `def __deepcopy__(self, memo) -> Element`\n- Added `@staticmethod def from_name(name: str) -> Element`\n- Modified `def is_valid_symbol(symbol: str) -> bool`\n- Modified `@property def block(self) -> str`\n- Removed `def __deepcopy__(self, memo)`\n\n-->\n<!-- end of auto-generated comment: short summary by coderabbit.ai --><!-- commit_ids_reviewed_start -->\n\n<!-- 24b1546e98ad7d8d9a1a515b1f6d2663f7a920dc -->\n\n<!-- commit_ids_reviewed_end --><!-- tips_start -->\n\n---\n\nThank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?\n\n<details>\n<summary>Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<details>\n<summary>Tips</summary>\n\n### Chat\n\nThere are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):\n\n- Review comments: Directly reply to a review comment made by CodeRabbit. Example:\n\t- `I pushed a fix in commit <commit_id>.`\n\t- `Generate unit testing code for this file.`\n\t- `Open a follow-up GitHub issue for this discussion.`\n- Files and specific lines of code (under the \"Files changed\" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:\n\t- `@coderabbitai generate unit testing code for this file.`\n\t-\t`@coderabbitai modularize this function.`\n- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:\n\t- `@coderabbitai generate interesting stats about this repository and render them as a table.`\n\t- `@coderabbitai show all the console.log statements in this repository.`\n\t- `@coderabbitai read src/utils.ts and generate unit testing code.`\n\t- `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`\n\nNote: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.\n\n### CodeRabbit Commands (invoked as PR comments)\n\n- `@coderabbitai pause` to pause the reviews on a PR.\n- `@coderabbitai resume` to resume the paused reviews.\n- `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository.\n- `@coderabbitai resolve` resolve all the CodeRabbit review comments.\n- `@coderabbitai help` to get help.\n\n\nAdditionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.\n\n### CodeRabbit Configration File (`.coderabbit.yaml`)\n\n- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.\n- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.\n- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`\n\n### Documentation and Community\n\n- Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit.\n- Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.\n- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.\n\n</details>\n\n<!-- tips_end -->",
"@coderabbitai ignore",
"@janosh Can you please review this at your convenience? Feel free to revert 24b1546e98ad7d8d9a1a515b1f6d2663f7a920dc though (I personally don't like to have dunder methods scattered around the class randomly, but such change badly pollute Git Blame). Thanks!",
"**UPDATE: I would open a separate issue for this as this seems to be hugely breaking.**\r\n\r\nI tried to help fix https://github.com/materialsproject/pymatgen/pull/3792#discussion_r1584003750 in case you don't have time for this @janosh @JaGeo . \r\n\r\nBut the updated implementation breaks the following test `assert Composition({\"O\": 1}) < Composition({\"S\": 1}) `:\r\nhttps://github.com/materialsproject/pymatgen/blob/6c696cdb327621d5d16c675478f4ed0e024feea1/tests/core/test_composition.py#L504-L516\r\n\r\nI think the comparison between two `Composition` with different `Element` does not really make much sense, unless one is a sub/superset of another (Maybe we could say `SO2` > `O2`?).\r\n\r\nHow should we update this behavior? Should we return `False` for such cases to indicate `S` is not greater than `O` and at the same `O` is also not greater than `S` because they are not comparable (perhaps with a warning), or just raise an error? \r\n\r\n",
"Please review this one as well @janosh. Appreciate your time!",
"Thanks for reviewing @janosh! \r\n\r\nDo you have any comments on the \"Need Confirmation\" section of the PR summary https://github.com/materialsproject/pymatgen/pull/3814#issue-2285421346?\r\n\r\nRegarding (1), I noticed multiple part of `core.lattice` access `self._matrix` instead of `self.matrix` where `matrix` is a `property`. I'm not sure if this is intended? Does it offer any benefit that I'm not aware of?\r\n\r\n\r\nFor example (not exhaustive):\r\nhttps://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/pymatgen/core/lattice.py#L111-L112\r\nhttps://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/pymatgen/core/lattice.py#L201-L204\r\n\r\nIs it related to: https://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/pymatgen/core/lattice.py#L44\r\n",
"using the attribute directly instead of the property method doesn't add to the call stack and so saves small amount of work.\r\n\r\nbut you can't lazy-load an attribute like you can a property. same with caching. that's probably what \"Properties lazily generated for efficiency. \" is referring to\r\n\r\n> In https://github.com/materialsproject/pymatgen/commit/710cb910e3a1322b057c868592d88e8627c5a98e, access to Lattice._pbc has been redirected to Lattice.pbc, with a setter method. Wondering if there is any reason for the previous implementation?\r\n\r\nnot that i'm aware. your way makes more sense imo",
"> 2\\. Is the following needed by anything? https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/core/libxcfunc.py#L502-L504\r\n\r\ni think that's safe to remove",
"Thanks for the input. It's very helpful. I would do them in a future PR.\r\n\r\nAlso worth north is the `regen_libxcfunc.py` dev script seems to depend on the comments to work properly. This feels so weird and might be good to improve this as well.\r\nhttps://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/dev_scripts/regen_libxcfunc.py#L107-L111\r\nhttps://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/pymatgen/core/libxcfunc.py#L34-L408\r\n\r\n"
] | 2024-05-08T11:58:39
| 2024-05-31T19:08:09
|
2024-05-12T12:45:45Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
### Add types annotations for:
- [x] `core.periodic_table`
- [x] `core.bonds`
- [x] `core.composition`
- [x] `core.ion`
- [x] `core.lattice`
- [x] `core.libxcfunc`
### New custom type:
- New custom type `MillerIndex = tuple[int, int, int]`
### Bug fixes:
1. Seem like a typo, I assume it should check if `HO` exists and replace them with `OH`. So the condition should be `if (self.composition.get("H") and self.composition.get("O")) is not None:`, fixed in b4a70eef7666743459a6e242a0efc18762ff3b49: https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/core/ion.py#L144-L145
2. Magic number for hash of `Lattice` fixed in 88e4edad5655eac909737c568114ceb33416e95e: https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/core/lattice.py#L837-L838
### Need confirmation:
1. In 710cb910e3a1322b057c868592d88e8627c5a98e, access to `Lattice._pbc` has been redirected to `Lattice.pbc`, with a `setter` method. Wondering if there is any reason for the previous implementation?
3. Is the following needed by anything? https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/core/libxcfunc.py#L502-L504
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3814/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/3814/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3814",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3814",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3814.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3814.patch",
"merged_at": "2024-05-12T12:45:45Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3815
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3815/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3815/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3815/events
|
https://github.com/materialsproject/pymatgen/issues/3815
| 2,286,849,037
|
I_kwDOACgets6ITowN
| 3,815
|
Bug in `core.composition` 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 |
[] | 2024-05-09T04:05:40
| 2024-06-26T11:16:54
|
2024-06-26T11:16:54Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Bug in `core.composition` comparison
Open this in case it got forgotten.
As found out by @janosh in https://github.com/materialsproject/pymatgen/pull/3792#discussion_r1584003750, there is an obvious bug with `Composition` comparison where `True` is returned too early:
https://github.com/materialsproject/pymatgen/blob/6c696cdb327621d5d16c675478f4ed0e024feea1/pymatgen/core/composition.py#L195-L212
On top of this obvious bug, there are a few questions:
- The docstring adds to ambiguity: `Should ONLY be used for defining a sort order (the behavior is probably not what you'd expect).`.
- It appears that we don't need to sort this union set?
### How to define the comparison behavior
How should we define the behavior when an `Element` is only in one of the `Composition` and this `Composition` is not a superset of another? For example:
1. `Composition({"O": 1, "N": 1})` > `Composition({"O": 1})` # This makes sense
2. `Composition({"N": 1})` > `Composition({"O": 1})` # This feels a bit weird though the atomic number is indeed greater
3. `Composition({"O": 2, "N": 1})` > `Composition({"O": 2, "C": 1})` # This doesn't seem to make sense? But this could be inferred from (2)
So should we prevent `Composition` with different `Element` from being compared altogether?
https://github.com/materialsproject/pymatgen/blob/6c696cdb327621d5d16c675478f4ed0e024feea1/tests/core/test_composition.py#L504-L516
|
{
"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/3815/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/3815/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3816
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3816/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3816/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3816/events
|
https://github.com/materialsproject/pymatgen/issues/3816
| 2,286,908,652
|
I_kwDOACgets6IT3Ts
| 3,816
|
Argument `check_occu` is not working as intended (in `_get_structure` and `parse_structures`)
|
{
"login": "KunhuanLiu",
"id": 22421218,
"node_id": "MDQ6VXNlcjIyNDIxMjE4",
"avatar_url": "https://avatars.githubusercontent.com/u/22421218?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/KunhuanLiu",
"html_url": "https://github.com/KunhuanLiu",
"followers_url": "https://api.github.com/users/KunhuanLiu/followers",
"following_url": "https://api.github.com/users/KunhuanLiu/following{/other_user}",
"gists_url": "https://api.github.com/users/KunhuanLiu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/KunhuanLiu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KunhuanLiu/subscriptions",
"organizations_url": "https://api.github.com/users/KunhuanLiu/orgs",
"repos_url": "https://api.github.com/users/KunhuanLiu/repos",
"events_url": "https://api.github.com/users/KunhuanLiu/events{/privacy}",
"received_events_url": "https://api.github.com/users/KunhuanLiu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 19613987,
"node_id": "MDU6TGFiZWwxOTYxMzk4Nw==",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug",
"name": "bug",
"color": "9222c1",
"default": true,
"description": ""
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"I'm not a maintainer, but if you could provide the cif file and code snippet to reproduce this issue, that would be very helpful :)",
"Here is a **minimally reproducible example** with the structure (Crystal.cif) attached, highlighting that the argument `check_occu` cannot turn off the occupancy check. In this example structure, Site1 -- Site3 and Site4--6 are problematic positions in my structure. Atoms C4 and C5 mimic the normal atom sites in my structure.\r\n\r\nTo reproduce the bug:\r\n\r\n```py\r\nfrom pymatgen.io.cif import CifParser\r\nparser = CifParser(\"Crystal.cif\", site_tolerance = 1e-4, occupancy_tolerance = 1.0)\r\nb = parser.parse_structures(check_occu = False)\r\n```\r\n\r\nError that I encountered:\r\n\r\n```py\r\nSome occupancies ([2.0, 2.0, 2.0, 1.0, 1.0]) sum to > 1! If they are within the occupancy_tolerance, they will be rescaled. The current occupancy_tolerance is set to: 1.0\r\nNo structure parsed for section 1 in CIF.\r\n...\r\nin CifParser.parse_structures(self, primitive, symmetrized, check_occu, on_error)\r\n 1219 warnings.warn(\"Issues encountered while parsing CIF: \" + \"\\n\".join(self.warnings))\r\n 1221 if len(structures) == 0:\r\n-> 1222 raise ValueError(\"Invalid CIF file with no structures!\")\r\n 1223 return structures\r\n\r\nValueError: Invalid CIF file with no structures!\r\n```\r\nExpected behavior: occupancy would not be checked and a structure with all atoms should be given. I think code review could be more helpful to see the issue though.\r\n[Crystal.txt](https://github.com/materialsproject/pymatgen/files/15267914/Crystal.txt)\r\n",
"Hi @KunhuanLiu, I just had a look at this issue, and the inconsistency between comment and implementation you mentioned is indeed an issue: https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L985-L989\r\n\r\nBut in our case, that's not the cause of the failure.\r\n\r\n### Cause of code failure\r\n\r\nThe issue is the bad default value of `occupancy_tolerance` for `CifParser` (and lack of proper error message): https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L290\r\n\r\nAnd the condition for scaling occupancy: https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L1085-L1086\r\n\r\nWhich means the default `occupancy_tolerance` value would prevent invalid occupancy (in our case `2.0`) being scaled, the thus the code breaks as `Structure` does not allow such invalid occupancy: https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L1105\r\n\r\nI would talk to @janosh on changing the bad default value of `occupancy_tolerance` soon, and I appreciate your report.\r\n\r\n### To fix your code\r\n\r\nTo fix your code, you need to set the `occupancy_tolerance` to a value greater than the max occupancy (`2.0` in your case), for example:\r\n```python\r\nfrom pymatgen.io.cif import CifParser\r\n\r\nparser = CifParser(\"Crystal_min.cif\", occupancy_tolerance=2.0)\r\n\r\nstructures = parser.parse_structures(check_occu=False)\r\n```\r\n\r\nHope it helps :)\r\n",
"Thanks @DanielYang59 , for investigating the case. Totally agree with your thoughts; I came up with a similar manual fix (I offered a test case where manually setting the `occupancy tolerance` to 2.0 can address the issue. In my structure, I had to use `occupancy tolerance = 1000`.) Of course, it will be difficult to manually check every structure (and set tolerance) for high throughput screening...\r\n\r\nIn addition to attending to the behavior of `occupancy tolerance,` I think the argument `check_occu` according to the API reference would be very useful if it can work properly: \"site occupancy will not be checked, allowing unphysical occupancy != 1...\"\r\n\r\nAgain thank you for the attention and time!",
"> In addition to attending to the behavior of `occupancy tolerance,` I think the argument `check_occu` according to the API reference would be very useful if it can work properly: \"site occupancy will not be checked, allowing unphysical occupancy != 1...\"\r\n\r\nMaybe the behavior should be changed such that `if not check_occu`, any occupancy would be allowed with a warning message. What do you think? Feel free to comment on https://github.com/materialsproject/pymatgen/pull/3819.\r\n\r\n> Again thank you for the attention and time!\r\n\r\nNo worries at all.\r\n\r\n",
"Sorry about the delayed response -- I noticed another thing about the current `check_occu` behavior. I am sorry I cannot offer more help reviewing the algorithm right now. \r\n\r\n> Maybe the behavior should be changed such that if not check_occu, any occupancy would be allowed with a warning message. What do you think? Feel free to comment on https://github.com/materialsproject/pymatgen/pull/3819.\r\n\r\nI think that's what I thought the argument should do based on the [API documentation](https://pymatgen.org/pymatgen.io.html#pymatgen.io.cif.CifParser.parse_structures) description. When `not check_occu`, all atom sites, regardless of `occup_tolerance`, will be returned.\r\n\r\nI want to note the following behavior when I use `check_occu = False` though: \r\n```\r\nb = parser.parse_structures(check_occu = False)[0]\r\n# from pymatgen.analysis.structure_analyzer import get_neighbors\r\nfor site in b:\r\n neighbors = b.get_neighbors(site, 0.1) # 0.5 Å as an example threshold for overlap\r\n if neighbors:\r\n print(f\"Overlap suspected near {site.label} at {site.frac_coords}:\\n{neighbors}\")\r\n```\r\nReturned atoms do not have labels:\r\n```\r\nOverlap suspected near C at [0.1191 0.5596 0.5713]:\r\n[PeriodicNeighbor: C (-5.305, 16.0, 13.02) [0.1191, 0.5595, 0.5713]]\r\nOverlap suspected near C at [0.4404 0.5595 0.5713]:\r\n[PeriodicNeighbor: C (5.306, 16.0, 13.02) [0.4405, 0.5596, 0.5713]]\r\nOverlap suspected near C at [0.4405 0.8809 0.5713]:\r\n[PeriodicNeighbor: C (-0.001651, 25.19, 13.02) [0.4404, 0.8809, 0.5713]]\r\nOverlap suspected near C at [0.4404 0.8809 0.5713]:\r\n[PeriodicNeighbor: C (0.001651, 25.19, 13.02) [0.4405, 0.8809, 0.5713]]\r\nOverlap suspected near C at [0.4405 0.5596 0.5713]:\r\n[PeriodicNeighbor: C (5.305, 16.0, 13.02) [0.4404, 0.5595, 0.5713]]\r\nOverlap suspected near C at [0.1191 0.5595 0.5713]:\r\n[PeriodicNeighbor: C (-5.306, 16.0, 13.02) [0.1191, 0.5596, 0.5713]]\r\n```",
"Hi thanks for following up. I have updated the behavior and docstring in #3819. \r\n\r\nMeanwhile I have a question though, as per the docstring, \"unphysical occupancy\" refers to `occupancy != 1`, but the implementation just handles cases where `occupancy > 1`, is there any chance for the occupancy to be smaller than zero and still need to be included (I'm not aware of such cases)?\r\n\r\nI would look into the site label soon, thanks for reporting.\r\n",
"The label issue is fixed by 05c11d4fbe95222eb4582b9986200dab42b36a00. Thanks.\r\n",
"Hi @KunhuanLiu : the CIF file you provided does not appear to be valid, as the three sites at the end, `Site6`, `Site7`, and `Site8`, are duplicates of `Site3`, `Site2`, and `Site1`, respectively. Removing these latter three sites successfully produces a structure with pymatgen\r\n\r\nPymatgen does not currently include functionality to fix bad CIFs. This isn't an issue with the occupancy tolerance function",
"Hello @esoteric-ephemera , this ticket inquiries whether the implementation of the `check_occu` argument is consistent with the algorithm described in both the source code comment and the API documentation.\r\n\r\n> Removing these latter three sites successfully produces a structure with pymatgen\r\n\r\nExample structure serves as a minimal example to highlight the impact of the issue.\r\n\r\n> Pymatgen does not currently include functionality to fix bad CIFs. \r\n\r\nThank you for sharing. Can you clarify what you mean? I am not requesting such functionality here. Can you comment on how or why `check_occu = False` should not return a structure when the perceived occupancy exceeds the user-set `occu_tolerance`? This can be important as @DanielYang59 has implemented several changes in #3819 and your review can be helpful. Just to make sure I am not proposing something based on misunderstanding of the intended behavior.\r\n\r\nI also don't think that \"bad cifs\" (a term that should be defined more clearly) are the sole reasons for such errors. A structure with large unit cell and dense atoms can have atoms such as H that are \"close\" to each other under the 1e-4 default site tolerance (I cannot publish the structure here). If `check_occu = False` is not intended to keep the overlapping or nonphysical atoms, then the documentation, instead of the code, needs revision. Of course, it's then the user's responsibility to catch error or adjust tolerance parameters if they decide to continue their analysis on those structures.\r\n\r\n> This isn't an issue with the occupancy tolerance function\r\n\r\nI never thought it was in this case. Setting a higher occupancy tolerance is an unorthodox trick to let pymatgen return my structure. The question concerns the proper behavior with the `check_occu` argument, and I will appreciate your comments on this\r\n\r\n",
"@KunhuanLiu: the example is not a reasonable CIF because it contains multiply-occupied sites. The site occupancy represents *fractionally* what elements occupy a given site, e.g., a disordered structure will have at least two sites with occupancies < 1, and an ordered structure will have all site occupancies == 1. A site occupancy > 1 is not physical\r\n\r\nA \"bad CIF\" in this context means a CIF that is either out of spec [per the IUCr](https://www.iucr.org/resources/cif/spec/version1.1) or is unphysical. The ICUr specifically [states that the occupancy represents](https://www.iucr.org/__data/iucr/cifdic_html/2/cif_mm.dic/Iatom_site.occupancy.html):\r\n> The fraction of the atom type present at this site.\r\n The sum of the occupancies of all the atom types at this site\r\n may not significantly exceed 1.0 unless it is a dummy site.\r\n\r\nRight now, pymatgen does not support this kind of \"dummy site\" because it's not compatible with other functionality in pymatgen. pymatgen does support disordered structures, where at least two elements occupy the same site with fractional (< 1) occupancy.\r\n\r\n`check_occ` is not intended to ensure non-overlapping sites. It is intended to ensure that the fractional composition on a given site does not exceed 1",
"Hi @esoteric-ephemera thanks a lot for your comment. \r\n\r\n### Combine of sites\r\n>the CIF file you provided does not appear to be valid, as the three sites at the end, Site6, Site7, and Site8, are duplicates of Site3, Site2, and Site1, respectively.\r\n\r\n>Pymatgen does not currently include functionality to fix bad CIFs.\r\n\r\nIt appears `CifParser` is able to handle such cifs:\r\nhttps://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/io/cif.py#L306-L329\r\n\r\nAnd:\r\nhttps://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/io/cif.py#L328-L329\r\n\r\nThe cif @KunhuanLiu provided:\r\n```\r\n Site1 C 0.11910 0.55960 0.57130 1.0\r\n Site2\tC 0.44040 0.55950 0.57130 1.000 << \r\n Site3 C 0.44050 0.88090 0.57130 1.000\r\n C4 \tC 0.07117 0.21573 0.93523 1.000\r\n C5\tC 0.14457 0.21573 0.93523 1.000\r\n Site6\tC 0.44040 0.88090 0.57130 1.000\r\n Site7 C 0.44050 0.55960 0.57130 1.000 << would be combined into Site2\r\n Site8 C 0.11910 0.55950 0.57130 1.000\r\n```\r\n\r\n`Site2` and `Site7` (and two other pairs similarly) are not duplicate, but within the `site_tolerance`, and were therefore combined into a single site (with occupancy summed).\r\n\r\n### Handle of \"unphysical\" (occupancy > 1) sites\r\n\r\n> Right now, pymatgen does not support this kind of \"dummy site\" because it's not compatible with other functionality in pymatgen.\r\n\r\nIn `parse_structures`, there is:\r\nhttps://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/io/cif.py#L1263-L1266\r\n\r\nWhich should allow user to parse cif with occupancy > 1, once `check_occu` is turned off?\r\n\r\n",
"@esoteric-ephemera Thanks so much for clarifying, and I apologize for my oversight on the fact that in a realistic crystal structure, no atom sites would have summed occupancy > 1. I understand and support the design that raises the error `ValueError: Invalid CIF file with no structures!` when there are sites with occupancy > occupancy_tolerance and not rescaled to 1. \r\n\r\nI am still unsure what the algorithm should do when `check_occu` is set to `FALSE`, but according to @esoteric-ephemera it **should still not** return a bad CIF with site occupancy > 1 that is caused by merging atom sites.\r\n\r\nI'm very thankful to the attention and help from @DanielYang59, and I want to make sure we are not changing the code implementation unnecessarily. It looks like I had some misunderstanding caused by warning messages and documentation.\r\n\r\nTo make sure we are aligned on the intended behavior, here's my (corrected) understanding:\r\n\r\n- `site_tolerance`: decides whether sites are merged and the resulted site has occupancy as sum of all the site occupancy\r\n- `occupancy_tolerance`: used to scale down sites with occupancy <= occupancy_tolerance\r\n- `check_occu`: setting to `True` (default value), check if any site has occupancy > 1; if yes, raise `ValueError`. Setting to `False`, ignores `_atom_site_occupancy`. However, it is intended to still raise `ValueError` when any site has occupancy >1. (Needs confirmation)\r\n- Observed in my testing: `check_occu = False` removes atom site labels.\r\n\r\n@DanielYang59 thanks for your attention. Based on our discussion I think the original version has a very reasonable design and raises ValueError as intended. It sounds reasonable to me to refer the structures with occupancy > 1 as `bad cifs`. Changes around `tolerance` are not necessary. I think there can be some improvement on the documentation.\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L1011-L1018\r\nHere, `({sum_occu}) sum to > 1!` is confusing and can lead to a *very very long* warning message when there are lots of atoms. This happened in my case and made it difficult to correctly understand the warning message.\r\n I suggest the following:\r\n```\r\nunphysical_occu = [occu for occu in sum_occu if occu > 1]\r\n... f\"Some occupancies sum to > 1! If they are within \" \r\n \"the occupancy_tolerance, they will be rescaled. \" \r\n f\"The current occupancy_tolerance is set to: {self._occupancy_tolerance}. Sites with occupancy sum > 1: {unphysical_occu}\" \r\n```\r\n@esoteric-ephemera Can please you confirm that the behavior described above on `check_occu` is correct? I also wonder if this is a good place to close the ticket, or to open new issues with sharpened focus. Thanks for all the attention!",
"Sorry for the delay. @DanielYang59:\r\n> `Site2` and `Site7` (and two other pairs similarly) are not duplicate, but within the site_tolerance, and were therefore combined into a single site (with occupancy summed).\r\n\r\nThey're duplicates in terms of position and chemical species, their labels differ. The right way to specify a site like this is with 0.5 occupancy on `Site2` and 0.5 occupancy on `Site7`. That specifies a disordered structure with 50-50 occupancy C labelled `Site2` and C labelled `Site7`\r\n\r\n> Which should allow user to parse cif with occupancy > 1, once check_occu is turned off?\r\n\r\nIt might let you do that but I'm not sure what it parses will be meaningful / usable in pymatgen. I think pymatgen should parse CIFs that conform (within a tolerance) to the IUCr standards and not extrapolate when a CIF deviates too far from those standards.\r\n\r\n@KunhuanLiu:\r\n> Can please you confirm that the behavior described above on check_occu is correct? I also wonder if this is a good place to close the ticket, or to open new issues with sharpened focus. Thanks for all the attention!\r\n\r\nThis is right except `occupancy_tolerance` is used to allow for occupancies slightly larger than 1 (this often arises from rounding errors in hand-written CIFs, such as those from the ICSD)\r\n\r\n`check_occu = False` removing the site labels is probably necessary because pymatgen just merges sites with >100% occupancy and the same chemical identity\r\n\r\nAs for closing the issue / @DanielYang59's PR: I would prefer to just amend the ValueError message for clarity - the site tolerance shouldn't be changed unless there's an in-spec CIF that isn't being parsed correctly",
"> Sorry for the delay. @DanielYang59:\r\n\r\nAll good. Thanks a lot for your comments :)\r\n\r\n> > `Site2` and `Site7` (and two other pairs similarly) are not duplicate, but within the site_tolerance, and were therefore combined into a single site (with occupancy summed).\r\n> \r\n> They're duplicates in terms of position and chemical species, their labels differ. The right way to specify a site like this is with 0.5 occupancy on `Site2` and 0.5 occupancy on `Site7`. That specifies a disordered structure with 50-50 occupancy C labelled `Site2` and C labelled `Site7`\r\n\r\nSorry I don't think they're duplicates, as their x/y coordinates differ (slightly by 1e-4):\r\n```\r\n Site2\tC 0.44040 0.55950 0.57130 1.000 \r\n Site7 C 0.44050 0.55960 0.57130 1.000 \r\n```\r\n\r\nSo if the tolerance is set to a stricter value, they could be two individual sites. But in our case, the default tolerance is such that these two sites are indeed considered at the same position (but I would not consider them duplicates).\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/14b7357d373c1eae88a3ca014fb14ffba44df75f/pymatgen/io/cif.py#L328-L329\r\n\r\n> > Which should allow user to parse cif with occupancy > 1, once check_occu is turned off?\r\n> \r\n> It might let you do that but I'm not sure what it parses will be meaningful / usable in pymatgen. I think pymatgen should parse CIFs that conform (within a tolerance) to the IUCr standards and not extrapolate when a CIF deviates too far from those standards.\r\n\r\nI'm unsure about the purpose of having such behavior either, but as per the docstring: \r\nhttps://github.com/materialsproject/pymatgen/blob/14b7357d373c1eae88a3ca014fb14ffba44df75f/pymatgen/io/cif.py#L1263-L1266\r\n\r\nSo I might assume there is a reason to allow for such cif files. \r\n\r\nIf you or anyone else with more knowledge on cif decide to remove this functionality, we might need to remove `check_occu` because it seems to causing confusing (for example this issue). Because occupancy would be checked no matter how it is set.\r\n\r\n> As for closing the issue / @DanielYang59's PR: I would prefer to just amend the ValueError message for clarity - the site tolerance shouldn't be changed unless there's an in-spec CIF that isn't being parsed correctly\r\n\r\nYes I have already updated the code with a more descriptive error message. \r\n\r\nI didn't change the site tolerance but updated the behavior of `check_occu` to allow for any occupancy once turned off (to be consistent with the docstring). But certainly we need further confirmation on whether we want such behavior or not.\r\n\r\n"
] | 2024-05-09T05:14:42
| 2024-05-30T19:34:44
|
2024-05-30T19:34:44Z
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.11.8
### Pymatgen version
2024.2.8
### Operating system version
_No response_
### Current behavior
Hi all,
I was trying to deal with a crystal structure (in .cif format) that had warnings on having occupancy issues:
```
"UserWarning: Some occupancies ([1.0, ... (x876)]) sum to > 1! If they are within the occupancy_tolerance, they will be rescaled. The current occupancy_tolerance is set to: 1.0
warnings.warn(msg)
```
I am unsure if it is the structure's error given that many other programs (ase, VESTA, etc) were not reporting error, so I tried to turn off the occupancy check and check myself. When I called CifParser function `parse_structures` with `check_occu` = False, the same warning and errors were logged.
Checking the source code I think there is something implemented that is inconsistent with the algorithm, by a quick glance:
Under `_get_structures()`:
```
# If check_occu is True or the occupancy is greater than 0, create comp_d
if not check_occu or occu > 0:
coord = (x, y, z)
match = get_matching_coord(coord)
comp_dict = {el: max(occu, 1e-8)}
```
I think `not check_occu` is not consistent with the algorithm commented above.
Meanwhile, the warning I'm receiving comes from the following code snippet that is not switched off by "check_occu":
```
if any(occu > 1 for occu in sum_occu):
msg = (
f"Some occupancies ({sum_occu}) sum to > 1! If they are within "
"the occupancy_tolerance, they will be rescaled. "
f"The current occupancy_tolerance is set to: {self._occupancy_tolerance}"
)
warnings.warn(msg)
self.warnings.append(msg)
```
My temporarily hacky solution to my structure is to raise the occupancy_tolerance to 1000 to get the structure.
### Expected Behavior
Sites that are too close to each other are kept without raising warning and errors that prevent getting the structures.
### 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/3816/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/3816/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3817
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3817/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3817/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3817/events
|
https://github.com/materialsproject/pymatgen/pull/3817
| 2,287,553,541
|
PR_kwDOACgets5u-8rl
| 3,817
|
[Deprecation] Replace `Element` property `is_rare_earth_metal` with `is_rare_earth` to include Y and Sc
|
{
"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
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
},
{
"id": 5687218601,
"node_id": "LA_kwDOACgets8AAAABUvwRqQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/deprecation",
"name": "deprecation",
"color": "B0FEB6",
"default": false,
"description": "Code deprecations"
}
] |
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 |
[
"@janosh. Can you please review this one? Thanks!",
"Just want to mention here that I expect lot's of code to be broken. \r\nIs there a way to notify users of this change or have a deprecation period?",
"Thanks for commenting!\r\n\r\nI'm not sure quite to properly notify users in this case (except for insert a warning in the `property` first and change the implementation later), but I believe Janosh would have some suggestions.",
"Maybe, rename the property and deprecate the old one?",
"I think there is no reason to rename it (as the name seems proper to me)? Just the implementation need to be corrected.\r\n\r\nMaybe I didn't make myself clear enough, perhaps we could first change the `property` to:\r\n```python\r\n@property\r\ndef is_rare_earth_metal(self) -> bool:\r\n \"\"\"True if element is a rare earth metal, including Scandium (Sc),\r\n Yttrium (Y), Lanthanides (La) series and Actinides (Ac) series.\r\n Reference: https://en.wikipedia.org/wiki/Rare-earth_element.\r\n \"\"\"\r\n warning.warn(\"Y and Sc would be considered rare earth metal in a later version of pymatgen.\")\r\n return self.is_lanthanoid or self.is_actinoid\r\n```\r\n\r\nAnd then really change the implementation after some grace period?\r\n\r\nBut personally such breaking change is acceptable as I would consider it a \"fix\". What do you think?\r\n",
"Renaming for the deprecation.\r\n\r\nI personally don't think it is acceptable without proper deprecation. ",
"> Renaming for the deprecation.\r\n\r\nSorry I didn't quite understand.\r\n\r\n> I personally don't think it is acceptable without proper deprecation.\r\n\r\nYes I'm feeling this is too \"core/fundamental\" to just change without any warning.\r\n\r\nLet's hear what Janosh is going to say :)\r\n",
"Instead of a breaking change, could you @DanielYang59 add a separate property\r\n```\r\ndef is_iupac_rare_earth_metal(self) -> bool:\r\n \"\"\"\r\n True if element is a rare earth metal according to IUPAC standards.\r\n \r\n See IUPAC guidelines: https://old.iupac.org/publications/books/rbook/Red_Book_2005.pdf\r\n \"\"\"\r\n return self.is_lanthanoid or self.is_actinoid or self.Z in {21, 39}\r\n```\r\n\r\nSpeaking from experience, it's really hard to estimate what the downstream effects of a breaking change like this are. I unintentionally broke features in one of MP's more highly used codes, matminer, simply by adding data for higher-Z elements to pymatgen's `periodic_table.json` data file\r\n\r\nThat code is not as actively maintained as pymatgen is, and I think most users expect pymatgen functionality to be stable",
"> Instead of a breaking change, could you @DanielYang59 add a separate property\r\n> \r\n> ```\r\n> def is_iupac_rare_earth_metal(self) -> bool:\r\n> \"\"\"\r\n> True if element is a rare earth metal according to IUPAC standards.\r\n> \r\n> See IUPAC guidelines: https://old.iupac.org/publications/books/rbook/Red_Book_2005.pdf\r\n> \"\"\"\r\n> return self.is_lanthanoid or self.is_actinoid or self.Z in {21, 39}\r\n> ```\r\n\r\nGreat suggestion!",
"I agree with @JaGeo and @esoteric-ephemera - NO BREAKING CHANGES UNLESS ABSOLUTELY NECESSARY.",
"> Instead of a breaking change, could you @DanielYang59 add a separate property\r\n> \r\n> ```\r\n> def is_iupac_rare_earth_metal(self) -> bool:\r\n> \"\"\"\r\n> True if element is a rare earth metal according to IUPAC standards.\r\n> \r\n> See IUPAC guidelines: https://old.iupac.org/publications/books/rbook/Red_Book_2005.pdf\r\n> \"\"\"\r\n> return self.is_lanthanoid or self.is_actinoid or self.Z in {21, 39}\r\n> ```\r\n> \r\n> Speaking from experience, it's really hard to estimate what the downstream effects of a breaking change like this are. I unintentionally broke features in one of MP's more highly used codes, matminer, simply by adding data for higher-Z elements to pymatgen's `periodic_table.json` data file\r\n> \r\n> That code is not as actively maintained as pymatgen is, and I think most users expect pymatgen functionality to be stable\r\n\r\nThanks for the suggestion and sharing your experience, that would be very helpful.\r\n\r\nYes I totally agree adding a property would be safer, but why should we keep a definition that doesn't align with IUPAC standard? I assume this might cause unexpected behavior too.",
"Let me look into this myself, but on first glance I agree with @DanielYang59 here: we absolutely should follow IUPAC conventions (or similar standards bodies), pymatgen is not the appropriate arbiter of what is or isn’t a rare earth element. This would then be a bug that needs fixing.",
"<img width=\"727\" alt=\"image\" src=\"https://github.com/materialsproject/pymatgen/assets/2976580/1f91069f-ba2a-44bb-8799-9ae1c346d092\">\r\n\r\nFrom the latest edition of the [IUPAC Red Book](https://iupac.org/what-we-do/books/redbook/), 2005, p51. This concurs with the 1985 edition.\r\n\r\nI also appreciated this note (p52), since it caused some confusion for myself:\r\n\r\n<img width=\"727\" alt=\"image\" src=\"https://github.com/materialsproject/pymatgen/assets/2976580/a1668195-12ca-498a-91a6-07a84d8ed237\">\r\n\r\nI would therefore consider this a bug. Fixing the bug might indeed be a breaking change: I'm glad to see more caution around breaking changes, they are painful, but for a bug it has to be the correct course of action.\r\n\r\nI think consensus seems to be that \"rare earth element\" is not a useful name in any case, but nevertheless if it is used, we should be consistent with standards.",
"> Fixing the bug might indeed be a breaking change: I'm glad to see more caution around breaking changes, they are painful, but for a bug it has to be the correct course of action.\r\n\r\nNot necessarily right? Excel [has had a bug since its inception](https://learn.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year) due it assuming incorrectly that the year 1900 was a leap year. This can break excel code between mac excel, which has the epoch as the leap year 1904, and ms-dos-based excel, which has the epoch as the fake leap year 1900. But it's been maintained and documented heavily by Microsoft because it could break a lot of code built on top of it\r\n\r\nI prefer the non-breaking solution of raising a warning when using the `is_rare_earth_metal` function but *keeping it as is* and then including a new `is_iupac_rare_earth_metal` function as mentioned above\r\n\r\nWe've had a [good amount of software instability lately](https://github.com/materialsproject/foundation/pull/24), especially in atomate2 and emmet, due to breaking changes. I am admittedly being overly cautious",
"I appreciate the point, and I sympathise with it. I have long been an advocate for not making breaking changes wherever possible -- I have often been the recipient myself of some amount of pain from unnecessary breaking changes.\r\n\r\nThat said, I think we can make a distinction between a breaking change which is scientifically meaningful, and a breaking change which is not scientifically motivated. The IUPAC creates conventions for good reasons. I am thinking of the student using pymatgen and being misled, for example.\r\n\r\nYour suggestion of a warning is a good one if we are very concerned by the change:\r\n\r\n> I prefer the non-breaking solution of raising a warning when using the is_rare_earth_metal function but keeping it as is and then including a new is_iupac_rare_earth_metal function as mentioned above\r\n\r\nThis creates some messiness, but I could see this as a compromise. Nevertheless, warnings are often not seen. There is still a danger here. It also does not fix any mistaken usage in downstream code, whose developers might appreciate the fix without additional action being required on their part -- this is the complementary argument.\r\n\r\nAt least within the Materials Project stack or closely-linked codes, this is also something we can inspect. We can look for usages of `is_rare_earth_metal`. As far as I can see, this is not used in `emmet`, `atomate`, `atomate2`, `matminer`, `crystaltoolkit` or `robocrystallographer`. Hopefully this gives us some confidence that a change would not have side effects at least within this stack.\r\n\r\nMy recommendation would still be to implement the fix.",
"@janosh Can you please suggest on this one?",
"@DanielYang59 fwiw, i agree with @mkhorton and the changes you propose in this PR but i prefer for others to make the decision.\r\n\r\ngiven there are precisely zero internal calls to `is_rare_earth_metal` in `pymatgen` i imagine the number of call sites in downstream packages that would be affected is low. it's also not clear that those call sites would suffer given this can be considered a fix. they may actually start working as intended by this change",
"I suggest we do a correct `is_rare_earth` implementation, and leave `is_rare_earth_metal` with a deprecation message until 2025.1.1",
"> I suggest we do a correct `is_rare_earth` implementation, and leave `is_rare_earth_metal` with a deprecation message until 2025.1.1\r\n\r\nI like this idea, because `rare_earth_metal` itself doesn't seem like a widely recognized terminology :)\r\n\r\nI would implement this tomorrow",
"I hope everyone is happy now :)",
"Great, @DanielYang59 ! I am happy as well with this solution!"
] | 2024-05-09T12:07:36
| 2024-05-31T19:11:51
|
2024-05-30T19:55:41Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- [**Deprecation**] Replace `Element` property `is_rare_earth_metal` with `is_rare_earth` to include Y and Sc, remove `is_rare_earth_metal` after `2025-01-01`.
https://github.com/materialsproject/pymatgen/blob/6c696cdb327621d5d16c675478f4ed0e024feea1/pymatgen/core/periodic_table.py#L689-L692
- Update dependency `monty` version to use the `deadline` argument
### Reference
From the [1985 IUPAC Red Book](https://old.iupac.org/publications/books/rbook/Red_Book_2005.pdf):
> The following collective names for like elements are IUPAC-approved: alkali metals
(Li, Na, K, Rb, Cs, Fr), alkaline earth metals (Be, Mg, Ca, Sr, Ba, Ra), pnictogens8 (N, P,
As, Sb, Bi), chalcogens (O, S, Se, Te, Po), halogens (F, Cl, Br, I, At), noble gases (He, Ne,
Ar, Kr, Xe, Rn), lanthanoids (La, Ce, Pr, Nd, Pm, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu),
rare earth metals (Sc, Y and the lanthanoids) and actinoids (Ac, Th, Pa, U, Np, Pu, Am, Cm,
Bk, Cf, Es, Fm, Md, No, Lr)
And [Wikipedia](https://en.wikipedia.org/wiki/Rare-earth_element):
> The rare-earth elements (REE), also called the rare-earth metals or rare earths or, in context, rare-earth oxides, and sometimes the [lanthanides](https://en.wikipedia.org/wiki/Lanthanide) (although [yttrium](https://en.wikipedia.org/wiki/Yttrium) and [scandium](https://en.wikipedia.org/wiki/Scandium), which do not belong to this series, are usually included as rare earths)
|
{
"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/3817/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/3817/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3817",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3817",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3817.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3817.patch",
"merged_at": "2024-05-30T19:55:41Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3818
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3818/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3818/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3818/events
|
https://github.com/materialsproject/pymatgen/issues/3818
| 2,288,195,400
|
I_kwDOACgets6IYxdI
| 3,818
|
Check inputs provided to MPRester functions
|
{
"login": "tschaume",
"id": 1404564,
"node_id": "MDQ6VXNlcjE0MDQ1NjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1404564?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tschaume",
"html_url": "https://github.com/tschaume",
"followers_url": "https://api.github.com/users/tschaume/followers",
"following_url": "https://api.github.com/users/tschaume/following{/other_user}",
"gists_url": "https://api.github.com/users/tschaume/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tschaume/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tschaume/subscriptions",
"organizations_url": "https://api.github.com/users/tschaume/orgs",
"repos_url": "https://api.github.com/users/tschaume/repos",
"events_url": "https://api.github.com/users/tschaume/events{/privacy}",
"received_events_url": "https://api.github.com/users/tschaume/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"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-05-09T18:03:08
| 2024-05-09T18:03:08
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Feature Requested
Implement sanity checks for inputs to the MPRester functions in pymatgen
### Proposed Solution
MP is getting non-sensical requests such as `/materials/summary/?_fields=material_id&formula=Emission+Factor&_limit=1000` from user agent `pymatgen/2023.7.17 (Python/3.8.12 Windows/10)`. The formula could be validated and rejected before sending the request to the MP API.
### Relevant Information
_No response_
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3818/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/3818/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3819
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3819/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3819/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3819/events
|
https://github.com/materialsproject/pymatgen/pull/3819
| 2,290,724,849
|
PR_kwDOACgets5vJrlf
| 3,819
|
Improve unphysical (greater than 1) occupancy handling in `CifParser` and add missing site label `if not check_occu`
|
{
"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
}
|
[
{
"id": 5414010766,
"node_id": "LA_kwDOACgets8AAAABQrM_jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/needs%20discussion",
"name": "needs discussion",
"color": "D96543",
"default": false,
"description": "Needs discussion to agree on actionable next steps"
},
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
},
{
"id": 6072177337,
"node_id": "LA_kwDOACgets8AAAABae4SuQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/cif",
"name": "cif",
"color": "B04CCD",
"default": false,
"description": "Crystallographic information file"
}
] |
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 |
[
"@janosh. Can you please review (and comment) on this? Thanks."
] | 2024-05-11T06:48:35
| 2024-05-31T19:11:18
|
2024-05-30T19:34:43Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
To fix #3816.
- Raise `ValueError` if occupancy exceeds `occupancy_tolerance` and if `check_occu`, with a more descriptive error message.
- [**Need Confirmation**] Allow any occupancy (ignore `occupancy_tolerance`) in cif when `not check_occu` in 7cf5ba93ed57b1167171aee7ab35043c74da3037, a warning would still be raised.
- Fix a bug where site label is lost `if not check_occu` by 05c11d4fbe95222eb4582b9986200dab42b36a00.
### A more descriptive error message for unphysical sites
With currently implementation (with `check_occu = False`), `ValueError` for occupancy beyond tolerance would be raised by the checker inside `Structure` (repored in #3816), with a misleading error message (`Some occupancies ([2.0, 2.0, 2.0, 1.0, 1.0]) sum to > 1`), where it should not be `> 1`, but `> occupancy_tolerance` instead.
### Clarify `check_occu`
https://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/io/cif.py#L1263-L1266
The name of `check_occu` does not reflect its functionality. With current implementation, occupancy would be checked regardless of the value of `check_occu`.
https://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/io/cif.py#L1067-L1081
We would need to clarify its behavior in docstring.
|
{
"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/3819/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/3819/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3819",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3819",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3819.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3819.patch",
"merged_at": "2024-05-30T19:34:43Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3820
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3820/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3820/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3820/events
|
https://github.com/materialsproject/pymatgen/pull/3820
| 2,290,794,849
|
PR_kwDOACgets5vJ6c4
| 3,820
|
Improve type annotations and comments for `io.cif`
|
{
"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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@janosh. Could you please review this as well? Thanks!",
"Thanks for reviewing!"
] | 2024-05-11T08:59:29
| 2024-05-31T19:09:33
|
2024-05-15T16:34:21Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Add type annotations and tweak comments for `io.cif`
- Minor code format tweak
- Simplify "check to see if" to "check if" in comments
- Remove `if __name__ == "__main__"` from `core.libxcfunc` (legacy from another PR)
### Potentially Breaking Changes (very unlikely)
1. Make `parse_oxi_states` and `parse_magmoms` of `CifParser` private methods. **Rationale**:
- These two parse methods are used exclusively for the private `_get_structure` method to parse corresponding properties from the file.
2. Remove unnecessary `lattice` argument from `parse_magmoms` method (now private). **Rationale**:
- This argument is only used to check if `Lattice is None`, and could be done outside this method.
https://github.com/materialsproject/pymatgen/blob/2e1c3016742d930cbdc5f4129e4036819e7755d3/pymatgen/io/cif.py#L850-L869
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3820/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/3820/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3820",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3820",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3820.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3820.patch",
"merged_at": "2024-05-15T16:34:21Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3821
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3821/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3821/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3821/events
|
https://github.com/materialsproject/pymatgen/issues/3821
| 2,291,160,524
|
I_kwDOACgets6IkFXM
| 3,821
|
`.as_dict()` method on `VaspInput` causes an `AttributeError`
|
{
"login": "Andrew-S-Rosen",
"id": 8674072,
"node_id": "MDQ6VXNlcjg2NzQwNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Andrew-S-Rosen",
"html_url": "https://github.com/Andrew-S-Rosen",
"followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers",
"following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}",
"gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions",
"organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs",
"repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos",
"events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}",
"received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 19613987,
"node_id": "MDU6TGFiZWwxOTYxMzk4Nw==",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug",
"name": "bug",
"color": "9222c1",
"default": true,
"description": ""
}
] |
open
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[] | 2024-05-12T04:25:19
| 2024-05-12T07:54:24
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.11
### Pymatgen version
2024.5.1
### Operating system version
_No response_
### Current behavior
When calling `VaspInputSet.get_input_set()`, the returned `VaspInput` has a broken `.as_dict()` method. That is reported below. The returned `VaspInput` is already a `dict`, so that's what should be presented. What is somewhat confusing though is that the method should really be called `.get_vasp_input()` since it returns a `VaspInput` and not a `VaspInputSet`.
```python
from pymatgen.core import Structure
from pymatgen.io.vasp.sets import MPStaticSet
s = Structure(
lattice=[[0, 2.13, 2.13], [2.13, 0, 2.13], [2.13, 2.13, 0]],
species=["Ni", "O"],
coords=[[0, 0, 0], [0.5, 0.5, 0.5]],
)
vasp_input = MPStaticSet().get_input_set(structure=s, potcar_spec=True)
print(vasp_input.as_dict())
```
Traceback:
```python
File ~/software/miniconda/envs/quacc/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2758, in VaspInput.as_dict(self)
2756 def as_dict(self) -> dict:
2757 """MSONable dict."""
-> 2758 dct = {key: val.as_dict() for key, val in self.items()}
2759 dct["@module"] = type(self).__module__
2760 dct["@class"] = type(self).__name__
File ~/software/miniconda/envs/quacc/lib/python3.11/site-packages/pymatgen/io/vasp/inputs.py:2758, in <dictcomp>(.0)
2756 def as_dict(self) -> dict:
2757 """MSONable dict."""
-> 2758 dct = {key: val.as_dict() for key, val in self.items()}
2759 dct["@module"] = type(self).__module__
2760 dct["@class"] = type(self).__name__
AttributeError: 'list' object has no attribute 'as_dict'
```
### Expected Behavior
The `.as_dict()` method should return a dictionary.
|
{
"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/3821/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/3821/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3822
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3822/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3822/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3822/events
|
https://github.com/materialsproject/pymatgen/pull/3822
| 2,291,261,729
|
PR_kwDOACgets5vLVFO
| 3,822
|
Add types annotations for `core.interface`
|
{
"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
}
|
[
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
},
{
"id": 5692928617,
"node_id": "LA_kwDOACgets8AAAABU1MyaQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/surfaces",
"name": "surfaces",
"color": "521BBE",
"default": false,
"description": "Surface analysis"
}
] |
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 |
[
"Not working on this for now, would reopen it later.",
"@janosh Would appreciate it if you could review this at your convenience, thanks!",
"@janosh Just ping you again in case it got forgotten :) No rush",
"Thanks for reviewing! Appreciate that"
] | 2024-05-12T10:00:07
| 2024-06-06T11:17:33
|
2024-06-06T11:16:25Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Add types annotations for `core.interface`
- Use more specific types for `ClassVar`
### New custom type aliases
```
Tuple3Ints = tuple[int, int, int]
Tuple3Floats = tuple[float, float, float]
```
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3822/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/3822/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3822",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3822",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3822.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3822.patch",
"merged_at": "2024-06-06T11:16:25Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3823
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3823/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3823/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3823/events
|
https://github.com/materialsproject/pymatgen/pull/3823
| 2,291,414,900
|
PR_kwDOACgets5vLzy2
| 3,823
|
Adapt to the latest version of PWmat output file
|
{
"login": "lhycms",
"id": 41718895,
"node_id": "MDQ6VXNlcjQxNzE4ODk1",
"avatar_url": "https://avatars.githubusercontent.com/u/41718895?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lhycms",
"html_url": "https://github.com/lhycms",
"followers_url": "https://api.github.com/users/lhycms/followers",
"following_url": "https://api.github.com/users/lhycms/following{/other_user}",
"gists_url": "https://api.github.com/users/lhycms/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lhycms/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lhycms/subscriptions",
"organizations_url": "https://api.github.com/users/lhycms/orgs",
"repos_url": "https://api.github.com/users/lhycms/repos",
"events_url": "https://api.github.com/users/lhycms/events{/privacy}",
"received_events_url": "https://api.github.com/users/lhycms/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"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
}
] |
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-05-12T16:50:53
| 2024-05-13T13:27:16
|
2024-05-13T13:27:16Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Major changes:
- Adapt to the latest version of PWmat output files, while also being compatible with older versions of output files。
## Checklist
- [ ] Google format doc strings added. Check with `ruff`.
- [ ] Type annotations included. Check with `mypy`.
- [ ] Tests added for new features/fixes.
- [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
Tip: Install `pre-commit` hooks to auto-check types and linting before every commit:
```sh
pip install -U pre-commit
pre-commit install
```
|
{
"login": "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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3823/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/3823/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3823",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3823",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3823.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3823.patch",
"merged_at": "2024-05-13T13:27:16Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3824
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3824/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3824/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3824/events
|
https://github.com/materialsproject/pymatgen/pull/3824
| 2,291,429,666
|
PR_kwDOACgets5vL2nJ
| 3,824
|
[Not for merge] test monty PR 670
|
{
"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
}
|
[] |
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-05-12T17:34:58
| 2024-05-12T17:51:35
|
2024-05-12T17:50:11Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
{
"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/3824/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/3824/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3824",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3824",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3824.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3824.patch",
"merged_at": null
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3825
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3825/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3825/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3825/events
|
https://github.com/materialsproject/pymatgen/pull/3825
| 2,291,814,147
|
PR_kwDOACgets5vNHzZ
| 3,825
|
Use `isclose` over `==` for overlap position check in `SlabGenerator.get_slabs`
|
{
"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
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5692928617,
"node_id": "LA_kwDOACgets8AAAABU1MyaQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/surfaces",
"name": "surfaces",
"color": "521BBE",
"default": false,
"description": "Surface analysis"
}
] |
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 |
[
"## Outdated\r\n\r\n### Investigating failure of unit test `test_get_slabs`\r\nhttps://github.com/materialsproject/pymatgen/blob/40b0165c7e841df6971b6d2960623a127c20e81c/tests/core/test_surface.py#L439-L455\r\n\r\n`z_ranges`:\r\n```\r\n> old_implementation:\r\n[(0, 0.09444), (0, 0.04316999999999993), (0.09444, 0.16579999999999998), (0.09444, 0.16562), (0.09444, 0.09621999999999999), (0.33418999999999993, 0.40556), (0.33438, 0.40556), (0.4037799999999999, 0.40556), (0.40556, 0.54316), (0.4568200000000001, 0.59443), (0.59443, 0.6657699999999999), (0.59443, 0.59622), (0.59443, 0.6656399999999999), (0.83423, 0.9055699999999998), (0.83436, 0.9055699999999998), (0.90378, 0.9055699999999998), (0.9055699999999998, 1), (0.9568399999999998, 1)]\r\n\r\n> new_implementation:\r\n[(0, 0.09444), (0, 0.04316999999999993), (0.40556, 0.54316), (0.4568200000000001, 0.59443), (0.9055699999999998, 1), (0.9568399999999998, 1)]\r\n\r\n> difference:\r\n[(0.59443, 0.6656399999999999), (0.09444, 0.16562), (0.33438, 0.40556), (0.90378, 0.9055699999999998), (0.4037799999999999, 0.40556), (0.09444, 0.09621999999999999), (0.09444, 0.16579999999999998), (0.59443, 0.59622), (0.83423, 0.9055699999999998), (0.59443, 0.6657699999999999), (0.33418999999999993, 0.40556), (0.83436, 0.9055699999999998)]\r\n```\r\n\r\nGenerated slabs:\r\n[new_3_slabs.zip](https://github.com/materialsproject/pymatgen/files/15319320/new_3_slabs.zip)\r\n[old_2_slabs.zip](https://github.com/materialsproject/pymatgen/files/15319322/old_2_slabs.zip)\r\n\r\n### Reason for more `Slab` generated\r\n\r\nWith the new implementation (`isclose` over `==`), multiple very narrow `z_range`s were filtered, and resulting in one more `Slab` being generated than previous implementation (as terminations would have a lower chance to fall inside a `z_range`, which would be considered breaking a bond).\r\n\r\nHowever I'm not quite sure if checking the `z_range` really make much sense, as it's hard to know whether terminating at a specific z-coordinate really breaks a bond (cannot generate bond-distance just by z-distance). \r\n\r\nIn this case, I might prefer the new implementation to generate more possible `Slabs` and let the user check by their own. Also they could fine-tune the tolerance by the `tol` arg.\r\n\r\n\r\n",
"@janosh Would appreciate it if I could get this reviewed. Thanks!\r\n"
] | 2024-05-13T04:49:06
| 2024-05-31T19:10:30
|
2024-05-30T19:33:50Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Follow up #3748.
- Use `isclose` over `==` for overlap check in `SlabGenerator.get_slabs`
- Add a new `ztol` arg to control the behavior of `get_slabs`, default to `0` to keep consistency with previous behavior
### Use `isclose` over `==` for overlap check in `SlabGenerator.get_slabs`
Previously a `z_range` is neglected only when two coordinates are exactly the same.
https://github.com/materialsproject/pymatgen/blob/578d29ca2e27393c4afe38454b5915a3a984a544/pymatgen/core/surface.py#L1317-L1321
### Need discussion
However I'm not quite sure if checking the `z_range` really make much sense, as it's not possible to know whether terminating at a specific z-coordinate really breaks a bond (cannot calculate bond-distance just by z-distance).
It might be good to implement a method to detect bond broken by distance?
|
{
"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/3825/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/3825/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3825",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3825",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3825.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3825.patch",
"merged_at": "2024-05-30T19:33:50Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3826
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3826/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3826/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3826/events
|
https://github.com/materialsproject/pymatgen/pull/3826
| 2,292,141,806
|
PR_kwDOACgets5vOPZ3
| 3,826
|
Revert to `pytorch` installation with `uv` in CI
|
{
"login": "DanielYang59",
"id": 80093591,
"node_id": "MDQ6VXNlcjgwMDkzNTkx",
"avatar_url": "https://avatars.githubusercontent.com/u/80093591?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DanielYang59",
"html_url": "https://github.com/DanielYang59",
"followers_url": "https://api.github.com/users/DanielYang59/followers",
"following_url": "https://api.github.com/users/DanielYang59/following{/other_user}",
"gists_url": "https://api.github.com/users/DanielYang59/gists{/gist_id}",
"starred_url": "https://api.github.com/users/DanielYang59/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanielYang59/subscriptions",
"organizations_url": "https://api.github.com/users/DanielYang59/orgs",
"repos_url": "https://api.github.com/users/DanielYang59/repos",
"events_url": "https://api.github.com/users/DanielYang59/events{/privacy}",
"received_events_url": "https://api.github.com/users/DanielYang59/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
},
{
"id": 5578251138,
"node_id": "LA_kwDOACgets8AAAABTH1bgg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ci",
"name": "ci",
"color": "4E135C",
"default": false,
"description": "Continuous integration"
}
] |
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 like we still have the issue where `uv` cannot install `torch` randomly. I would report this to `uv` soon.\r\n\r\nTo fix this, we might need to install `torch` and explicitly skip `torch` for `uv`. \r\n\r\nBefore this PR, even after `torch` is already successfully installed by `pip`, calling `uv pip install torch` again would still fail (therefore the random errors we have seen).",
"we're getting \r\n\r\n```\r\npytest: command not found\r\n```\r\n\r\nwhich is not a torch related error message?\r\n\r\nstrange that it only happens on the 1st runner. maybe a race condition? we could try `python -m pytest ...`",
"> we're getting\r\n> \r\n> ```\r\n> pytest: command not found\r\n> ```\r\n> \r\n> which is not a torch related error message?\r\n\r\nIf you look more closely into the log, the failure actually comes from the \"Install pymatgen and dependencies\" stage (for some reason it still passed).\r\n\r\n<img width=\"1028\" alt=\"image\" src=\"https://github.com/materialsproject/pymatgen/assets/80093591/faaf6ac5-9d7c-43ee-ae98-4ad457b004f0\">\r\n\r\n> strange that it only happens on the 1st runner. maybe a race condition? we could try python -m pytest ...\r\n\r\nNot sure. I thought it just fails randomly...No idea why. I don't think it has anything to do with the split itself though.\r\n\r\n[Failed at split 1](https://github.com/materialsproject/pymatgen/actions/runs/9051480913/job/24868047255)\r\n\r\n[Failed at split 5](https://github.com/materialsproject/pymatgen/actions/runs/9050294044/job/24865480113)\r\n\r\n[Failed at split 8](https://github.com/materialsproject/pymatgen/actions/runs/9057174543/job/24880773959)\r\n",
"at least it's no longer failing due to timeouts. looks like now we're hitting this issue https://github.com/astral-sh/uv/issues/2586",
"> at least it's no longer failing due to timeouts. looks like now we're hitting this issue [astral-sh/uv#2586](https://github.com/astral-sh/uv/issues/2586)\r\n\r\nLook like this one. I guess we would need to still install `torch` with `pip`, and somehow prevent `uv` from trying to install `torch` later (not sure how to achieve this though, as `torch` is not a direct dependency of `pymatgen`, but `chgnet`). \r\n\r\nMaybe we could try to install everything but `[optional]` with `uv`, and then use `uv` to install `[optional]` only? I think it's really bad, as the package itself would be installed twice, there should be a better way that I'm not aware of.\r\n\r\nOr, just fall back to slow but reliable `pip` altogether?",
"Also link to #4063, `pip install torch` is taking up 70% of the total dep install time",
"Closing this one in #4100, reason: currently `chgnet` and `matgl` doesn't support Python 3.13, so `torch` would not be required in CI for now."
] | 2024-05-13T08:17:21
| 2024-11-21T03:25:38
|
2024-11-21T03:24:37Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
### Revert to install `torch` with `uv`
Also link to #4063, **`pip install torch` is taking up 70% of the total dep install time**
Revert to `pytorch` installation with `uv` in CI,
- [x] It appears https://github.com/astral-sh/uv/issues/1921 has been resolved.
- [ ] [The following intermittent error](https://github.com/materialsproject/pymatgen/actions/runs/9051480913/job/24868047255) causes false negative CI failures, reported in https://github.com/astral-sh/uv/issues/2586:
```
error: Failed to download distributions
Caused by: Failed to fetch wheel: torch==2.2.1
Caused by: Failed to extract archive
Caused by: error decoding response body
Caused by: request or response body error
Caused by: error reading a body from connection
Caused by: end of file before message length reached
```
- [ ] Also https://github.com/astral-sh/uv/issues/4402.
|
{
"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/3826/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/3826/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3826",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3826",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3826.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3826.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3827
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3827/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3827/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3827/events
|
https://github.com/materialsproject/pymatgen/pull/3827
| 2,293,069,567
|
PR_kwDOACgets5vRb1J
| 3,827
|
Guard `TYPE_CHECKING` only imports
|
{
"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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@janosh. Please review this, thanks.\r\n\r\nWondering if we could automate this checking?",
"> Wondering if we could automate this checking?\r\n\r\n`ruff` has an open issue about implementing this rule which you could upvote and/or leave a comment\r\n\r\nhttps://github.com/astral-sh/ruff/issues/2302",
"this is conflicting now that #3829 is merged",
"I would resolve it now :)",
"Resolved.",
"is the main benefit here meant to be code clarity (by clearly separating type-checking-time only imports)? i don't think we get any speedup since we're importing the `typing` module anyway to use `TYPE_CHECKING`",
"> is the main benefit here meant to be code clarity? that type-checking-time only imports are clearly separated? i don't think we get any speedup since we're importing the `typing` module anyway to get `TYPE_CHECKING`\r\n\r\nI would expect both if we could really complete this task (perhaps after a `ruff` rule is implemented), as I have seen quite some cases where a module is imported just for typing purpose (but it's too time consuming to check every import manually without a proper tool).\r\n\r\nCurrently I'm not sure if importing fewer would bring much benefit though, to be frank, sorry.\r\n\r\nI opened this PR to try if I could identify those manually by running `flake8 --select=TYP001` locally, but it seems it only detects a part of those unguarded imports, and looks like `TYP001` might not be the right rule for this. 😞 \r\n> This rule detects whether you've imported something from typing that's incompatible with your supported Python version.\r\n",
"Thanks for reviewing. And sorry I'm unable to help completely resolve this (guard all imports by `TYPE_CHECKING`)"
] | 2024-05-13T14:53:28
| 2024-05-14T14:59:37
|
2024-05-14T14:54:21Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Guard `TYPE_CHECKING` only imports
- Format docstring to Google style in `io.aims.sets`
### Can we automate this check (and fix)?
`flake8` provides [`TYP001` rule](https://github.com/asottile/flake8-typing-imports) to check this, but doesn't seem able to correct it automatically. Have to run `flake8 --select=TYP001` and fix manually.
`ruff` might [have this implemented](https://github.com/astral-sh/ruff/issues/2096) but I didn't find it in the [available rules](https://docs.astral.sh/ruff/rules/).
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3827/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/3827/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3827",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3827",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3827.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3827.patch",
"merged_at": "2024-05-14T14:54:21Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3828
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3828/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3828/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3828/events
|
https://github.com/materialsproject/pymatgen/pull/3828
| 2,294,030,097
|
PR_kwDOACgets5vUyLi
| 3,828
|
Bump nokogiri from 1.16.2 to 1.16.5 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"
}
] |
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-05-13T23:40:36
| 2024-05-17T17:46:34
|
2024-05-17T17:46:34Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.2 to 1.16.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/releases">nokogiri's releases</a>.</em></p>
<blockquote>
<h2>v1.16.5 / 2024-05-13</h2>
<h3>Security</h3>
<ul>
<li>[CRuby] Vendored libxml2 is updated to address CVE-2024-34459. See <a href="https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-r95h-9x8f-r3f7">GHSA-r95h-9x8f-r3f7</a> for more information.</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] Vendored libxml2 is updated to <a href="https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.7">v2.12.7</a> from v2.12.6. (<a href="https://github.com/flavorjones"><code>@flavorjones</code></a>)</li>
</ul>
<hr />
<p>sha256 checksums:</p>
<pre><code>af0f44fa3e664dfb2aa10de8b551447d720c1e8d1f0aa3f35783dcc43e40a874 nokogiri-1.16.5-aarch64-linux.gem
23dc2357b26409a5c33b7e32a82902f0e9995305420f16d1a03ab3ea1a482fec nokogiri-1.16.5-arm-linux.gem
950d037530edb49f75ad35de0b8038b970a7dda57e2b6326895b0e49fadf6214 nokogiri-1.16.5-arm64-darwin.gem
b7aefc94370c62476b8528e8d8abb6160203abd84a1f4eceda8f1aa8974d9989 nokogiri-1.16.5-java.gem
ec2167160df8fec3137bf95d574ed80ebc1d002bb3b281546b60b4aa9002466e nokogiri-1.16.5-x64-mingw-ucrt.gem
6984200491fac69974005ecfa2de129d61843d345eafa5d6f58e8b908d1cf107 nokogiri-1.16.5-x64-mingw32.gem
abdc389ab1ec6604492da16bd9d06ad746fdb6bd6a1bd274c400d61ffcadb3c4 nokogiri-1.16.5-x86-linux.gem
63d24981345856f2baf7f4089870a62d3042fb8d3021b280fb04fc052532e3c4 nokogiri-1.16.5-x86-mingw32.gem
71b5f54e378c433d13df67c3b71acc4716129da62402d8181f310c4216a63279 nokogiri-1.16.5-x86_64-darwin.gem
0ca238da870066bed2f7837af6f35791bb9b76c4c5638999c46aac44818a6a97 nokogiri-1.16.5-x86_64-linux.gem
ec36162c68984fa0a90a5c4ae7ab7759460639e716cc1ce75f34c3cb54158ad2 nokogiri-1.16.5.gem
</code></pre>
<h2>v1.16.4 / 2024-04-10</h2>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] Vendored zlib in the precompiled native gems is updated to <a href="https://zlib.net/ChangeLog.txt">v1.3.1</a> from v1.3. Nokogiri is not affected by the minizip CVE patched in this version, but this update may satisfy some security scanners. Related, see <a href="https://github.com/sparklemotion/nokogiri/discussions/3168">this discussion</a> about removing the compression libraries altogether in a future version of Nokogiri.</li>
</ul>
<hr />
<p>sha256 checksums:</p>
<pre><code>bdb1dc4378ebcf3ade8f440c7df68f6d76946a1a96c4823a2b4c53c01a320cd5 nokogiri-1.16.4-aarch64-linux.gem
0c994b9996d5576eddcc3201a94ef2bff6fc3627c4ae4d2708b0ec9b9743ec6a nokogiri-1.16.4-arm-linux.gem
8e86abb64c93c06d3c588042a0e757279e8f1dc88b5210a00be892a9a7a27196 nokogiri-1.16.4-arm64-darwin.gem
bf84fa28be4943692bd64772186e0832fb1061f80714ccb93e111e9d72b1cadc nokogiri-1.16.4-java.gem
a46808467c1f63a2031e1ca0715cd5336bb4ec759e9c0e2f4c951c1cc30994ae nokogiri-1.16.4-x64-mingw-ucrt.gem
4cdf64bc5e9443ec3e0b595347ecc8affe21968d9ae934c0825d26630ef96468 nokogiri-1.16.4-x64-mingw32.gem
d86d21bae47dd9f6f5223055e45d33fae08b0b89aad94cbc0ece4f4274fa7af5 nokogiri-1.16.4-x86-linux.gem
d488b872884844686780fda7cf5da44ee884d32faa713a55aeb4736d76718168 nokogiri-1.16.4-x86-mingw32.gem
a896e52a56951ffb0e6a9279afbf485d683e357a053d27f4cfcb2a73b0824628 nokogiri-1.16.4-x86_64-darwin.gem
92ff4f09910255fec84b3bc4c4b182e94cada3ed12b9f7a6ea058e0af186fb31 nokogiri-1.16.4-x86_64-linux.gem
</tr></table>
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md">nokogiri's changelog</a>.</em></p>
<blockquote>
<h2>v1.16.5</h2>
<h3>Security</h3>
<ul>
<li>[CRuby] Vendored libxml2 is updated to address CVE-2024-34459. See <a href="https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-r95h-9x8f-r3f7">GHSA-r95h-9x8f-r3f7</a> for more information.</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] Vendored libxml2 is updated to <a href="https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.7">v2.12.7</a> from v2.12.6. (<a href="https://github.com/flavorjones"><code>@flavorjones</code></a>)</li>
</ul>
<h2>v1.16.4 / 2024-04-10</h2>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] Vendored zlib in the precompiled native gems is updated to <a href="https://zlib.net/ChangeLog.txt">v1.3.1</a> from v1.3. Nokogiri is not affected by the minizip CVE patched in this version, but this update may satisfy some security scanners. Related, see <a href="https://github.com/sparklemotion/nokogiri/discussions/3168">this discussion</a> about removing the compression libraries altogether in a future version of Nokogiri.</li>
</ul>
<h2>v1.16.3 / 2024-03-15</h2>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] Vendored libxml2 is updated to <a href="https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.6">v2.12.6</a> from v2.12.5. (<a href="https://github.com/flavorjones"><code>@flavorjones</code></a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>[CRuby] <code>XML::Reader</code> sets the <code>@encoding</code> instance variable during reading if it is not passed into the initializer. Previously, it would remain <code>nil</code>. The behavior of <code>Reader#encoding</code> has not changed. This works around changes to how libxml2 reports the encoding used in v2.12.6.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/cd70bd3dc9e0dc15b04b42d67b639eb5804e77d5"><code>cd70bd3</code></a> version bump to v1.16.5</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/afc36de553085b6b397b23a0c09a2449655a3a47"><code>afc36de</code></a> dep: update vendored libxml2 to v2.12.7 (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3191">#3191</a>)</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/41b4f0846d2c264b48ef93ecd034dd230ab8125a"><code>41b4f08</code></a> ci: add arm64-darwin coverage using macos-14</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/67b9e863a67164ae6ffbe5ed4cc482267db7c436"><code>67b9e86</code></a> dep: update libxml2 to v2.12.7</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/17c0362082341208bf9aadb61939e4de74005b44"><code>17c0362</code></a> version bump to v1.16.4</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/1c329e9c09148155624b52ffe630cc1b01d6787f"><code>1c329e9</code></a> dep: update to zlib 1.3.1 (v1.16.x) (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3175">#3175</a>)</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/edeac07bb21b3f00c2a6aaf27806ce9d0871a08d"><code>edeac07</code></a> dep: update to zlib 1.3.1</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/80fb6085c069e053457ed6f6325ac032f2b029fe"><code>80fb608</code></a> version bump to v1.16.3</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/710bd96d70f39baadd0405cf0f3c0c42805019af"><code>710bd96</code></a> dep: update libxml 2.12.6 (branch v1.16.x) (<a href="https://redirect.github.com/sparklemotion/nokogiri/issues/3151">#3151</a>)</li>
<li><a href="https://github.com/sparklemotion/nokogiri/commit/461a96ea163b144ea2898d088efe65fce311d5be"><code>461a96e</code></a> fix: Reader#read sets <a href="https://github.com/encoding"><code>@encoding</code></a> if it is unset</li>
<li>Additional commits viewable in <a href="https://github.com/sparklemotion/nokogiri/compare/v1.16.2...v1.16.5">compare view</a></li>
</ul>
</details>
<br />
[](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/3828/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/3828/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3828",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3828",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3828.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3828.patch",
"merged_at": "2024-05-17T17:46:34Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3829
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3829/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3829/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3829/events
|
https://github.com/materialsproject/pymatgen/pull/3829
| 2,294,286,310
|
PR_kwDOACgets5vVqaa
| 3,829
|
Add types for `core.(molecular_orbitals|operations|sites|spectrum|tensor|xcfunc)`
|
{
"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
}
|
[
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"For some reason, replacing the magic `__hash__` method of `SymmOp` in bf2a953acfdd3f48a4c379b7030b3c897e43c8bf breaks a unit test of `core.structure` (`test_from_prototype`):\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/51180fc2ef7ae4208ac244d820f05ce17d57f9c2/pymatgen/core/operations.py#L92-L93\r\n\r\nThere must be something in it that depends on the hash that I'm not aware of, and I totally have no idea why. ",
"Thanks for reviewing. Do you have any comments on https://github.com/materialsproject/pymatgen/pull/3829#issuecomment-2109700595?",
"not sure how the `SymmOP.__hash__` comes into play in that test. you could modify this assert to print actual and expected string to see how they differ\r\n\r\n```diff\r\n- assert str(struct) == expected_struct_str\r\n+ assert str(struct) == expected_struct_str, f\"{struct=}, {expected_struct_str=}\"\r\n```",
"Thanks for the suggestion, this is what I got:\r\n```python\r\n> print(struct)\r\nFull Formula (Li4 Cl4)\r\nReduced Formula: LiCl\r\nabc : 2.560000 2.560000 2.560000\r\nangles: 90.000000 90.000000 90.000000\r\npbc : True True True\r\nSites (8)\r\n # SP a b c\r\n--- ---- --- --- ---\r\n 0 Li 0 0 0\r\n 1 Li 0 0.5 0.5\r\n 2 Li 0.5 0 0.5\r\n 3 Li 0.5 0.5 0\r\n 4 Cl 0 0.5 0.5\r\n 5 Cl 0.5 0 0.5\r\n 6 Cl 0 0 0\r\n 7 Cl 0.5 0.5 0\r\n\r\n> print(expected_struct_str)\r\nFull Formula (Li4 Cl4)\r\nReduced Formula: LiCl\r\nabc : 2.560000 2.560000 2.560000\r\nangles: 90.000000 90.000000 90.000000\r\npbc : True True True\r\nSites (8)\r\n # SP a b c\r\n--- ---- --- --- ---\r\n 0 Li 0 0 0\r\n 1 Li 0.5 0.5 0\r\n 2 Li 0.5 0 0.5\r\n 3 Li 0 0.5 0.5\r\n 4 Cl 0.5 0 0.5\r\n 5 Cl 0 0.5 0.5\r\n 6 Cl 0.5 0.5 0\r\n 7 Cl 0 0 0\r\n```\r\n\r\nLooks like the ordering of sites changed, and I don't quite know how hash of `SymmOp` is related to generation of `Structure`. I would look closer later :)"
] | 2024-05-14T03:27:52
| 2024-05-14T13:41:08
|
2024-05-14T13:20:20Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Add/improve types for `core`
- Replace hard-coded class call with `type(self)`
- Replace all `[0:x]` with `[:x]`
### Add types for remaining part of `core`, follow up of #3814.
- [x] `core.molecular_orbitals`
- [x] `core.operations`
- [x] `core.sites`
- [x] `core.spectrum`
- [x] `core.tensor`
- [x] `core.xcfunc`
### PR too large, following separated to another PR
- [ ] `core.structure`
- [ ] `core.units`
- [ ] `core.trajectory`
- Use `type(self)` to avoid hard-coded class name in `__eq__` and similar methods
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3829/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/3829/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3829",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3829",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3829.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3829.patch",
"merged_at": "2024-05-14T13:20:20Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3830
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3830/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3830/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3830/events
|
https://github.com/materialsproject/pymatgen/issues/3830
| 2,295,757,954
|
I_kwDOACgets6I1nyC
| 3,830
|
A minor document error in `POTCAR Setup`.
|
{
"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
}
|
[
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
}
] |
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-05-14T15:14:01
| 2024-05-17T13:21:46
|
2024-05-17T13:21:46Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
The document [here](https://pymatgen.org/installation.html#potcar-setup) says:
> In practice, this entire process might look something like the following:
>
> ```
> pmg config -p /path/to/pseudos/potcar_PBE.54/ /path/to/pseudos/pmg_potcars/
> pmg config -p /path/to/pseudos/potcar_LDA.54/ /path/to/pseudos/pmg_potcars/
> pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars/pmg_potcars
> ```
But in fact, the last line above should be stated as follows:
`pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars`
Regards,
Zhao
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3830/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/3830/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3831
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3831/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3831/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3831/events
|
https://github.com/materialsproject/pymatgen/pull/3831
| 2,297,424,286
|
PR_kwDOACgets5vgZdG
| 3,831
|
Move test structures out of `util` directory
|
{
"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
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
}
] |
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 reviewing.\r\n\r\nMeanwhile I would say `uv install torch` seems to have a higher and higher failure rate for some reason. We have always been seeing it to fail. Should we consider revert to slower but more reliable `pip`? ",
"we're already installing it with `pip`. maybe there's a flag in `uv pip install` to tell it to ignore packages which are already installed? just to confirm, currently `uv` tries to install `pytorch` again?\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/daa5c75573862aae3fbc0fc1a1ed421791dc603f/.github/workflows/test.yml#L73",
"> we're already installing it with `pip`. \r\n\r\nYes we are.\r\n\r\n> maybe there's a flag in `uv pip install` to tell it to ignore packages which are already installed? just to confirm, currently `uv` tries to install `pytorch` again?\r\n\r\nI'm not aware of such arg, but I would do some research and let you know. \r\n\r\nI don't know how `uv/pip` works under the hood, but to detect installed packages, `uv` seems to need to same search process just like install, and once this failed, the install stage would fail. \r\n\r\nSo you are right, we need to explicitly tell `uv` to ignore `torch`, we cannot let it detect itself \r\n"
] | 2024-05-15T10:02:15
| 2024-05-15T12:18:41
|
2024-05-15T11:51:39Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Move test structures out of `util` directory
We might need a better name for the directory?
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3831/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/3831/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3831",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3831",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3831.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3831.patch",
"merged_at": "2024-05-15T11:51:39Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3832
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3832/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3832/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3832/events
|
https://github.com/materialsproject/pymatgen/pull/3832
| 2,300,282,259
|
PR_kwDOACgets5vqQ2V
| 3,832
|
Improve type annotations for `core.(trajectory/units)`
|
{
"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
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"Can I have this one reviewed please? @janosh ",
"Thanks for reviewing! Appreciate that."
] | 2024-05-16T12:32:54
| 2024-05-17T14:26:36
|
2024-05-17T13:23:54Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Summary
- Improve type annotations for `core.trajectory` and `core.units`
- Nest `_get_si_unit` and `_check_mappings` inside the only methods that call them in `Unit`
### Extend the following to support argument "unit" as both `str` and `Unit`
- `__init/new__` of `FloatWithUnit` and `ArrayWithUnit`
- `get_conversion_factor` of `Unit`, and `to` methods of `FloatWithUnit` and `ArrayWithUnit`
The type hint suggests `str`, docstring suggest `Unit` and implementation seems to handle **partially** of both.
https://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/core/units.py#L295-L305
Might be good to support both for more flexibility, without sacrificing backwards compatibility.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3832/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/3832/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3832",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3832",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3832.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3832.patch",
"merged_at": "2024-05-17T13:23:54Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3833
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3833/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3833/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3833/events
|
https://github.com/materialsproject/pymatgen/issues/3833
| 2,300,380,960
|
I_kwDOACgets6JHQcg
| 3,833
|
Incorrect letter cases for memory in `core.units`
|
{
"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-05-16T13:16:46
| 2024-06-17T15:25:38
|
2024-06-17T15:25:38Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
It appears the case for [multiple-byte units](https://en.wikipedia.org/wiki/Byte) for memory is incorrect. And we should be aware that `b/B` refer to `bit/byte` respectively.
https://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/core/units.py#L77-L87
|
{
"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/3833/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/3833/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3834
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3834/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3834/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3834/events
|
https://github.com/materialsproject/pymatgen/pull/3834
| 2,300,620,433
|
PR_kwDOACgets5vrbaX
| 3,834
|
Fix the minor document error in `POTCAR Setup`.
|
{
"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
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5456916296,
"node_id": "LA_kwDOACgets8AAAABRUHvSA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/docs",
"name": "docs",
"color": "35B067",
"default": false,
"description": "Documentation, examples, user guides"
}
] |
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 think these paths look correct to me, perhaps I'm wrong.\r\n\r\nThe `potcar_PBE/LDA.54/` in the first two paths refers to the directory where the POTCARs are stored.\r\n\r\nThe last path looks a bit confusing, perhaps:\r\n```diff\r\n- pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars/pmg_potcars\r\n+ pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars/POTCARs\r\n```\r\n",
"> For the last path looks a bit confusing, perhaps:\r\n> \r\n> ```diff\r\n> - pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars/pmg_potcars\r\n> + pmg config --add PMG_VASP_PSP_DIR /path/to/pseudos/pmg_potcars/POTCARs\r\n> ```\r\n\r\nNo. The `PMG_VASP_PSP_DIR` must point to the top directory of `potcars` generated by `pmg`, aka, the `pmg_potcars` directory used here.\r\n\r\nIn my case, the relevant configuration and test information are as follows, for your reference only:\r\n\r\n```shell\r\nwerner@x13dai-t:~$ cat ~/.pmgrc.yaml\r\nPMG_DEFAULT_FUNCTIONAL: PBE_64\r\nPMG_MAPI_KEY: <my-MAPI_KEY>\r\nPMG_VASP_PSP_DIR: /home/werner/Public/hpc/vasp/pot/pmg_potcar\r\n\r\nwerner@x13dai-t:~$ ls -l ~/Public/hpc/vasp/pot/pmg_potcar\r\ntotal 28\r\ndrwxrwxr-x 2 werner werner 12288 2月 3 16:43 POT_LDA_PAW_64\r\ndrwxrwxr-x 2 werner werner 16384 2月 3 16:43 POT_PAW_PBE_64\r\n\r\nwerner@x13dai-t:~$ pyenv shell datasci \r\n(datasci) werner@x13dai-t:~$ ipython\r\nPython 3.11.1 (main, Dec 22 2022, 17:06:07) [GCC 12.2.0]\r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 8.14.0 -- An enhanced Interactive Python. Type '?' for help.\r\nInstalled qt5 event loop hook.\r\nShell is already running a gui event loop for qt5. Call with no arguments to disable the current loop.\r\n\r\nIn [1]: from mp_api.client import MPRester\r\n ...: from pymatgen.io.vasp.sets import MPRelaxSet\r\n ...: with MPRester() as mpr:\r\n ...: structure = mpr.get_structure_by_material_id(\"mp-2469\")\r\n ...: relax_set = MPRelaxSet(structure)\r\n ...: relax_set.user_potcar_functional = \"PBE_64\" # Specifically designate the POTCAR functional as P\r\n ...: BE_64\r\n ...: try:\r\n ...: potcar_symbols = relax_set.potcar_symbols\r\n ...: print(\"Successfully prepared POTCAR metadata with PBE_64 functional. Here are the symbols:\")\r\n ...: \r\n ...: print(potcar_symbols)\r\n ...: except Exception as e:\r\n ...: print(f\"Error occurred while attempting to prepare POTCAR metadata: {e}\")\r\n ...: \r\nRetrieving MaterialsDoc documents: 100%|███████████████████████████████| 1/1 [00:00<00:00, 19508.39it/s]\r\nSuccessfully prepared POTCAR metadata with PBE_64 functional. Here are the symbols:\r\n['Cd', 'S']\r\n```\r\n\r\nThe corresponding source code implementation is here:\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/14b7357d373c1eae88a3ca014fb14ffba44df75f/pymatgen/io/vasp/inputs.py#L2269-L2307\r\n\r\nSee [here](https://github.com/materialsproject/pymatgen/issues/3600#issuecomment-1925240086) for the related discussion.",
"Make sense to me, sorry for the stupid question (I'm not an activate user of the pmg cli tool).\r\n",
"thanks @hongyi-zhao for reporting and fixing! 👍 "
] | 2024-05-16T14:47:09
| 2024-05-18T01:22:46
|
2024-05-17T13:19:02Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
closes https://github.com/materialsproject/pymatgen/issues/3830. see there for more details.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3834/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/3834/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3834",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3834",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3834.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3834.patch",
"merged_at": "2024-05-17T13:19:01Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3835
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3835/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3835/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3835/events
|
https://github.com/materialsproject/pymatgen/pull/3835
| 2,301,305,902
|
PR_kwDOACgets5vtyXy
| 3,835
|
Update VASP input sets for `atomate2` compatibility
|
{
"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
}
|
[
{
"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"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 5457867742,
"node_id": "LA_kwDOACgets8AAAABRVBz3g",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/breaking",
"name": "breaking",
"color": "41396E",
"default": false,
"description": "Breaking change"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
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 |
[
"All makes sense to me! ",
"@janosh, I will try to review soon. ",
"@janosh As I told you before, pls consult before making this kind of cosmetic stuff. Otherwise, you are going to be doing a lot of redundant work. Given that most people just jump to the relevant class in the IDE, why would this split be needed?",
"> Given that most people just jump to the relevant class in the IDE, why would this split be needed?\r\n\r\nas i wrote in the commit, huge files are harder to navigate (even with IDEs). if that weren't the case, there'd be no need for packages anywhere else in `pymatgen`. e.g. i could ask why not have all of `pymatgen.core` in a single file? do you see an issue, given this is not breaking?",
"@janosh The issue is you not *consulting* before making this change.\r\n\r\n1. The sets are a logical set of functionality. It is ridiculous to claim that just because sets are in one file then the whole of pymatgen should be in one big file.\r\n2. The sets.py was by no means that large. Certainly no larger than something like numpy.linalg. \r\n3. Even if we took a mind to split it up, the way you did it is not the best way of organization. For example, there is no reason why the submodules, which is an implementation detail, need to be public. That is but one issue I have with the organization. Too many for me to want to spend the effort to type it out here.\r\n4. Finally, even if this is a good idea and should be done, do it in ANOTHER PR. You are polluting a simple PR here with a massive cosmetic change that is unrelated.\r\n\r\nI repeat again - it is a question of consultation. Learn to do it. For now, revert your commits in this PR. We settle this PR before dealing with the separate question of roganization.",
"Thanks for putting this together @esoteric-ephemera! A big step forward for consistency of `InputSet`s. I left one comment on `VaspInputSet`; otherwise I defer to others here.",
"@janosh I asked for the splitting of sets to be removed from this PR. Do this first. Otherwise this is just holding up the entire PR. The PR is not to be merged with the broken up sets.",
"@janosh it would be very helpful to see the exact changes in this PR to all sets. With the split, it is really hard to trace the changes.",
"@esoteric-ephemera I am tired of waiting. If you don't hear back from @janosh by tomorrow morning, I would appreciate if you can revert the split and/or resubmit a PR with the exact changes to the input sets. I will then merge your changes first. I apologize on behalf of the maintainers for any inconvenience and will take action to make sure this never happens again.",
"@shyuep no need for a separate PR. lot of meetings today, hence the delay. i still think the split of `sets.py` is a sensible change and should be done in a subsequent PR. i'll go ahead and save my commits into a separate branch and then rebase this branch to remove them here, then reapply @esoteric-ephemera's subsequent changes to `sets.py`. will require a force push. any opposition to that please voice it in the next 10 mins"
] | 2024-05-16T20:43:47
| 2024-06-04T20:41:29
|
2024-05-23T14:39:05Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
This PR continues #3484 by updating the `pymatgen.io.vasp.DictSet` class to include features from the former atomate2 `VaspInputGenerator` class.
This allows transitioning `atomate2` to exclusively use `pymatgen` input sets in https://github.com/materialsproject/atomate2/pull/854.
These added features (such as `auto_lreal` and `auto_ispin`) are initialized to values for which they won't trigger in existing PMG classes, and are thus non-breaking.
Some of the logic in `DictSet` had to be reordered for consistency with its implementation in atomate2, but these changes appear to be non-breaking. Additionally, some checks (like ensuring that KSPACING and KPOINTS are not both set by the user) have been corrected. In the previous example, pymatgen would only check that `user_kpoints_settings` was not `None`, however `user_kpoints_settings = user_kpoints_settings or {}` occurs immediately before this check, thus potentially erroneously flagging calculations with no `user_kpoints_settings`.
The only potentially breaking change is to the initialization of MAGMOMs. I've made any MAGMOMs set in `user_incar_settings` the first choice (as in atomate2) before pymatgen searches for MAGMOMs in the input set's config, etc. The subsequent MAGMOM search order is the same.
Per atomate2 issue [#724](https://github.com/materialsproject/atomate2/issues/724), one of the added features to `DictSet` is `auto_metal_kpoints` / `reciprocal_density_metal` tag in KPOINTS. This lets the user set a higher kpoint density for a metal while still using KPOINTS, rather than KSPACING.
There was also a minor bug in the `MatPESStaticSet` that would warn the user that the POTCAR functional was set incorrectly - that has been corrected.
Tagging @utf, @Andrew-S-Rosen, @JaGeo, @mkhorton, and @rkingsbury as they have been involved in developing these sets and/or atomate2.
|
{
"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/3835/reactions",
"total_count": 5,
"+1": 4,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3835/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3835",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3835",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3835.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3835.patch",
"merged_at": "2024-05-23T14:39:05Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3836
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3836/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3836/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3836/events
|
https://github.com/materialsproject/pymatgen/pull/3836
| 2,301,322,001
|
PR_kwDOACgets5vt1-H
| 3,836
|
Bump rexml from 3.2.5 to 3.2.8 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"
}
] |
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-05-16T20:53:24
| 2024-05-17T17:46:06
|
2024-05-17T17:46:05Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.5 to 3.2.8.
<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.2.8 - 2024-05-16</h2>
<h3>Fixes</h3>
<ul>
<li>Suppressed a warning</li>
</ul>
<h2>REXML 3.2.7 - 2024-05-16</h2>
<h3>Improvements</h3>
<ul>
<li>
<p>Improve parse performance by using <code>StringScanner</code>.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/106">GH-106</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/107">GH-107</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/108">GH-108</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/109">GH-109</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/112">GH-112</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/113">GH-113</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/114">GH-114</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/115">GH-115</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/116">GH-116</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/117">GH-117</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/118">GH-118</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/119">GH-119</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/121">GH-121</a></p>
</li>
<li>
<p>Patch by NAITOH Jun.</p>
</li>
</ul>
</li>
<li>
<p>Improved parse performance when an attribute has many <code><</code>s.</p>
<ul>
<li><a href="https://redirect.github.com/ruby/rexml/issues/124">GH-124</a></li>
</ul>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>XPath: Fixed a bug of <code>normalize_space(array)</code>.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/110">GH-110</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/111">GH-111</a></p>
</li>
<li>
<p>Patch by flatisland.</p>
</li>
</ul>
</li>
<li>
<p>XPath: Fixed a bug that wrong position is used with nested path.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/110">GH-110</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/122">GH-122</a></p>
</li>
<li>
<p>Reported by jcavalieri.</p>
</li>
<li>
<p>Patch by NAITOH Jun.</p>
</li>
</ul>
</li>
<li>
<p>Fixed a bug that an exception message can't be generated for
invalid encoding XML.</p>
</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.2.8 - 2024-05-16 {#version-3-2-8}</h2>
<h3>Fixes</h3>
<ul>
<li>Suppressed a warning</li>
</ul>
<h2>3.2.7 - 2024-05-16 {#version-3-2-7}</h2>
<h3>Improvements</h3>
<ul>
<li>
<p>Improve parse performance by using <code>StringScanner</code>.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/106">GH-106</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/107">GH-107</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/108">GH-108</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/109">GH-109</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/112">GH-112</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/113">GH-113</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/114">GH-114</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/115">GH-115</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/116">GH-116</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/117">GH-117</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/118">GH-118</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/119">GH-119</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/121">GH-121</a></p>
</li>
<li>
<p>Patch by NAITOH Jun.</p>
</li>
</ul>
</li>
<li>
<p>Improved parse performance when an attribute has many <code><</code>s.</p>
<ul>
<li><a href="https://redirect.github.com/ruby/rexml/issues/124">GH-124</a></li>
</ul>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>XPath: Fixed a bug of <code>normalize_space(array)</code>.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/110">GH-110</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/111">GH-111</a></p>
</li>
<li>
<p>Patch by flatisland.</p>
</li>
</ul>
</li>
<li>
<p>XPath: Fixed a bug that wrong position is used with nested path.</p>
<ul>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/110">GH-110</a></p>
</li>
<li>
<p><a href="https://redirect.github.com/ruby/rexml/issues/122">GH-122</a></p>
</li>
<li>
<p>Reported by jcavalieri.</p>
</li>
<li>
<p>Patch by NAITOH Jun.</p>
</li>
</ul>
</li>
<li>
<p>Fixed a bug that an exception message can't be generated for</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/ruby/rexml/commit/1cf37bab79d61d6183bbda8bf525ed587012b718"><code>1cf37ba</code></a> Add 3.2.8 entry</li>
<li><a href="https://github.com/ruby/rexml/commit/b67081caa807fad48d31983137b7ed8711e7f0df"><code>b67081c</code></a> Remove an unused variable (<a href="https://redirect.github.com/ruby/rexml/issues/128">#128</a>)</li>
<li><a href="https://github.com/ruby/rexml/commit/94e180e939baff8f7e328a287bb96ebbd99db6eb"><code>94e180e</code></a> Suppress a warning</li>
<li><a href="https://github.com/ruby/rexml/commit/d574ba5fe1c40adbafbf16e47533f4eb32b43e60"><code>d574ba5</code></a> ci: install only gems required for running tests (<a href="https://redirect.github.com/ruby/rexml/issues/129">#129</a>)</li>
<li><a href="https://github.com/ruby/rexml/commit/4670f8fc187c89d0504d027ea997959287143453"><code>4670f8f</code></a> Add missing Thanks section</li>
<li><a href="https://github.com/ruby/rexml/commit/9ba35f9f032c07c39b8c86536ac13a9cb313bef2"><code>9ba35f9</code></a> Bump version</li>
<li><a href="https://github.com/ruby/rexml/commit/085def07425561862d8329001168d8bc9c75ae8f"><code>085def0</code></a> Add 3.2.7 entry</li>
<li><a href="https://github.com/ruby/rexml/commit/4325835f92f3f142ebd91a3fdba4e1f1ab7f1cfb"><code>4325835</code></a> Read quoted attributes in chunks (<a href="https://redirect.github.com/ruby/rexml/issues/126">#126</a>)</li>
<li><a href="https://github.com/ruby/rexml/commit/e77365e2d1c9cdb822c7e09b05fc5a4903d92c23"><code>e77365e</code></a> Exclude older than 2.6 on macos-14</li>
<li><a href="https://github.com/ruby/rexml/commit/bf2c8edb5facb206c25a62952aa37218793283e6"><code>bf2c8ed</code></a> Move development dependencies to Gemfile (<a href="https://redirect.github.com/ruby/rexml/issues/124">#124</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/ruby/rexml/compare/v3.2.5...v3.2.8">compare view</a></li>
</ul>
</details>
<br />
[](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/3836/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/3836/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3836",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3836",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3836.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3836.patch",
"merged_at": "2024-05-17T17:46:05Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3837
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3837/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3837/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3837/events
|
https://github.com/materialsproject/pymatgen/pull/3837
| 2,302,876,693
|
PR_kwDOACgets5vzJwG
| 3,837
|
Improve type annotations for `core.structure`
|
{
"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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@janosh Can you please review this? Thanks.",
"Thanks for reviewing and the tweaks!",
"Hello,\r\nToday I ran into an issue while using pymatgen 2024.5.31, that I think might be related to this contribution. I am using a fresh conda environment, python 3.11, with pymatgen installed via `pip install pymatgen`. I get an error when trying to import from `pymatgen.core.structure`:\r\n```\r\n>>> from pymatgen.core import Structure\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"~\\AppData\\Local\\miniconda3\\envs\\test311\\Lib\\site-packages\\pymatgen\\core\\__init__.py\", line 17, in <module>\r\n from pymatgen.core.structure import IMolecule, IStructure, Molecule, PeriodicNeighbor, SiteCollection, Structure\r\n File \"~\\AppData\\Local\\miniconda3\\envs\\test311\\Lib\\site-packages\\pymatgen\\core\\structure.py\", line 39, in <module>\r\n from typing_extensions import Self\r\nModuleNotFoundError: No module named 'typing_extensions'\r\n```\r\nIf I then install `typing-extensions` separately, things seem to work fine. In v2024.5.31's `setup.py` I see that `typing-extensions` is listed under `extras_require[\"dev\"]`. My understanding of `setup.py` is limited though. Should I install pymatgen in a different way?\r\nThank you in advance.",
"Hi @wortelboer thanks for asking and sorry for the trouble caused, I forgot to guard a `typing_extensions` import, and I'm [asking Shyue to yank current release](https://github.com/materialsproject/pymatgen/pull/3852#issuecomment-2146432156) and issue a new one to fix this. You could manually install `typing-extensions` for now, until a new release is up."
] | 2024-05-17T14:16:56
| 2024-06-04T12:32:32
|
2024-05-25T07:54:32Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Improve type annotations for `core.structure`
- Fix some `type: ignore[reportPossiblyUnboundVariable]`
#### A question from me:
What is the difference between `np.ndarray`, `ArrayLike` and `NDArray` for typing?
```python
ArrayLike: type[Buffer] | type[_SupportsArray[dtype[Any]]] | type[_NestedSequence[_SupportsArray[dtype[Any]]]] | type[bool] | type[int] | type[float] | type[complex] | type[str] | type[bytes] | type[_NestedSequence[bool | int | float | complex | str | bytes]]
NDArray: type[ndarray[Any, dtype[_ScalarType_co@NDArray]]]
```
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3837/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/3837/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3837",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3837",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3837.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3837.patch",
"merged_at": "2024-05-25T07:54:32Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3838
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3838/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3838/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3838/events
|
https://github.com/materialsproject/pymatgen/pull/3838
| 2,303,830,659
|
PR_kwDOACgets5v2ace
| 3,838
|
[Deprecation] Correct cases for memory units in `core.units` and fix `unit_type` detection of `FloatWithUnit.from_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 |
[
"@shyuep Can I have your advice on this please? This should be very similar to the change to `Element`, and I scheduled the same grace period until `2025-01-01`",
"@shyuep Can you please review this? It should be very similar to #3817.\r\n\r\nThe rationale for this change is that something like `KB` (kilobyte) and `kb`(kilobit) refer to different units for memory (or storage in general), and as such it should not be case insensitive.\r\n",
"This is fine. I am enabling auto-merge. There was a failing test that needs to be fixed.",
"Thanks. I notice that too https://github.com/materialsproject/pymatgen/commit/e572d34b206f48a43fe102a1c46e0532a60ff7de#r143073539, perhaps we also want to rename the `id` argument to avoid shadowing the builtin in https://github.com/materialsproject/pymatgen/commit/e572d34b206f48a43fe102a1c46e0532a60ff7de#r143131235? ",
"Thanks. I renamed id to id_",
"Thanks!"
] | 2024-05-18T03:46:18
| 2024-06-18T12:10:56
|
2024-06-17T15:25:37Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Correct cases for memory units in `core.units` to fix #3833
- Fix `FloatWithUnit.from_str` to correctly detect `unit_type` from string with space between the value and the unit
### Correct cases for memory units in `core.units`
I assume this is another breaking fix, so I marked the incorrect units as deprecated until `2025-01-01`. Any suggestion would be appreciated.
Currently the case of `byte` is incorrect in `core.units`, where [`B` refers to "byte" and `b` refers to "bit"](https://en.wikipedia.org/wiki/Byte).
Also note `1 byte = 8 bit` so we cannot use them interchangeably.
https://github.com/materialsproject/pymatgen/blob/bb68c780834fea588f35420e1835ed3b21894a44/pymatgen/core/units.py#L77-L83
#### Case sensitivity for memory units
I assume there is no good reason to remove case sensitivity for `memory` **alone** (case sensitivity of other units is maintained), especially when the case of `memory` has its meaning:
https://github.com/materialsproject/pymatgen/blob/14b7357d373c1eae88a3ca014fb14ffba44df75f/pymatgen/core/units.py#L90-L91
### Fix `FloatWithUnit.from_str` to correctly detect `unit_type` from string with space between value and unit
Previously for a string with space (which adheres to the [SI Unit rules](https://physics.nist.gov/cuu/Units/checklist.html)) like `Memory.from_str("1 MB")`, the string would be split into `1` and ` MB`, and the space in ` MB` prevents the `unit_type` being detected properly and ended up being `None`.
```python
from pymatgen.core.units import Memory
mem_0 = Memory.from_str("1MB")
print(mem_0.unit_type) # >>> "memory"
mem_1 = Memory.from_str("1 MB")
print(mem_1.unit_type) # >>> None
```
|
{
"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/3838/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/3838/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3838",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3838",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3838.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3838.patch",
"merged_at": "2024-06-17T15:25:37Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3839
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3839/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3839/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3839/events
|
https://github.com/materialsproject/pymatgen/issues/3839
| 2,304,861,664
|
I_kwDOACgets6JYWXg
| 3,839
|
GaussianOutput.read_excitation_energies() method for obtaining TDDFT results ([(energie (eV), lambda (nm), oscillatory strength), ... ]) error
|
{
"login": "xinglong-zhang",
"id": 20577099,
"node_id": "MDQ6VXNlcjIwNTc3MDk5",
"avatar_url": "https://avatars.githubusercontent.com/u/20577099?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xinglong-zhang",
"html_url": "https://github.com/xinglong-zhang",
"followers_url": "https://api.github.com/users/xinglong-zhang/followers",
"following_url": "https://api.github.com/users/xinglong-zhang/following{/other_user}",
"gists_url": "https://api.github.com/users/xinglong-zhang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/xinglong-zhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xinglong-zhang/subscriptions",
"organizations_url": "https://api.github.com/users/xinglong-zhang/orgs",
"repos_url": "https://api.github.com/users/xinglong-zhang/repos",
"events_url": "https://api.github.com/users/xinglong-zhang/events{/privacy}",
"received_events_url": "https://api.github.com/users/xinglong-zhang/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-05-20T00:38:35
| 2024-05-20T00:38:35
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.10.8
### Pymatgen version
2023.7.20
### Operating system version
MacOS Sonoma 14.4.1
### Current behavior
In the attached Gaussian .log file, there are lines such as following:
> Excited State 1: 2.316-A 0.7744 eV 1601.13 nm f=0.0084 <S**2>=1.091
where the spin multiplicity in front of the symmetry (2.316-A) is a float, rather than a string such in other cases as "Singlet-A" or "Triplet-A"
In the pymatgen code, therefore, the GaussianOutput.read_excitation_energies() method will, for this line, obtain the following result:
"(2.316, 0.7744, 1601.13)"
instead of the desired result:
"(0.7744, 1601.13, 0.0084)" corresponding to (energie (eV), lambda (nm), oscillatory strength), respectively.
This is due to lines 1316 to 1318 of pymatgen.io.gaussian.py where the Excited state line is searched for the pattern of floats.
### Expected Behavior
For the following line in the attached Gaussian .log file:
> Excited State 1: 2.316-A 0.7744 eV 1601.13 nm f=0.0084 <S**2>=1.091
One should obtain "(0.7744, 1601.13, 0.0084)" corresponding to (energie (eV), lambda (nm), oscillatory strength), respectively.
### Minimal example
```Python
from pymatgen.io.gaussian import GaussianOutput
class TestGaussian16Output:
def test_normal_termination_with_forces_and_frequencies(self, td_outputfile): # filepath to the attached file
assert os.path.exists(td_outputfile)
g16_output = GaussianOutput(filename=td_outputfile)
print(g16_output.read_excitation_energies())
```
### Relevant files to reproduce this bug
[pop1_ketone_model_opt_radical_anion_r1s50_gas_run2.log](https://github.com/materialsproject/pymatgen/files/15371355/pop1_ketone_model_opt_radical_anion_r1s50_gas_run2.log)
|
{
"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/3839/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/3839/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3840
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3840/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3840/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3840/events
|
https://github.com/materialsproject/pymatgen/issues/3840
| 2,306,537,516
|
I_kwDOACgets6Jevgs
| 3,840
|
Adapt LobsterSets to latest potcars
|
{
"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
}
|
[
{
"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 |
[
"I think only [the incremental set](https://github.com/JaGeo/LobsterPy/issues/306#issuecomment-2191633777) needs to be generated and provided.",
"If you want to do it, you are surely invited to do so. I am happy to check.",
"I need to study the logic behind [your script](https://github.com/JaGeo/LobsterPy/issues/306#issuecomment-2191682629) before it's possible to extend it to these latest standard versions of POTCAR or [GW potentials](https://www.vasp.at/wiki/index.php/Available_pseudopotentials#GW_potentials)."
] | 2024-05-20T18:30:55
| 2024-06-26T23:11:52
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Feature Requested
Make the LobsterSets available to the latest Potcars
### Proposed Solution
Adapt the Lobstersets and create a new yaml file for optimal bas functions.
### Relevant Information
None
|
{
"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/3840/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/3840/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3842
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3842/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3842/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3842/events
|
https://github.com/materialsproject/pymatgen/pull/3842
| 2,307,390,465
|
PR_kwDOACgets5wCOq4
| 3,842
|
Bump requests from 2.31.0 to 2.32.0
|
{
"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": 5452530206,
"node_id": "LA_kwDOACgets8AAAABRP8CHg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/python",
"name": "python",
"color": "2b67c6",
"default": false,
"description": "Pull requests that update Python 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-05-21T06:05:02
| 2024-05-30T19:33:08
|
2024-05-30T19:33:08Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/psf/requests/releases">requests's releases</a>.</em></p>
<blockquote>
<h2>v2.32.0</h2>
<h2>2.32.0 (2024-05-20)</h2>
<h2>🐍 PYCON US 2024 EDITION 🐍</h2>
<p><strong>Security</strong></p>
<ul>
<li>Fixed an issue where setting <code>verify=False</code> on the first request from a
Session will cause subsequent requests to the <em>same origin</em> to also ignore
cert verification, regardless of the value of <code>verify</code>.
(<a href="https://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56">https://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56</a>)</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li><code>verify=True</code> now reuses a global SSLContext which should improve
request time variance between first and subsequent requests. It should
also minimize certificate load time on Windows systems when using a Python
version built with OpenSSL 3.x. (<a href="https://redirect.github.com/psf/requests/issues/6667">#6667</a>)</li>
<li>Requests now supports optional use of character detection
(<code>chardet</code> or <code>charset_normalizer</code>) when repackaged or vendored.
This enables <code>pip</code> and other projects to minimize their vendoring
surface area. The <code>Response.text()</code> and <code>apparent_encoding</code> APIs
will default to <code>utf-8</code> if neither library is present. (<a href="https://redirect.github.com/psf/requests/issues/6702">#6702</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed bug in length detection where emoji length was incorrectly
calculated in the request content-length. (<a href="https://redirect.github.com/psf/requests/issues/6589">#6589</a>)</li>
<li>Fixed deserialization bug in JSONDecodeError. (<a href="https://redirect.github.com/psf/requests/issues/6629">#6629</a>)</li>
<li>Fixed bug where an extra leading <code>/</code> (path separator) could lead
urllib3 to unnecessarily reparse the request URI. (<a href="https://redirect.github.com/psf/requests/issues/6644">#6644</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Requests has officially added support for CPython 3.12 (<a href="https://redirect.github.com/psf/requests/issues/6503">#6503</a>)</li>
<li>Requests has officially added support for PyPy 3.9 and 3.10 (<a href="https://redirect.github.com/psf/requests/issues/6641">#6641</a>)</li>
<li>Requests has officially dropped support for CPython 3.7 (<a href="https://redirect.github.com/psf/requests/issues/6642">#6642</a>)</li>
<li>Requests has officially dropped support for PyPy 3.7 and 3.8 (<a href="https://redirect.github.com/psf/requests/issues/6641">#6641</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<p><strong>Packaging</strong></p>
<ul>
<li>Requests has started adopting some modern packaging practices.
The source files for the projects (formerly <code>requests</code>) is now located
in <code>src/requests</code> in the Requests sdist. (<a href="https://redirect.github.com/psf/requests/issues/6506">#6506</a>)</li>
<li>Starting in Requests 2.33.0, Requests will migrate to a PEP 517 build system
using <code>hatchling</code>. This should not impact the average user, but extremely old
versions of packaging utilities may have issues with the new packaging format.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/matthewarmand"><code>@matthewarmand</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/6258">psf/requests#6258</a></li>
<li><a href="https://github.com/cpzt"><code>@cpzt</code></a> made their first contribution in <a href="https://redirect.github.com/psf/requests/pull/6456">psf/requests#6456</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/psf/requests/blob/main/HISTORY.md">requests's changelog</a>.</em></p>
<blockquote>
<h2>2.32.0 (2024-05-20)</h2>
<p><strong>Security</strong></p>
<ul>
<li>Fixed an issue where setting <code>verify=False</code> on the first request from a
Session will cause subsequent requests to the <em>same origin</em> to also ignore
cert verification, regardless of the value of <code>verify</code>.
(<a href="https://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56">https://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56</a>)</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li><code>verify=True</code> now reuses a global SSLContext which should improve
request time variance between first and subsequent requests. It should
also minimize certificate load time on Windows systems when using a Python
version built with OpenSSL 3.x. (<a href="https://redirect.github.com/psf/requests/issues/6667">#6667</a>)</li>
<li>Requests now supports optional use of character detection
(<code>chardet</code> or <code>charset_normalizer</code>) when repackaged or vendored.
This enables <code>pip</code> and other projects to minimize their vendoring
surface area. The <code>Response.text()</code> and <code>apparent_encoding</code> APIs
will default to <code>utf-8</code> if neither library is present. (<a href="https://redirect.github.com/psf/requests/issues/6702">#6702</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed bug in length detection where emoji length was incorrectly
calculated in the request content-length. (<a href="https://redirect.github.com/psf/requests/issues/6589">#6589</a>)</li>
<li>Fixed deserialization bug in JSONDecodeError. (<a href="https://redirect.github.com/psf/requests/issues/6629">#6629</a>)</li>
<li>Fixed bug where an extra leading <code>/</code> (path separator) could lead
urllib3 to unnecessarily reparse the request URI. (<a href="https://redirect.github.com/psf/requests/issues/6644">#6644</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Requests has officially added support for CPython 3.12 (<a href="https://redirect.github.com/psf/requests/issues/6503">#6503</a>)</li>
<li>Requests has officially added support for PyPy 3.9 and 3.10 (<a href="https://redirect.github.com/psf/requests/issues/6641">#6641</a>)</li>
<li>Requests has officially dropped support for CPython 3.7 (<a href="https://redirect.github.com/psf/requests/issues/6642">#6642</a>)</li>
<li>Requests has officially dropped support for PyPy 3.7 and 3.8 (<a href="https://redirect.github.com/psf/requests/issues/6641">#6641</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<p><strong>Packaging</strong></p>
<ul>
<li>Requests has started adopting some modern packaging practices.
The source files for the projects (formerly <code>requests</code>) is now located
in <code>src/requests</code> in the Requests sdist. (<a href="https://redirect.github.com/psf/requests/issues/6506">#6506</a>)</li>
<li>Starting in Requests 2.33.0, Requests will migrate to a PEP 517 build system
using <code>hatchling</code>. This should not impact the average user, but extremely old
versions of packaging utilities may have issues with the new packaging format.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/psf/requests/commit/d6ebc4a2f1f68b7e355fb7e4dd5ffc0845547f9f"><code>d6ebc4a</code></a> v2.32.0</li>
<li><a href="https://github.com/psf/requests/commit/9a40d1277807f0a4f26c9a37eea8ec90faa8aadc"><code>9a40d12</code></a> Avoid reloading root certificates to improve concurrent performance (<a href="https://redirect.github.com/psf/requests/issues/6667">#6667</a>)</li>
<li><a href="https://github.com/psf/requests/commit/0c030f78d24f29a459dbf39b28b4cc765e2153d7"><code>0c030f7</code></a> Merge pull request <a href="https://redirect.github.com/psf/requests/issues/6702">#6702</a> from nateprewitt/no_char_detection</li>
<li><a href="https://github.com/psf/requests/commit/555b870eb19d497ddb67042645420083ec8efb02"><code>555b870</code></a> Allow character detection dependencies to be optional in post-packaging steps</li>
<li><a href="https://github.com/psf/requests/commit/d6dded3f00afcf56a7e866cb0732799045301eb0"><code>d6dded3</code></a> Merge pull request <a href="https://redirect.github.com/psf/requests/issues/6700">#6700</a> from franekmagiera/update-redirect-to-invalid-uri-test</li>
<li><a href="https://github.com/psf/requests/commit/bf24b7d8d17da34be720c19e5978b2d3bf94a53b"><code>bf24b7d</code></a> Use an invalid URI that will not cause httpbin to throw 500</li>
<li><a href="https://github.com/psf/requests/commit/2d5f54779ad174035c5437b3b3c1146b0eaf60fe"><code>2d5f547</code></a> Pin 3.8 and 3.9 runners back to macos-13 (<a href="https://redirect.github.com/psf/requests/issues/6688">#6688</a>)</li>
<li><a href="https://github.com/psf/requests/commit/f1bb07d39b74d6444e333879f8b8a3d9dd4d2311"><code>f1bb07d</code></a> Merge pull request <a href="https://redirect.github.com/psf/requests/issues/6687">#6687</a> from psf/dependabot/github_actions/github/codeql-act...</li>
<li><a href="https://github.com/psf/requests/commit/60047ade64b0b882cbc94e047198818ab580911e"><code>60047ad</code></a> Bump github/codeql-action from 3.24.0 to 3.25.0</li>
<li><a href="https://github.com/psf/requests/commit/31ebb8102c00f8cf8b396a6356743cca4362e07b"><code>31ebb81</code></a> Merge pull request <a href="https://redirect.github.com/psf/requests/issues/6682">#6682</a> from frenzymadness/pytest8</li>
<li>Additional commits viewable in <a href="https://github.com/psf/requests/compare/v2.31.0...v2.32.0">compare view</a></li>
</ul>
</details>
<br />
[](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/3842/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/3842/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3842",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3842",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3842.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3842.patch",
"merged_at": "2024-05-30T19:33:08Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3843
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3843/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3843/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3843/events
|
https://github.com/materialsproject/pymatgen/issues/3843
| 2,308,586,992
|
I_kwDOACgets6Jmj3w
| 3,843
|
Support parsing of NBANDS from a VASP OUTCAR file
|
{
"login": "Andrew-S-Rosen",
"id": 8674072,
"node_id": "MDQ6VXNlcjg2NzQwNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Andrew-S-Rosen",
"html_url": "https://github.com/Andrew-S-Rosen",
"followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers",
"following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}",
"gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions",
"organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs",
"repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos",
"events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}",
"received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 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 |
[
"Thanks for suggesting this, I'm currently working on this.\r\n"
] | 2024-05-21T15:38:02
| 2024-12-11T02:01:56
|
2024-12-11T02:01:56Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Feature Requested
In VASP, the NBANDS parameter describes the number of bands. It can be modified on-the-fly by VASP, potentially even overriding the setting chosen by the user. This is done based on the number of cores requested for the calculation. Therefore, knowing the NBANDS VASP actually uses is quite useful. This information is available in the OUTCAR but is not currently parsed. We should add support for this as an attribute of `pymatgen.io.vasp.outputs.Outcar` (see below).
### Proposed Solution
In Custodian, we have a block of code that looks like:
```python
nbands = None
with open(os.path.join(directory, "OUTCAR")) as file:
for line in file:
# Have to take the last NBANDS line since sometimes VASP
# updates it automatically even if the user specifies it.
# The last one is marked by NBANDS= (no space).
if "NBANDS=" in line:
try:
d = line.split("=")
nbands = int(d[-1].strip())
break
except (IndexError, ValueError):
pass
```
We can basically port this over to Pymatgen's `pymatgen.io.vasp.outputs.Outcar` class as a `.nbands` attribute (and then remove the code block from Custodian).
### Relevant Information
_No response_
|
{
"login": "shyuep",
"id": 577107,
"node_id": "MDQ6VXNlcjU3NzEwNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shyuep",
"html_url": "https://github.com/shyuep",
"followers_url": "https://api.github.com/users/shyuep/followers",
"following_url": "https://api.github.com/users/shyuep/following{/other_user}",
"gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shyuep/subscriptions",
"organizations_url": "https://api.github.com/users/shyuep/orgs",
"repos_url": "https://api.github.com/users/shyuep/repos",
"events_url": "https://api.github.com/users/shyuep/events{/privacy}",
"received_events_url": "https://api.github.com/users/shyuep/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3843/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/3843/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3844
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3844/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3844/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3844/events
|
https://github.com/materialsproject/pymatgen/issues/3844
| 2,312,701,099
|
I_kwDOACgets6J2QSr
| 3,844
|
determine crystal space group error
|
{
"login": "baigeiguai",
"id": 73783785,
"node_id": "MDQ6VXNlcjczNzgzNzg1",
"avatar_url": "https://avatars.githubusercontent.com/u/73783785?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/baigeiguai",
"html_url": "https://github.com/baigeiguai",
"followers_url": "https://api.github.com/users/baigeiguai/followers",
"following_url": "https://api.github.com/users/baigeiguai/following{/other_user}",
"gists_url": "https://api.github.com/users/baigeiguai/gists{/gist_id}",
"starred_url": "https://api.github.com/users/baigeiguai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/baigeiguai/subscriptions",
"organizations_url": "https://api.github.com/users/baigeiguai/orgs",
"repos_url": "https://api.github.com/users/baigeiguai/repos",
"events_url": "https://api.github.com/users/baigeiguai/events{/privacy}",
"received_events_url": "https://api.github.com/users/baigeiguai/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 tried following your procedure and could not convert the file using ASE 3.23\r\n\r\n```\r\n File \"/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py\", line 876, in spacegroup_from_data\r\n spg = Spacegroup(symbol, None, datafile)\r\n File \"/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py\", line 132, in __init__\r\n _read_datafile(self, spacegroup, setting, fd)\r\n File \"/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py\", line 692, in _read_datafile\r\n _skip_to_blank(f, spacegroup, setting)\r\n File \"/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py\", line 593, in _skip_to_blank\r\n raise SpacegroupNotFoundError(\r\nase.spacegroup.spacegroup.SpacegroupNotFoundError: invalid spacegroup `P6 m m m`, setting `None` not found in data base\r\n\r\n```\r\n\r\nAlso, as a general note, depending on the tolerance you set for ase, pymatgen, phonopy, etc, you get a different result. If your precision is 0.001 you get P6/mmm and if your precision is 0.0001 then you get P6/m. \r\n\r\n```python\r\nfrom pymatgen.core import Structure\r\nfrom pymatgen.symmetry.analyzer import SpacegroupAnalyzer\r\n\r\nstructure = Structure.from_file('787088.cif')\r\n\r\nhigh_sym_spacegroup = SpacegroupAnalyzer(structure, symprec=0.0001).get_space_group_symbol()\r\nlow_sym_spacegroup = SpacegroupAnalyzer(structure, symprec=0.01).get_space_group_symbol()\r\n\r\nprint(high_sym_spacegroup) # P6/m\r\nprint(low_sym_spacegroup) # P6/mmm\r\n```"
] | 2024-05-23T11:44:24
| 2024-08-04T23:29:42
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.11.4
### Pymatgen version
2023.12.18
### Operating system version
Rocky Linux 9.2
### Current behavior
The cif file of the crystal YUTYOC is recognized as the P/6mmm space group category when it is parsed, but the P6mm space group category is marked in the cif file.My code is following.
### Expected Behavior
unknown,maybe P6mm or P/6mmm. I want to know why P/6mmm and is it right ?
### Minimal example
```Python
from pymatgen.io.cif import CifParser
# before parsing the file ,I do
# ase convert xxx.cif xxx.POSCAR
# to transfrom the cif to poscar file
# and then use CifParser to parse POSCAR file
parser = CifParser(file_path,occupancy_tolerance=100,site_tolerance=100)
structure = parser.parse_structures()[0]
print(structure)
```
### Relevant files to reproduce this bug
YUTYOC CIF download link: [https://www.ccdc.cam.ac.uk/structures/Search?Ccdcid=787088&DatabaseToSearch=Published](url)
|
{
"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/3844/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/3844/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3845
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3845/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3845/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3845/events
|
https://github.com/materialsproject/pymatgen/issues/3845
| 2,315,891,763
|
I_kwDOACgets6KCbQz
| 3,845
|
Incorrect SpaceGroup symbol attribute for 16 space group types
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/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 |
[
"It affects the Materials Project website as well. ",
"Before @kaueltzen starts to correct it, we would like to ask for feedback on this as this will be a breaking change with potentially major effects. The symbol is clearly wrong. Nevertheless, people work with the wrong symbol. \r\n\r\n@shyuep @janosh, thoughts?\r\n\r\n\r\nAny thoughs from MP side: @munrojm @tschaume @yang-ruoxi ?\r\n\r\nThanks in advance.\r\n",
"@shyuep ?",
"We will start fixing it tomorrow as it is a major bug. Please let us know by end of this day if you object.",
"@JaGeo thanks for tagging us. We're good with the change from MP's side.",
"Actually, there are still open questions and I would appreciate feedback on them by @shyuep or @janosh :\r\n\r\nIf we decide on the standard Hermann-Mauguin symbol as the `symbol` attribute, the seven rhombohedral space group types would not contain information on their setting anymore (R-centered hexagonal cell or primitive rhombohedral cell). In this case, the current implementation of the `is_compatible()` method would not behave as previously as the appended \":H\"/\":R\" is not part of the Hermann-Mauguin symbol and all rhombohedral space group types would always be evaluated as in the rhombohedral setting. \r\nOne solution could be to add a `hexagonal` bool parameter to the `init` of `SpaceGroup` as it is already done in the classmethod `from_int_number()`. What do you think?\r\n\r\nAlso, I have a question regarding the `init`:\r\nhttps://github.com/materialsproject/pymatgen/blob/74e692b0186ec77881acd3adbf1bbefeea8ca096/pymatgen/symmetry/groups.py#L232\r\n\r\nThe `point_group` attribute may be set as `spg[\"schoenflies\"]`. However, this key seems generally to refer to the Schoenflies space group (not point group) notation. By removing the superscript, one would arrive at the corresponding point group symbol and I would suggest this change.\r\n\r\nAlso, regarding SYMMOPS.json: the key `\"crystal_class\"` does not refer to the actual crystal class but for some entries to the crystal system, for some entries to the lattice system (or both if identical). Although this key is not used right now, I would highly recommend correcting it in case it is going to be used in the future and decide on whether to include a crystal system or lattice system key. What are your thoughts?\r\n\r\nThanks in advance (:",
"Hi all, \r\n\r\nWe are also happy to just correct these issues according to @kaueltzen 's suggestions. It will, however, be a breaking change. But as this seems wrong, we should correct it.",
"question for @kaueltzen and @JaGeo: the `SpaceGroup.symbol` [is documented](https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.groups.SpaceGroup.symbol) to return the full HM symbol but as reported in https://github.com/spglib/moyo/issues/83, it actually returns the short symbol for all but the 13 triclinic space groups. did you also notice this inconsistency? is there any reason for keeping that?\neither way, @shyuep the docs need correcting and/or the attribute changed to actually return the full HM symbol"
] | 2024-05-24T17:27:03
| 2025-03-02T15:00:55
|
2024-07-14T19:30:29Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.10
### Pymatgen version
2024.5.1 or master
### Operating system version
_No response_
### Current behavior
output of minimal example:
```
48 Pnnn1
50 Pban1
59 Pmmn1
68 Ccce1
70 Fddd1
85 P4/n1
125 P4/nbm1
126 P4/nnc1
129 P4/nmm1
130 P4/ncc1
201 Pn-31
203 Fd-31
222 Pn-3n1
224 Pn-3m1
227 Fd-3m1
228 Fd-3c1
16
```
### Expected Behavior
For the minimal example provided below I would expect `len(err)` to be zero, meaning that every SpaceGroup symbol attribute provides a valid string that can be used to instantiate again a SpaceGroup object.
However, this is not the case for 16 space group types (see above). They all differ from their correct Hermann Mauguin symbol by an additionally appended "1" (resulting even in an impossible fourth symmetry direction / blickrichtung for most of them).
The symbol attribute is set here
https://github.com/materialsproject/pymatgen/blob/74e692b0186ec77881acd3adbf1bbefeea8ca096/pymatgen/symmetry/groups.py#L226
I am not sure what the "universal" Hermann Mauguin symbol (`"universal_h_m"` key) and the additional `:1` represents and why the key `"hermann_mauguin"` is not used instead, but the current code gives wrong space group symbols in 16 cases.
### Minimal example
```Python
from pymatgen.symmetry.groups import SpaceGroup
err = []
for sg_num in range(1, 231):
sg = SpaceGroup.from_int_number(sg_num)
sg_symbol = sg.symbol
try:
SpaceGroup(sg_symbol)
except ValueError as e:
print(sg_num, sg_symbol)
err.append(sg_num)
print(len(err))
```
### 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/3845/reactions",
"total_count": 3,
"+1": 3,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3845/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3846
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3846/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3846/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3846/events
|
https://github.com/materialsproject/pymatgen/pull/3846
| 2,320,933,856
|
PR_kwDOACgets5wwiQr
| 3,846
|
`pandas.read_csv`: replace deprecated `delim_whitespace=True` with `sep="\s+"`
|
{
"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
}
|
[
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
},
{
"id": 5687218601,
"node_id": "LA_kwDOACgets8AAAABUvwRqQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/deprecation",
"name": "deprecation",
"color": "B0FEB6",
"default": false,
"description": "Code deprecations"
},
{
"id": 6295406162,
"node_id": "LA_kwDOACgets8AAAABdzxGUg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/lammps",
"name": "lammps",
"color": "E1B502",
"default": false,
"description": "Pymatgen LAMMPS interface"
}
] |
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-05-28T12:24:20
| 2024-05-29T08:05:50
|
2024-05-28T21:11:36Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Major changes:
- fix 1: Replace deprecated `delim_whitespace=True` with `sep="\s+"` (see https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html)
## 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": "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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3846/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/3846/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3846",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3846",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3846.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3846.patch",
"merged_at": "2024-05-28T21:11:36Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3847
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3847/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3847/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3847/events
|
https://github.com/materialsproject/pymatgen/issues/3847
| 2,321,689,300
|
I_kwDOACgets6KYirU
| 3,847
|
Why does OUTCAR only parse the final magnetic moments?
|
{
"login": "matthewkuner",
"id": 82329282,
"node_id": "MDQ6VXNlcjgyMzI5Mjgy",
"avatar_url": "https://avatars.githubusercontent.com/u/82329282?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/matthewkuner",
"html_url": "https://github.com/matthewkuner",
"followers_url": "https://api.github.com/users/matthewkuner/followers",
"following_url": "https://api.github.com/users/matthewkuner/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewkuner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/matthewkuner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewkuner/subscriptions",
"organizations_url": "https://api.github.com/users/matthewkuner/orgs",
"repos_url": "https://api.github.com/users/matthewkuner/repos",
"events_url": "https://api.github.com/users/matthewkuner/events{/privacy}",
"received_events_url": "https://api.github.com/users/matthewkuner/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 |
[
"No objection from me. Does anyone know if the VASP developers have included this information in the vasprun.xml now as well?"
] | 2024-05-28T18:34:36
| 2024-05-29T17:35:15
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
https://github.com/materialsproject/pymatgen/blob/d0ad785f9b4e9a57717ef2c56eef19ceb8e90c25/pymatgen/io/vasp/outputs.py#L1771
OUTCARs (typically) print out the magnetic moments for each atom at the end of _each_ ionic step. Wouldn't that information be useful to store for every ionic step?
|
{
"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/3847/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/3847/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3848
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3848/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3848/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3848/events
|
https://github.com/materialsproject/pymatgen/pull/3848
| 2,325,036,501
|
PR_kwDOACgets5w-hz0
| 3,848
|
Simplify case handling in `lobster.inputs`
|
{
"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
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
},
{
"id": 6043913731,
"node_id": "LA_kwDOACgets8AAAABaD7OAw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/lobster",
"name": "lobster",
"color": "F51A76",
"default": false,
"description": "Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction)"
}
] |
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 |
[
"@JaGeo Can you please review this? And let me know if there is any concern, thanks :)",
"Maybe next week. Sorry!",
"> Maybe next week. Sorry!\r\n\r\nAll good. No worries at all, whenever you have time :)",
"> @JaGeo Can you please review this? And let me know if there is any concern, thanks :)\r\n\r\nI could also review it on the weekend :)",
"@QuantumChemist Sure. Thank you!!! \r\n\r\nI would love to have a final look before we merge it as it is so important for all our LOBSTER workflows and to avoid breakages here 😅",
"> @QuantumChemist Sure. Thank you!!!\r\n> \r\n> I would love to have a final look before we merge it as it is so important for all our LOBSTER workflows and to avoid breakages here 😅\r\n\r\nOf course. My review would be additionally :)",
"\r\n> I could also review it on the weekend :)\r\n\r\nThat would be hugely appreciated :) Let me know if you find anything suspicious.",
"Do we have further concerns? @JaGeo @QuantumChemist If not I might ping Janosh for reviewing?",
"@DanielYang59 I don't have time at the moment. I would really appreciate that we merge this very carefully to avoid any breakages - especially also of Lobster workflows in atomate2.",
"Sure no rush at all. Let's leave it until you have time to review :)",
"Thanks @DanielYang59 for understanding. I really appreciate your work here but cannot keep up with the pace. Sorry!",
"All good, I'm not in a rush at all :) Just tagging it to make everything organized. Thanks!",
"> Do we have further concerns? @JaGeo @QuantumChemist If not I might ping Janosh for reviewing?\r\n\r\nI don't see any more things that require changes. I could check if it breaks LobsterPy's functionality over the weekend (this or the next ones). Sorry, I'm also too busy to test the changes in depth atm.",
"> I don't see any more things that require changes. I could check if it breaks LobsterPy's functionality over the weekend (this or the next ones). Sorry, I'm also too busy to test the changes in depth atm.\r\n\r\nNo worries, that would be very helpful too :)\r\n\r\n",
"- [x] Run atomate2 and lobsterpy tests with Python 3.12\r\n- [x] Run atomate2 and lobsterpy tests with Python 3.11\r\n\r\n\r\n(I am working on it - it just takes a while. Afterwards, it is good to merge from my side.)",
"It's fine. The Lobster tests in atomate2 and LobsterPy tests are all passing. From my side, it is ready to merge.",
"Thanks for the test :) I would ping @janosh for final review."
] | 2024-05-30T08:18:24
| 2024-06-09T01:55:02
|
2024-06-08T15:39:40Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Simplify case handling in `lobster.inputs`
- [**Potentially breaking**] Rename class variable `LISTKEYWORDS` to `LIST_KEYWORDS` for consistency.
#### Use `{lowercase: camalCase}` to simplify key case handling, for the following methods:
Now lower-case keys are used internally, and Camel case keys are reserved in case of writing (good looking) output files.
- magic `dict` methods
- `from_file`
- `write_lobsterin`: Also use it to recover the key case.
- `diff`
#### TODOs
- [x] Update available `lobsterin` keywords
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3848/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/3848/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3848",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3848",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3848.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3848.patch",
"merged_at": "2024-06-08T15:39:40Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3849
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3849/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3849/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3849/events
|
https://github.com/materialsproject/pymatgen/issues/3849
| 2,326,150,459
|
I_kwDOACgets6Kpj07
| 3,849
|
Species.full_electronic_structure is incorrect
|
{
"login": "rkingsbury",
"id": 1908695,
"node_id": "MDQ6VXNlcjE5MDg2OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1908695?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rkingsbury",
"html_url": "https://github.com/rkingsbury",
"followers_url": "https://api.github.com/users/rkingsbury/followers",
"following_url": "https://api.github.com/users/rkingsbury/following{/other_user}",
"gists_url": "https://api.github.com/users/rkingsbury/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rkingsbury/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rkingsbury/subscriptions",
"organizations_url": "https://api.github.com/users/rkingsbury/orgs",
"repos_url": "https://api.github.com/users/rkingsbury/repos",
"events_url": "https://api.github.com/users/rkingsbury/events{/privacy}",
"received_events_url": "https://api.github.com/users/rkingsbury/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 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 would add a NotImplemented for Specie unitl someone wants to take a crack at implementing this for Species. It is non-trivial since there are some special rules for removing electrons, especially things related to d10 configs.",
"Thanks for the quick action @shyuep . I'll see about following up on this. It appears all the electronic structure info is encoded in the .json file, so this is just a matter of re-ordering some of the strings in that file to follow the proper energy ordering.\r\n\r\n(The ordering issue in #3850 , that is)"
] | 2024-05-30T17:06:03
| 2024-05-30T18:27:32
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.10.6
### Pymatgen version
2024.5.1
### Operating system version
Ubuntu (Windows WSL2)
### Current behavior
`Species.full_electronic_structure` and `electronic_structure` do not properly account for the number of electrons when an oxidation state other than zero is assigned, for example, Fe(0) and Fe(+3) should not have the same electronic configuration:
```python
>>> Species('Fe',0).full_electronic_structure
[(1, 's', 2),
(2, 's', 2),
(2, 'p', 6),
(3, 's', 2),
(3, 'p', 6),
(3, 'd', 6),
(4, 's', 2)]
>>> Species('Fe',0).electronic_structure
'[Ar].3d6.4s2'
>>> Species('Fe',3).full_electronic_structure
[(1, 's', 2),
(2, 's', 2),
(2, 'p', 6),
(3, 's', 2),
(3, 'p', 6),
(3, 'd', 6),
(4, 's', 2)]
>>> Species('Fe',3).electronic_structure
'[Ar].3d6.4s2'
```
### Expected Behavior
Assigning a nonzero oxidation state to a `Species` should modify its electronic configuration, e.g.
```
>>> Species('Fe',3).electronic_structure
'[Ar].3d5'
```
The same goes for `valence`:
```
>>> Species('Fe',0).valence
(2, 6)
>>> Species('Fe',3).valence
(2, 6)
```
### Minimal example
_No response_
### Relevant files to reproduce this bug
_No response_
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3849/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/3849/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3850
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3850/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3850/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3850/events
|
https://github.com/materialsproject/pymatgen/issues/3850
| 2,326,160,413
|
I_kwDOACgets6KpmQd
| 3,850
|
electronic_structure energy ordering is incorrect
|
{
"login": "rkingsbury",
"id": 1908695,
"node_id": "MDQ6VXNlcjE5MDg2OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1908695?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rkingsbury",
"html_url": "https://github.com/rkingsbury",
"followers_url": "https://api.github.com/users/rkingsbury/followers",
"following_url": "https://api.github.com/users/rkingsbury/following{/other_user}",
"gists_url": "https://api.github.com/users/rkingsbury/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rkingsbury/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rkingsbury/subscriptions",
"organizations_url": "https://api.github.com/users/rkingsbury/orgs",
"repos_url": "https://api.github.com/users/rkingsbury/repos",
"events_url": "https://api.github.com/users/rkingsbury/events{/privacy}",
"received_events_url": "https://api.github.com/users/rkingsbury/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 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 |
[
"See also #3849 , which is related",
"Upon further research, both NIST and the CRC handbook list electronic structures _without_ reference to energy ordering (e.g., '[Kr].4d10.5s2'), so the existing behavior in `pymatgen` should probably be left as-is.\r\n\r\nA future PR will improve the documentation of this point (with reference to the NIST database) and also address #3849 "
] | 2024-05-30T17:10:46
| 2024-06-14T21:15:15
|
2024-06-14T21:14:35Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.10.6
### Pymatgen version
2024.5.1
### Operating system version
Ubuntu (Windows WSL2)
### Current behavior
the `full_electronic_structure` and `electronic_structure` properties of `Element` and `Species` do not correctly order energy levels. For example, the 4s orbital has a lower energy than 3d in transition metals, but this is not reflected in the pymatgen properties
```python
>>> Species('Cd',0).full_electronic_structure
[(1, 's', 2),
(2, 's', 2),
(2, 'p', 6),
(3, 's', 2),
(3, 'p', 6),
(3, 'd', 10),
(4, 's', 2),
(4, 'p', 6),
(4, 'd', 10),
(5, 's', 2)]
```
```python
>>> Species('Cd',0).electronic_structure
'[Kr].4d10.5s2'
```
### Expected Behavior
Electronic configuration should be given with the proper energy ordering of orbitals, including exceptions to the Madelung rule where relevant. See https://ptable.com/#Electrons/Expanded for examples of the commonly accepted configurations. In the case of Cd presented above, the electron configuration is given by pymatgen as
`'[Kr].4d10.5s2'`
but should be written
`'[Kr].5s2.4d10'`
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3850/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/3850/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3851
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3851/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3851/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3851/events
|
https://github.com/materialsproject/pymatgen/pull/3851
| 2,326,349,628
|
PR_kwDOACgets5xDDGt
| 3,851
|
Fix energy ordering of electronic configurations for Elements and Species
|
{
"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 |
[
"Note: due to 'prettifying' the .json file, the full diff is not very useful. I suggest viewing the changes associated only with the 2nd commit and/or using https://jsondiff.com/ to see exactly which values I changed.",
"~~This change seems to have caused some problems with `get_crystal_field_spin`, causing a few test failures. Can anyone offer insight into how this should be modified (I'm not familiar with this method)~~\r\n\r\n```\r\n # taken from get_crystal_field_spin\r\n elec = species.element.full_electronic_structure\r\n if len(elec) < 4 or elec[-1][1] != \"s\" or elec[-2][1] != \"d\":\r\n> raise AttributeError(f\"Invalid element {species.symbol} for crystal field calculation.\")\r\nE AttributeError: Invalid element Ti for crystal field calculation.\r\n```\r\n\r\nEDIT: OK, I think I corrected all the tests that were affected by ordering of orbitals.\r\n",
"Thanks for fixing @rkingsbury, happy to merge this but could you add a reference to the docstring? If it was something peer-reviewed even better. Noting this [NIST reference](https://physics.nist.gov/cgi-bin/ASD/ie.pl?spectra=H-DS+i&units=1&at_num_out=on&el_name_out=on&shells_out=on&level_out=on&e_out=0&unc_out=on&biblio=on) too via https://en.wikipedia.org/wiki/Electron_configurations_of_the_elements_(data_page)\r\n\r\nSeparate to this PR, I wonder if the periodic table file might be better stored as yaml so we can include in-line comments.",
"> might be better stored as yaml so we can include in-line comments\r\n\r\nyes please! that would be great",
"> Thanks for fixing @rkingsbury, happy to merge this but could you add a reference to the docstring? If it was something peer-reviewed even better. Noting this [NIST reference](https://physics.nist.gov/cgi-bin/ASD/ie.pl?spectra=H-DS+i&units=1&at_num_out=on&el_name_out=on&shells_out=on&level_out=on&e_out=0&unc_out=on&biblio=on) too via https://en.wikipedia.org/wiki/Electron_configurations_of_the_elements_(data_page)\r\n\r\nWill do! I will add [this NIST reference](https://math.nist.gov/DFTdata/atomdata/configuration.html) as well, which also includes first cations. There seem to be a small number of cases where the ion configuration is NOT the same as that of the next lowest element. I'll investigate and either modify the docstring of the `Species` methods and/or add logic to catch those cases.\r\n\r\n",
"## The plot thickens\r\n\r\n@mkhorton I've added a reference to the NIST resource you found, which is among the best available (I think) and includes a well formatted citation. However, reviewing this data raised two points that may complicate this PR:\r\n\r\n1. In the NIST data, electron configuration is _not_ ordered by energy level. For example, the electron config for Fe is listed as `[Ar]3d64s2 ` even though the 4s2 electrons have lower energy. Personally I think we should list them in order of increasing energy level in pymatgen because 1) the string then contains more information and 2) many other sources (such as, ptable.com) do list them sorted by energy level, and 3) it helps guide intuition about which electron(s) may ionize first. However, it's fair to discuss this point.\r\n\r\n2. The NIST data also has electron configurations for ions. This is great, but it showed that my initial assumption in, e.g. `Species.get_electronic_structure` to return the electron configuration of an isoelectronic atom was not a good one. Although it works OK for s and p orbitals, when d electrons are involved it appears that ions lose their _s_ electrons before d. For example, the correct configuration for `Fe+3` is `[Ar]3_d_5`, while the configuration of isoelectronic `V(0)` is `[Ar]3_d_5` \r\n\r\nPoint 2) begs the question of how best to handle this within `pymatgen`. The best (but labor-intensive) solution would be to:\r\n- add the ionized electronic configurations to `periodic_table.json` for at least all of the common oxidation states of every element. \r\n- Fall back to the isoelectronic treatment and issue a warning for other oxidation states\r\n\r\nThis work should perhaps be a separate PR, in which case I can revert to the `NotImplementedError` in this PR. What do you think?",
"I don't have strong opinions on 1. provided that it's documented.\r\n\r\nFor 2., I would always prefer we give accurate and referenced information when possible. In several places, pymatgen currently provides a \"best guess\", which might be helpful, but can mislead. Especially as pymatgen is now quite a widely-used and mature code, I am getting more concerned about these cases. At minimum, we should warn.\r\n\r\nFor this PR, I am happy to proceed with your best judgement.",
"@rkingsbury I suggest (a) follow the NIST convention in returning the electronic structure for the elements. I would note that that this is the reason why the existing electronic structure is defined the way it is in any case. (b) Clarify the docs that the electronic structure is based on the element, whether for Element or Species, (c) add a separate ion_electronic_structure For species, add an `ion_electronic_structure` or `species_electronic_structure` that returns the actual electronic structure of the species based on energy levels. I think this is the most unlikely to cause problems in downstream codes, even though I don't expect that electronic_structure is used much.",
"> @rkingsbury I suggest (a) follow the NIST convention in returning the electronic structure for the elements. I would note that that this is the reason why the existing electronic structure is defined the way it is in any case. \r\n\r\nOK, agreed. After some further research, both NIST and the CRC handbook list the electronic configurations that way (i.e., NOT reflecting Madelung's rule). I was definitely taught to write them the other way, but this appears not to be the \"best practice\" anymore (or maybe it never was). So we don't need to change the order.\r\n\r\n> (b) Clarify the docs that the electronic structure is based on the element, whether for Element or Species (c) add a separate ion_electronic_structure For species, add an `ion_electronic_structure` or `species_electronic_structure` that returns the actual electronic structure of the species based on energy levels. I think this is the most unlikely to cause problems in downstream codes, even though I don't expect that electronic_structure is used much.\r\n\r\nDo you mean that `Species(Fe, 3).electronic_structure` would still return the electron config of `Fe(0)` whereas you would need to call `Species(Fe,3).ion_electronic_structure` to get the actual config of the ion? \r\n\r\nI'm concerned about potential for confusion / misinterpretation if we take that approach, as opposed to just using `electronic_structure` for both `Element` and `Species` (but using ion-specific data for `Species`). Are you concerned that downstream codes are already calling `electronic_structure` on Species, and hence might break if we implement it? Because if anyone is doing that, they should now be getting a `NotImplementedError`.\r\n\r\nWhichever way we land on that, I think the best course of action is to close this PR without merging, and I'll open a new one with ion-specific electron config data.\r\n"
] | 2024-05-30T18:53:38
| 2024-06-14T21:13:12
|
2024-06-14T21:13:12Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Rearranges electronic structures according to the correct energy levels. Checked against
- implements `full_electronic_structure`, `electronic_structure`, and `valence` for `Species`
- "prettify" `periodic_table.json` to make it more readable as a standalone file
https://ptable.com/#Electrons/Expanded
and
https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/Quantum_Mechanics/10%3A_Multi-electron_Atoms/Electron_Configuration
Fixes #3850
Fixes #3849
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3851/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/3851/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3851",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3851",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3851.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3851.patch",
"merged_at": null
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3852
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3852/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3852/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3852/events
|
https://github.com/materialsproject/pymatgen/pull/3852
| 2,328,597,037
|
PR_kwDOACgets5xKu2u
| 3,852
|
Run CI with two different `uv` resolution strategies: `highest` and `lowest-direct`
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5509832055,
"node_id": "LA_kwDOACgets8AAAABSGlddw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/imports",
"name": "imports",
"color": "B52839",
"default": false,
"description": "Import changes and formatting"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
}
] |
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 Sorry for the trouble caused surrounding import of `Self`. As it seems to be causing trouble in the v2024.5.31, can I ask for yanking this release and issue a new one? Apologize again for this oversight"
] | 2024-05-31T21:16:52
| 2024-07-04T13:42:26
|
2024-06-03T16:09:27Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
this ensures pymatgen is compatible with both the oldest and newest dependency versions it allows in `setup.py`.
future CI runs will discover version clashes like the one for `monty` reported in https://github.com/materialsproject/pymatgen/pull/3752#issuecomment-2142967807 before releasing to pypi
also fix `typing_extensions` `ImportError` reported in https://github.com/materialsproject/pymatgen/pull/3752#issuecomment-2142954988 by @kavanase @Andrew-S-Rosen
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3852/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/3852/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3852",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3852",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3852.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3852.patch",
"merged_at": "2024-06-03T16:09:27Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3853
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3853/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3853/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3853/events
|
https://github.com/materialsproject/pymatgen/pull/3853
| 2,329,186,236
|
PR_kwDOACgets5xMslS
| 3,853
|
Fix filter condition for warn msg of unphysical site occupancy in `io.cif`
|
{
"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
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 6072177337,
"node_id": "LA_kwDOACgets8AAAABae4SuQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/cif",
"name": "cif",
"color": "B04CCD",
"default": false,
"description": "Crystallographic information file"
}
] |
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 |
[
"@janosh I pushed this hot fix to address the error message issue"
] | 2024-06-01T14:57:20
| 2024-06-04T00:41:09
|
2024-06-03T16:22:16Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Fix a mistake in #3819, where the `filter` condition is incorrect, and also cast `filter` to `list`.
- Add unit test for this error message
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3853/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/3853/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3853",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3853",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3853.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3853.patch",
"merged_at": "2024-06-03T16:22:16Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3854
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3854/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3854/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3854/events
|
https://github.com/materialsproject/pymatgen/issues/3854
| 2,329,461,438
|
I_kwDOACgets6K2MK-
| 3,854
|
Slab termination in coherent_interfaces.py
|
{
"login": "lilithean",
"id": 28288893,
"node_id": "MDQ6VXNlcjI4Mjg4ODkz",
"avatar_url": "https://avatars.githubusercontent.com/u/28288893?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lilithean",
"html_url": "https://github.com/lilithean",
"followers_url": "https://api.github.com/users/lilithean/followers",
"following_url": "https://api.github.com/users/lilithean/following{/other_user}",
"gists_url": "https://api.github.com/users/lilithean/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lilithean/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lilithean/subscriptions",
"organizations_url": "https://api.github.com/users/lilithean/orgs",
"repos_url": "https://api.github.com/users/lilithean/repos",
"events_url": "https://api.github.com/users/lilithean/events{/privacy}",
"received_events_url": "https://api.github.com/users/lilithean/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-06-02T04:11:07
| 2024-06-02T04:11:07
|
NONE
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
python 3.10.8
### Pymatgen version
2024.5.1
### Operating system version
_No response_
### Current behavior
https://github.com/materialsproject/pymatgen/blob/master/pymatgen/analysis/interfaces/coherent_interfaces.py
line 142-147: the dictionary assumes all different terminations has different symmetry. Which is not the case.
self._terminations = {
(film_label, sub_label): (film_shift, sub_shift)
for (film_label, film_shift), (sub_label, sub_shift) in product(
zip(film_terminations, film_shifts), zip(sub_terminations, sub_shifts)
)
}
e.g. slab of mp-1143-167-Al2O3 has two terminations:
['Al_P6/mmm_1', 'Al_P6/mmm_1'], [0.0, 0.051047999999999996]
The Al/Al2O3 dictionary has only one interface:
{('Al_R-3m_1', 'Al_P6/mmm_1'): (0.5, 0.051047999999999996)}
### Expected Behavior
Should contains two interfaces.
### Minimal example
_No response_
### Relevant files to reproduce this bug
_No response_
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3854/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/3854/timeline
| null | false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3855
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3855/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3855/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3855/events
|
https://github.com/materialsproject/pymatgen/issues/3855
| 2,330,942,933
|
I_kwDOACgets6K713V
| 3,855
|
TypeError: deprecated() got an unexpected keyword argument 'deadline'
|
{
"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
}
|
[
{
"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 |
[
"Yes we already noticed this https://github.com/materialsproject/pymatgen/pull/3752#issuecomment-2142967807, please try to update `monty` version to latest with `pip install -U monty`",
"@DanielYang59 Yes. Your tip does the trick.\r\n\r\nBut, should the `deadline=(2025, 1, 1)` in the following line be removed or fixed?\r\n https://github.com/materialsproject/pymatgen/blob/2982968a44d0ff65392057488aee4871210bc847/pymatgen/core/periodic_table.py#L701",
"> @DanielYang59 Yes. Your tip does the trick.\r\n\r\nGreat to know. Sorry I forgot to update the `monty` in `setup.py` which caused this issue: https://github.com/materialsproject/pymatgen/blob/2982968a44d0ff65392057488aee4871210bc847/setup.py#L32\r\n\r\n> But, should the `deadline=(2025, 1, 1)` in the following line be removed or fixed?\r\n> \r\n> https://github.com/materialsproject/pymatgen/blob/2982968a44d0ff65392057488aee4871210bc847/pymatgen/core/periodic_table.py#L701\r\n\r\nSorry I don't quite understand your question, this `property` is scheduled for removal after 2025-01-01. Is there anything wrong with the decorator?\r\n\r\n",
"> Sorry I don't quite understand your question, this `property` is scheduled for removal after 2025-01-01. Is there anything wrong with the decorator?\r\n\r\nI mean, why wait until 2025-01-01, and not remove it immediately?",
"We decided to schedule it for removal after 2025-01-01 in #3817 to minimize potential impact to other's code base. \r\n\r\nIf we were to remove it immediately, all code relying on this would be broken without a grace period."
] | 2024-06-03T11:51:29
| 2024-06-03T15:26:03
|
2024-06-03T15:26:03Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.11.1
### Pymatgen version
2024.5.31
### Operating system version
Ubuntu 22.04.4 LTS
### Current behavior
Description: When trying to import MPRester from mp_api.client, I encountered a TypeError related to the deprecated decorator in the pymatgen library. The error message indicates that the deprecated() function received an unexpected keyword argument 'deadline'.
Error Traceback:
TypeError: deprecated() got an unexpected keyword argument 'deadline'
```python
In [3]: from mp_api.client import MPRester
...: from pymatgen.io.vasp.sets import MPRelaxSet
...:
...: # Replace with your Materials Project API Key
...: # api_key = "YOUR_API_KEY"
...:
...: # Use MPRester to fetch data
...: with MPRester() as mpr:
...: # Search for materials with chemical system "Au" and space group "Fm-3m"
...: results = mpr.materials.search(chemsys="Au", spacegroup_symbol="Fm-3m")
...:
...: # Print results
...: for result in results:
...: material_id = result.material_id
...: print(f"Material ID: {material_id}, Formula: {result.formula_pretty}")
...:
...: # Get material structure
...: structure = mpr.materials.get_structure_by_material_id(material_id)
...:
...: # Generate VASP input files using MPRelaxSet
...: vasp_input_set = MPRelaxSet(structure)
...: incar = vasp_input_set.incar
...:
...: # Print INCAR file content
...: print(incar)
...:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 from mp_api.client import MPRester
2 from pymatgen.io.vasp.sets import MPRelaxSet
4 # Replace with your Materials Project API Key
5 # api_key = "YOUR_API_KEY"
6
7 # Use MPRester to fetch data
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/mp_api/client/__init__.py:7
4 import os
5 from importlib.metadata import PackageNotFoundError, version
----> 7 from .core import MPRestError
8 from .mprester import MPRester
10 try:
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/mp_api/client/core/__init__.py:3
1 from __future__ import annotations
----> 3 from .client import BaseRester, MPRestError
4 from .settings import MAPIClientSettings
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/mp_api/client/core/client.py:24
21 from urllib.parse import quote, urljoin
23 import requests
---> 24 from emmet.core.utils import jsanitize
25 from monty.json import MontyDecoder
26 from pydantic import BaseModel, create_model
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/emmet/core/utils.py:10
8 from monty.json import MSONable
9 from pydantic import BaseModel
---> 10 from pymatgen.analysis.graphs import MoleculeGraph
11 from pymatgen.analysis.local_env import OpenBabelNN, metal_edge_extender
12 from pymatgen.analysis.molecule_matcher import MoleculeMatcher
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/analysis/graphs.py:26
23 from scipy.spatial import KDTree
24 from scipy.stats import describe
---> 26 from pymatgen.core import Lattice, Molecule, PeriodicSite, Structure
27 from pymatgen.core.structure import FunctionalGroups
28 from pymatgen.util.coord import lattice_points_in_supercell
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/__init__.py:12
8 from typing import Any
10 from ruamel.yaml import YAML
---> 12 from pymatgen.core.composition import Composition
13 from pymatgen.core.lattice import Lattice
14 from pymatgen.core.operations import SymmOp
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/composition.py:22
19 from monty.json import MSONable
20 from monty.serialization import loadfn
---> 22 from pymatgen.core.periodic_table import DummySpecies, Element, ElementType, Species, get_el_sp
23 from pymatgen.core.units import Mass
24 from pymatgen.util.string import Stringify, formula_double_format
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/periodic_table.py:39
32 _pt_data = json.load(ptable_json)
34 _pt_row_sizes = (2, 8, 8, 18, 18, 32, 32)
37 @functools.total_ordering
38 @unique
---> 39 class ElementBase(Enum):
40 """Element class defined without any enum values so it can be subclassed.
41
42 This class is needed to get nested (as|from)_dict to work properly. All emmet classes that had
(...)
45 only when they were top level. See https://github.com/materialsproject/pymatgen/issues/2999.
46 """
48 def __init__(self, symbol: SpeciesLike) -> None:
File ~/.pyenv/versions/3.11.1/envs/datasci/lib/python3.11/site-packages/pymatgen/core/periodic_table.py:700, in ElementBase()
696 """True if element is a post-transition or poor metal."""
697 return self.symbol in ("Al", "Ga", "In", "Tl", "Sn", "Pb", "Bi")
699 @property
--> 700 @deprecated(
701 message="Please use is_rare_earth instead, which is corrected to include Y and Sc.", deadline=(2025, 1, 1)
702 )
703 def is_rare_earth_metal(self) -> bool:
704 """True if element is a rare earth metal, Lanthanides (La) series and Actinides (Ac) series.
705
706 This property is Deprecated, and scheduled for removal after 2025-01-01.
707 """
708 return self.is_lanthanoid or self.is_actinoid
TypeError: deprecated() got an unexpected keyword argument 'deadline'
```
### Expected Behavior
The code should execute without errors, fetching materials data and generating VASP input files.
### Actual Behavior:
The code execution is halted by a TypeError due to an unexpected keyword argument 'deadline' in the deprecated decorator.
### Environment:
```shell
(datasci) werner@x13dai-t:~$ python --version
Python 3.11.1
(datasci) werner@x13dai-t:~$ pip list | grep mp-api
mp-api 0.41.2
(datasci) werner@x13dai-t:~$ pip list | grep 'pymatgen[ ]'
pymatgen 2024.5.31
(datasci) werner@x13dai-t:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
```
### Additional Information:
The issue seems to be related to the deprecated decorator in the pymatgen library, specifically in the ElementBase class in periodic_table.py.
### Possible Solution:
Check the implementation of the deprecated decorator and ensure it handles the 'deadline' keyword argument correctly.
This issue affects the usage of both mp-api and pymatgen libraries. Please investigate and provide a fix or workaround.
### Minimal example
```Python
from mp_api.client import MPRester
from pymatgen.io.vasp.sets import MPRelaxSet
# Replace with your Materials Project API Key
# api_key = "YOUR_API_KEY"
# Use MPRester to fetch data
with MPRester() as mpr:
# Search for materials with chemical system "Au" and space group "Fm-3m"
results = mpr.materials.search(chemsys="Au", spacegroup_symbol="Fm-3m")
# Print results
for result in results:
material_id = result.material_id
print(f"Material ID: {material_id}, Formula: {result.formula_pretty}")
# Get material structure
structure = mpr.materials.get_structure_by_material_id(material_id)
# Generate VASP input files using MPRelaxSet
vasp_input_set = MPRelaxSet(structure)
incar = vasp_input_set.incar
# Print INCAR file content
print(incar)
```
### Relevant files to reproduce this bug
_No response_
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/3855/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/3855/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3856
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3856/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3856/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3856/events
|
https://github.com/materialsproject/pymatgen/issues/3856
| 2,331,048,301
|
I_kwDOACgets6K8Plt
| 3,856
|
[CI] All unit tests failing perhaps related to lastest `chgnet` 0.3.7 release
|
{
"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 |
[
"closing as it seems to be related to upstream https://github.com/CederGroupHub/chgnet/issues/160, nothing to do with `pymatgen`"
] | 2024-06-03T12:37:53
| 2024-06-03T14:12:16
|
2024-06-03T14:12:15Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
[All unit tests are failing](https://github.com/materialsproject/pymatgen/actions/runs/9350037332?pr=3822) since around two days ago, which seems to be related to failure to build the latest `chgnet` dependency:
```
error: Failed to download distributions
Caused by: Failed to fetch wheel: chgnet==0.3.7
Caused by: Failed to build: `chgnet==0.3.7`
Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
```
And `stderr`:
```
chgnet/graph/cygraph.c:1238:10: fatal error: fast_converter_libraries/create_graph.c: No such file or directory
1238 | #include "fast_converter_libraries/create_graph.c"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3856/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/3856/timeline
| null |
not_planned
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3857
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3857/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3857/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3857/events
|
https://github.com/materialsproject/pymatgen/pull/3857
| 2,331,659,466
|
PR_kwDOACgets5xU9Td
| 3,857
|
Add CI run without `'optional'` deps installed
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 4974004892,
"node_id": "LA_kwDOACgets8AAAABKHlKnA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/tests",
"name": "tests",
"color": "654021",
"default": false,
"description": "Issues with or changes to the pymatgen test suite"
},
{
"id": 5578251138,
"node_id": "LA_kwDOACgets8AAAABTH1bgg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ci",
"name": "ci",
"color": "4E135C",
"default": false,
"description": "Continuous integration"
},
{
"id": 5585018768,
"node_id": "LA_kwDOACgets8AAAABTOSfkA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/pkg",
"name": "pkg",
"color": "EFE8DB",
"default": false,
"description": "Package health and distribution related stuff"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
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-06-03T17:11:39
| 2024-06-03T19:14:01
|
2024-06-03T19:14:00Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
addresses the underlying cause of why the issue reported by @kavanase in https://github.com/materialsproject/pymatgen/pull/3752#issuecomment-2142954988 was only caught after pypi release
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3857/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/3857/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3857",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3857",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3857.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3857.patch",
"merged_at": "2024-06-03T19:14:00Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3858
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3858/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3858/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3858/events
|
https://github.com/materialsproject/pymatgen/pull/3858
| 2,332,291,608
|
PR_kwDOACgets5xXIuH
| 3,858
|
Add new `.pmgrc.yaml` setting `PMG_VASP_PSP_SUB_DIRS: dict[str, str]`
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 1427867026,
"node_id": "MDU6TGFiZWwxNDI3ODY3MDI2",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/enhancement",
"name": "enhancement",
"color": "c5e06d",
"default": true,
"description": "A new feature or improvement to an existing one"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 5563699492,
"node_id": "LA_kwDOACgets8AAAABS59RJA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ux",
"name": "ux",
"color": "28DEA4",
"default": false,
"description": "User experience"
}
] |
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 |
[
"pinging @esoteric-ephemera since i can't request a review from you but would be great to get your thoughts if any",
"Seems reasonable to me. I am not familiar with the `W_HASH` variants.",
"This looks good to me! This can also benefit those who are newer to VASP and only care about more recent generations of pseudopotentials.\r\n\r\n@mkhorton: afaik, these are identical to the non `_W_HASH` variants (`{PBE,LDA}_52`, `{PBE,LDA}_54`) but with a SHA and possibly COPYR field added."
] | 2024-06-04T00:29:01
| 2024-06-04T16:19:47
|
2024-06-04T16:19:46Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
the current `PotcarSingle.functional_dir` hard-codes the subfolder structure of `PMG_VASP_PSP_DIR`. e.g. the subfolder containing the `PBE_64` POTCARs _must_ be named `POT_PAW_PBE_64`. this causes problems e.g. in cases where the POTCARs are shared across an HPC cluster and users don't have permissions to rename shared files (just happened to me).
https://github.com/materialsproject/pymatgen/blob/232fa1f842d1078dd69d8d1631b4dd19a9b35c2f/pymatgen/io/vasp/inputs.py#L1757-L1779
the new setting is read from `.pmgrc.yaml` and overrides the `PotcarSingle.functional_dir` names (leaving unspecified ones as is). example:
```yaml
# .pmgrc.yaml
PMG_VASP_PSP_DIR: /path/to/pseudo-potentials
PMG_VASP_PSP_SUB_DIRS:
PBE_64: MY_PBE_64_DIR
LDA_64: MY_LDA_64_DIR
```
this PR implement the new setting, adds tests for it and restores (uncomments) + fixes an existing `PotcarSingle` test
also improves `FileNotFoundError` messages on missing POTCARs
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3858/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/3858/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3858",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3858",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3858.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3858.patch",
"merged_at": "2024-06-04T16:19:46Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3859
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3859/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3859/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3859/events
|
https://github.com/materialsproject/pymatgen/pull/3859
| 2,333,374,870
|
PR_kwDOACgets5xa0hM
| 3,859
|
SpaceGroup changes
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5457867742,
"node_id": "LA_kwDOACgets8AAAABRVBz3g",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/breaking",
"name": "breaking",
"color": "41396E",
"default": false,
"description": "Breaking change"
},
{
"id": 5473975193,
"node_id": "LA_kwDOACgets8AAAABRkY7mQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/symmetry",
"name": "symmetry",
"color": "D3660B",
"default": false,
"description": "Space groups and the like"
}
] |
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 |
[
"Many thanks for this @kaueltzen!\r\n\r\nIn case it is helpful in future, adding a note that the `maggroups` module in pymatgen uses a different dataset (from ISO-MAG, used with permission). It may or may not be helpful to cross-check information, since it's a superset of the crystallographic groups.\r\n\r\n**Important note for this PR:** this technically counts as a breaking change. I can imagine cases whereby users are generating and storing space group strings in a database, for example, with the previous logic. Therefore, can you add a note to `docs/compatibility.md` noting the change, and how affected users can replace their previous `symbol` with the new `symbol`?",
"> **Important note for this PR:** this technically counts as a breaking change. I can imagine cases whereby users are generating and storing space group strings in a database, for example, with the previous logic. Therefore, can you add a note to `docs/compatibility.md` noting the change, and how affected users can replace their previous `symbol` with the new `symbol`?\r\n\r\nThanks @mkhorton ! We know it is breaking. We had asked in the issue how to handle this. Thanks for pointing out how to do it in the best way! Very helpful.\r\n\r\n",
"No problem, apologies I’d missed the issue comment.",
"> Many thanks for this @kaueltzen!\r\n> \r\n> In case it is helpful in future, adding a note that the `maggroups` module in pymatgen uses a different dataset (from ISO-MAG, used with permission). It may or may not be helpful to cross-check information, since it's a superset of the crystallographic groups.\r\n> \r\n> **Important note for this PR:** this technically counts as a breaking change. I can imagine cases whereby users are generating and storing space group strings in a database, for example, with the previous logic. Therefore, can you add a note to `docs/compatibility.md` noting the change, and how affected users can replace their previous `symbol` with the new `symbol`?\r\n\r\nThanks @mkhorton for pointing that out! Will add a note.",
"Hey, while working on the new `PointGroup` class method `from_space_group()`, I found another bug in `SpaceGroup` referenced here: #3862 which is also important for this PR.\r\nWhat are your thoughts on that? @JaGeo @janosh @mkhorton ",
"Another minor issue: the space group types I2_12_12_1 and P2_12_12_1 are mapped onto I/P2_12_121 in `SpaceGroup.full_sg_mapping` , the wrong key is also there in `SpaceGroup.sg_encoding` . Will fix that as well.",
"Hey @mkhorton @shyuep this is ready to be reviewed.",
"As far as I see it, all review requests have been addressed by @kaueltzen . Would be great if this could be merged if the changes are fine.",
"Oh, now there are some conflicts 🫠",
"It is just a switch to a src based layout. Once you move the files, the conflicts should be simple to resolve.",
"> It is just a switch to a src based layout. Once you move the files, the conflicts should be simple to resolve.\r\n\r\nHey @shyuep @mkhorton the merge conflicts have been resolved. Could you please review this?",
"@shyuep is there anything that still needs to be done here? We would be very happy if this could be merged and fixed.",
"Merged. Thanks,",
"@shyuep thank you!",
"Looks like this PR breaks [one of the unit tests in windows](https://github.com/materialsproject/pymatgen/actions/runs/9930219406/job/27428698747)?\r\n```\r\n _______________ TestSpacegroupAnalyzer.test_get_crystal_system ________________\r\n\r\nself = <symmetry.test_analyzer.TestSpacegroupAnalyzer testMethod=test_get_crystal_system>\r\n\r\n def test_get_crystal_system(self):\r\n crystal_system = self.sg.get_crystal_system()\r\n assert crystal_system == \"orthorhombic\"\r\n assert self.disordered_sg.get_crystal_system() == \"tetragonal\"\r\n \r\n orig_spg = self.sg._space_group_data[\"number\"]\r\n> self.sg._space_group_data[\"number\"] = 0\r\nE TypeError: 'SpglibDataset' object does not support item assignment\r\n```\r\n\r\nFeel free to ping me if there's anything I could help :) \r\n\r\n",
"@kaueltzen could you maybe take a look?",
"Hi @DanielYang59 i cannot see where this might be due to the SpaceGroup changes. it seems like it is due to the latest spglib release? https://spglib.readthedocs.io/en/stable/releases.html#v2-5-0-9-jul-2024\r\n\r\nThe output data is not longer in dict format but in classes like SpglibDataset. The dict-like interface is planned to be removed, so there will be a lot of necessary changes in pymatgen. would modifiying the version of spglib to <2.5.0 in pyproject.toml be ok for you for now?",
"@kaueltzen Apologize, I didn't look very closely into the failure (just noticed unit tests begin to fail after this PR, and this is related to spacegroup). Sorry for misleading you.\r\n\r\nI could confirm using `spglig` lower than 2.5.0 fixed this meanwhile :) ",
"> I could confirm using `spglig` lower than 2.5.0 fixed this meanwhile :)\r\n\r\nGreat :+1: and thanks for looking into this!\r\n"
] | 2024-06-04T12:13:07
| 2024-07-15T12:02:51
|
2024-07-14T19:30:29Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Fixes #3845 , #3861 and #3862 .
Includes the following changes in the symmetry module:
- The SpaceGroup symbol attribute now refers to its Hermann-Mauguin symbol with underscore notation of screw axes.
- The setting of the 7 rhombohedral space group types is now stored in an additional hexagonal bool attribute which can be set explicitly or by appending the setting to the `int_symbol` string parameter with the setting appended as before. The latter overrides the former for backwards compatibility.
- The `SpaceGroup point_group` attribute now always refers to the point group in Hermann Mauguin notation.
- A class method `from_space_group` was added to `PointGroup` which initializes the 32 crystal classes from a SpaceGroup string in Hermann-Mauguin notation.
- Changes of the space group databases `symm_data.json` and `symm_ops.json` were made which are documented in [dev_scripts/update_spacegroup_data.py](https://github.com/materialsproject/pymatgen/pull/3859/files#diff-09c03a9345c6a677bacba3c15d2506f6467be798b3eabc05f7286a1a6dea9278) .
- If the full symbol is not available (for non-standard settings), a warning is now issued.
- Tests for the abovementioned points were added
- Notes on how to convert the old to the new symbol were added to docs/compatibility.md
|
{
"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/3859/reactions",
"total_count": 4,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 2,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3859/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3859",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3859",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3859.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3859.patch",
"merged_at": "2024-07-14T19:30:29Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3860
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3860/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3860/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3860/events
|
https://github.com/materialsproject/pymatgen/issues/3860
| 2,334,065,037
|
I_kwDOACgets6LHwGN
| 3,860
|
Breaking change in "POTCAR" info with recent changes to `VaspInput`
|
{
"login": "Andrew-S-Rosen",
"id": 8674072,
"node_id": "MDQ6VXNlcjg2NzQwNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Andrew-S-Rosen",
"html_url": "https://github.com/Andrew-S-Rosen",
"followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers",
"following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}",
"gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions",
"organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs",
"repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos",
"events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}",
"received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 19613987,
"node_id": "MDU6TGFiZWwxOTYxMzk4Nw==",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/bug",
"name": "bug",
"color": "9222c1",
"default": true,
"description": ""
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
}
] |
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! pretty sure this was not intentional but @esoteric-ephemera would know best.\r\n\r\nalways good to learn where we need to add more tests :)",
"It seems [here](https://github.com/materialsproject/pymatgen/pull/3835/files#diff-2b61e131c3f0a2a133effdfb20a2b8b6c84690d55bcd81b6d01ea4ecebdb9b0dR2764) is the cause of the breaking change for the key name, and [here](https://github.com/materialsproject/pymatgen/pull/3835/files#diff-e59a3ba79a120caa18efeceef5f857faf5a1d798c9efd1345746079941a2b471R458) (`pymatgen.io.vasp.sets.get_input_set` line 458... not sure why it's not jumping to that point) is the cause of the breaking change for the data type (`list[str]` vs. `str`).\r\n\r\nI'm not opposed to the change. Just wanted to make sure it was intentional.",
"It is intentional - I had to implement this change to get VaspInputSet to write a `POTCAR.spec` file instead of `POTCAR`. There's probably a non-breaking way to do this (label the item POTCAR in the dict, but write a file called POTCAR.spec), but I also think labeling this item as a POTCAR.spec entity rather than a POTCAR makes more sense",
"> but I also think labeling this item as a POTCAR.spec entity rather than a POTCAR makes more sense\r\n\r\ndid you add a test for the new behavior?",
"@janosh: [Yes or at least modified an existing test](https://github.com/materialsproject/pymatgen/blob/master/tests/io/vasp/test_inputs.py#L1391)\r\n\r\nBoth ways of doing it are fine by me, and it's an oversight on my part to not warn about this breaking things. Should I tune this a bit?",
"> Should I tune this a bit?\r\n\r\npersonally, i think it's fine. i just added the [`breaking` label](https://github.com/materialsproject/pymatgen/labels/breaking) to https://github.com/materialsproject/pymatgen/pull/3835. we could add a sentence warning of this change to `CHANGES.md` and https://pymatgen.org/compatibility.html#recent-breaking-changes",
"Thanks for clarifying, @esoteric-ephemera! Feel free to close, @janosh, when you feel comfortable doing so."
] | 2024-06-04T17:47:51
| 2024-06-06T12:39:44
|
2024-06-06T12:39:44Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.11
### Pymatgen version
2024.5.31
### Operating system version
_No response_
### Current behavior
It seems there was a recent breaking change to the `VaspInput` class that I didn't see communicated. I wanted to report it here to make sure it wasn't a bug. Feel free to close if it's intended.
Take the following example:
```python
from pymatgen.io.vasp.sets import MPRelaxSet
from pymatgen.core import Structure
struct = Structure(
lattice=[[0, 2.13, 2.13], [2.13, 0, 2.13], [2.13, 2.13, 0]],
species=["Mg", "O"],
coords=[[0, 0, 0], [0.5, 0.5, 0.5]],
)
vasp_input = MPRelaxSet().get_input_set(structure=struct, potcar_spec=True)
print(vasp_input)
```
In pymatgen < 2024.5.31, we get:
```py
{'INCAR': {'ALGO': 'Fast',
'EDIFF': 0.0001,
'ENCUT': 520,
'IBRION': 2,
'ISIF': 3,
'ISMEAR': -5,
'ISPIN': 2,
'LASPH': True,
'LORBIT': 11,
'LREAL': 'Auto',
'LWAVE': False,
'NELM': 100,
'NSW': 99,
'PREC': 'Accurate',
'SIGMA': 0.05,
'MAGMOM': [0.6, 0.6]},
'KPOINTS': pymatgen with grid density = 1643 / number of atoms
0
Gamma
9 9 9,
'POSCAR': Mg1 O1
1.0
0.0000000000000000 2.1299999999999999 2.1299999999999999
2.1299999999999999 0.0000000000000000 2.1299999999999999
2.1299999999999999 2.1299999999999999 0.0000000000000000
Mg O
1 1
direct
0.0000000000000000 0.0000000000000000 0.0000000000000000 Mg
0.5000000000000000 0.5000000000000000 0.5000000000000000 O,
'POTCAR': ['Mg_pv', 'O']}
```
However, in pymatgen >=2024.5.31, we get
```py
{'INCAR': {'ALGO': 'Fast',
'EDIFF': 0.0001,
'ENCUT': 520,
'IBRION': 2,
'ISIF': 3,
'ISMEAR': -5,
'ISPIN': 2,
'LASPH': True,
'LORBIT': 11,
'LREAL': 'Auto',
'LWAVE': False,
'NELM': 100,
'NSW': 99,
'PREC': 'Accurate',
'SIGMA': 0.05,
'MAGMOM': [0.6, 0.6]},
'KPOINTS': pymatgen with grid density = 1643 / number of atoms
0
Gamma
9 9 9,
'POSCAR': Mg1 O1
1.0
0.0000000000000000 2.1299999999999999 2.1299999999999999
2.1299999999999999 0.0000000000000000 2.1299999999999999
2.1299999999999999 2.1299999999999999 0.0000000000000000
Mg O
1 1
direct
0.0000000000000000 0.0000000000000000 0.0000000000000000 Mg
0.5000000000000000 0.5000000000000000 0.5000000000000000 O,
'POTCAR.spec': 'Mg_pv\nO'}
```
Note how doing `vasp_input["POTCAR"]` will cause a crash in the newer version. In its place is `vasp_input["POTCAR.spec"]`, which also is not formatted the same way.
Tagging @esoteric-ephemera, @janosh for comment.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3860/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/3860/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3861
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3861/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3861/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3861/events
|
https://github.com/materialsproject/pymatgen/issues/3861
| 2,335,296,393
|
I_kwDOACgets6LMcuJ
| 3,861
|
Add from_space_group() class method to PointGroup
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/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 |
[] | 2024-06-05T08:55:23
| 2024-07-15T07:55:13
|
2024-07-15T07:55:13Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Feature Requested
References PR #3859 , specifically https://github.com/materialsproject/pymatgen/pull/3859#discussion_r1626142699
A class method `from_space_group()` will be added to the PointGroup class to instantiate point groups that belong to the 32 crystal classes from a SpaceGroup symbol. This will also resolve inhomogeneous symmetry notations (Schoenflies and Hermann Mauguin) within one SpaceGroup object or a dataset. https://github.com/materialsproject/pymatgen/blob/163cc01e0251525f5ab8f48776511411754012a9/pymatgen/symmetry/groups.py#L232
### Proposed Solution
Will be implemented in PR #3859 .
### Relevant Information
_No response_
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3861/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/3861/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3862
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3862/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3862/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3862/events
|
https://github.com/materialsproject/pymatgen/issues/3862
| 2,335,596,499
|
I_kwDOACgets6LNl_T
| 3,862
|
SpaceGroup object init and string representation issues for space group types with screw axes in non-standard settings
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/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": ""
},
{
"id": 5473975193,
"node_id": "LA_kwDOACgets8AAAABRkY7mQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/symmetry",
"name": "symmetry",
"color": "D3660B",
"default": false,
"description": "Space groups and the like"
}
] |
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 |
[
"wow, love your detailed issue reports with discovery context and repro steps. keep that up! 👍 \r\n\r\nregarding the issue, your proposed fix sounds good to me. i hope others with more experience weigh in though\r\n\r\n> fix would be to not remove whitespaces in the Hermann-Mauguin symbol when loading SYMM_OPS",
"> wow, love your detailed issue reports with discovery context and repro steps. \r\n\r\nSeconded, much appreciated!\r\n\r\n> In my opinion, a single database with space group type information would be best to avoid bugs like this.\r\n\r\nYes, I agree. I'm not sure if there should even be a `HermannMauguinSymbol` class that can handle parsing logic, convert to/from full, short and extended symbols, etc. Perhaps we're asking `str` to do too much work here.",
"> Yes, I agree. I'm not sure if there should even be a `HermannMauguinSymbol` class that can handle parsing logic, convert to/from full, short and extended symbols, etc. Perhaps we're asking `str` to do too much work here.\r\n\r\nI like the idea of an additional `HermannMauguinSymbol` class for these tasks :+1: However, I think I would not have the required time to implement that in the near future. For now, this issue is solved with backwards compatibility by an *additional* `\"hermann_mauguin_u\"` key in the `symm_ops.json` database (this is documented in [dev_scripts/update_spacegroup_data.py](https://github.com/materialsproject/pymatgen/pull/3859/files#diff-09c03a9345c6a677bacba3c15d2506f6467be798b3eabc05f7286a1a6dea9278)). This converts the `symm_ops.json` `\"hermann_mauguin\"` key (and later in `groups.py` in some cases user input) to the underscore notation of `symm_data.json`.\r\n"
] | 2024-06-05T11:04:56
| 2024-07-15T07:56:12
|
2024-07-15T07:56:12Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
3.10
### Pymatgen version
2024.5.1 or master
### Operating system version
_No response_
### Current behavior
This issue was noticed when working on #3859 and #3861 .
In `SpaceGroup.SYMM_OPS` the translational information in screw axes is appended without an underscore, e.g. "Pmc21" while in `SpaceGroup.sg_encoding` (comprising the standard settings and a bit more, it seems?) this information is represented with an underscore.
If one initializes a `SpaceGroup` object as in https://github.com/materialsproject/pymatgen/blob/163cc01e0251525f5ab8f48776511411754012a9/tests/symmetry/test_groups.py#L211 with an underscore, no match in `SpaceGroup.SYMM_OPS` is found and the attributes are set starting from L241 based on `SpaceGroup.sg_encoding` and the `int_symbol` parameter:
https://github.com/materialsproject/pymatgen/blob/163cc01e0251525f5ab8f48776511411754012a9/pymatgen/symmetry/groups.py#L241
---------------------------------------
The problem arises if one wants to initialize `SpaceGroup` objects with screw axes in non-standard settings. An example is P2_1ma, a non-standard representation of Pmc2_1. But while this does not give an error
```python
sg = SpaceGroup("Pmc2_1")
assert sg.to_unicode_string() == "Pmc2₁"
```
the non-standard setting raises the `ValueError` from https://github.com/materialsproject/pymatgen/blob/163cc01e0251525f5ab8f48776511411754012a9/pymatgen/symmetry/groups.py#L239
```python
sg = SpaceGroup("P2_1ma")
assert sg.to_unicode_string() == "P2₁ma"
```
If one leaves out the underscore, the `SpaceGroup` object can be instantiated, but it will generate a wrong unicode string:
```python
sg = SpaceGroup("P21ma")
assert sg.to_unicode_string() == "P2₁ma"
AssertionError
Expected :'P2₁ma'
Actual :'P21ma'
```
----------------------------------
**Possible solutions:**
1. A quick fix would be to not remove whitespaces in the Hermann-Mauguin symbol when loading `SYMM_OPS`:
https://github.com/materialsproject/pymatgen/blob/163cc01e0251525f5ab8f48776511411754012a9/pymatgen/symmetry/groups.py#L185
It might be even best if we either added underscores to screw axes for entries in `SYMM_OPS` (would prefer) or remove them for entries in `sg_encodings`. Right now, the same space group type in the same setting will give different symbols depending on whether one follows the LaTeX advice in the documentation of init or not (not following it does not give an error, but initializes from `SYMM_OPS` instead
```python
sg = SpaceGroup("P4_1")
print(sg.symbol)
sg = SpaceGroup("P41")
print(sg.symbol)
P4_1
P41
```
2. Further solution: In my opinion, a single database with space group type information would be best to avoid bugs like this. However, this would require a lot more work (rewriting the `init` but also creating this database) and careful testing. Thoughts?
### Expected Behavior
A successful `SpaceGroup` initialization and correct string representation for space group types with screw axes in non-standard settings.
### Minimal example
_No response_
### Relevant files to reproduce this bug
_No response_
|
{
"login": "kaueltzen",
"id": 94910364,
"node_id": "U_kgDOBag3nA",
"avatar_url": "https://avatars.githubusercontent.com/u/94910364?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaueltzen",
"html_url": "https://github.com/kaueltzen",
"followers_url": "https://api.github.com/users/kaueltzen/followers",
"following_url": "https://api.github.com/users/kaueltzen/following{/other_user}",
"gists_url": "https://api.github.com/users/kaueltzen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaueltzen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaueltzen/subscriptions",
"organizations_url": "https://api.github.com/users/kaueltzen/orgs",
"repos_url": "https://api.github.com/users/kaueltzen/repos",
"events_url": "https://api.github.com/users/kaueltzen/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaueltzen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3862/reactions",
"total_count": 3,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 1,
"eyes": 1
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3862/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3863
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3863/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3863/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3863/events
|
https://github.com/materialsproject/pymatgen/pull/3863
| 2,335,810,016
|
PR_kwDOACgets5xjLS_
| 3,863
|
Replace hard coded class names, add types for `io.vasp.sets`
|
{
"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
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@janosh Ready for review now, thanks for your time :)",
"Thanks for reviewing, and I really appreciate your merging this before splitting `vasp.sets` :)"
] | 2024-06-05T12:45:12
| 2024-06-07T13:03:47
|
2024-06-07T13:02:55Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Improve types for `io.vasp.sets` and comment tweaks
- Replace hard coded class names
- Use `deadline` in `deprecated` decorator for easier tracking of deprecated functions
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3863/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/3863/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3863",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3863",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3863.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3863.patch",
"merged_at": "2024-06-07T13:02:55Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3864
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3864/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3864/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3864/events
|
https://github.com/materialsproject/pymatgen/pull/3864
| 2,336,842,678
|
PR_kwDOACgets5xmwzP
| 3,864
|
Add property `chemical_system_set` to `Composition` and `SiteCollection`
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 1427867026,
"node_id": "MDU6TGFiZWwxNDI3ODY3MDI2",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/enhancement",
"name": "enhancement",
"color": "c5e06d",
"default": true,
"description": "A new feature or improvement to an existing one"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
}
] |
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-06-05T21:11:24
| 2024-06-05T21:34:56
|
2024-06-05T21:34:55Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3864/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/3864/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3864",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3864",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3864.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3864.patch",
"merged_at": "2024-06-05T21:34:55Z"
}
|
||||
https://api.github.com/repos/materialsproject/pymatgen/issues/3865
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3865/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3865/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3865/events
|
https://github.com/materialsproject/pymatgen/pull/3865
| 2,336,956,458
|
PR_kwDOACgets5xnKFk
| 3,865
|
Split VASP input sets into submodules
|
{
"login": "janosh",
"id": 30958850,
"node_id": "MDQ6VXNlcjMwOTU4ODUw",
"avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/janosh",
"html_url": "https://github.com/janosh",
"followers_url": "https://api.github.com/users/janosh/followers",
"following_url": "https://api.github.com/users/janosh/following{/other_user}",
"gists_url": "https://api.github.com/users/janosh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/janosh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/janosh/subscriptions",
"organizations_url": "https://api.github.com/users/janosh/orgs",
"repos_url": "https://api.github.com/users/janosh/repos",
"events_url": "https://api.github.com/users/janosh/events{/privacy}",
"received_events_url": "https://api.github.com/users/janosh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5436106752,
"node_id": "LA_kwDOACgets8AAAABRARoAA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/housekeeping",
"name": "housekeeping",
"color": "64CC86",
"default": false,
"description": "Moving around or cleaning up old code/files"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
},
{
"id": 5698361208,
"node_id": "LA_kwDOACgets8AAAABU6YXeA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/dx",
"name": "dx",
"color": "73339B",
"default": false,
"description": "Developer experience"
}
] |
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 |
[
"Ah there would be a million merge conflicts for #3863 😭 \r\n\r\nI don't have any objection for this PR, but could we \"possibly\" split from #3863? As I think splitting would be easier (cut and paste) than reapplying all changes?",
"In favor, thanks @janosh! The `sets.py` file was getting far too unwieldly.",
"Given that I expressed my objections to the split earlier, this PR should not have been merged without my review. Also, this PR clearly broke something. See #3988. I have reverted this PR. I will reiterate that these kind of PRs need to be consulted on. I do not want to have to deal with unnecessary complaints of backwards incompatibility. ",
"Further, I have no idea how this PR was done, but the PR changes showed the creation of the sets folder with the submodules, but it did not show the deletion of the sets.py file. As a result, reversion of this PR caused all kinds of breakages. "
] | 2024-06-05T22:51:49
| 2024-08-09T16:40:30
|
2024-08-07T18:54:46Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
follow up PR to #3835, specifically [this exchange](https://github.com/materialsproject/pymatgen/pull/3835#issuecomment-2118090800), that splits VASP input sets (currently all in a 3.3k line `sets.py` file) into submodules `base.py`, `lobster.py`, `matpes.py`, `mit.py`, `mp.py`, `mvl.py`.
no breaking changes expected as all input sets are re-exported from the new `pymatgen/io/vasp/sets/__init__.py` and so are importable the same way they were before. i did not re-export some private functions like `_get_recommended_lreal` in `base.py` since they were already marked private and no other files in pymatgen were importing them
pinging @shyuep, @mkhorton, @esoteric-ephemera, @utf, @JaGeo for review
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3865/reactions",
"total_count": 2,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3865/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3865",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3865",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3865.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3865.patch",
"merged_at": "2024-08-07T18:54:46Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3866
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3866/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3866/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3866/events
|
https://github.com/materialsproject/pymatgen/pull/3866
| 2,337,368,579
|
PR_kwDOACgets5xoixZ
| 3,866
|
Bug fix: fixed the leading capitalized ALGO in Vasprun
|
{
"login": "yanghan234",
"id": 32856137,
"node_id": "MDQ6VXNlcjMyODU2MTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/32856137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yanghan234",
"html_url": "https://github.com/yanghan234",
"followers_url": "https://api.github.com/users/yanghan234/followers",
"following_url": "https://api.github.com/users/yanghan234/following{/other_user}",
"gists_url": "https://api.github.com/users/yanghan234/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yanghan234/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yanghan234/subscriptions",
"organizations_url": "https://api.github.com/users/yanghan234/orgs",
"repos_url": "https://api.github.com/users/yanghan234/repos",
"events_url": "https://api.github.com/users/yanghan234/events{/privacy}",
"received_events_url": "https://api.github.com/users/yanghan234/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 2414169365,
"node_id": "MDU6TGFiZWwyNDE0MTY5MzY1",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/needs%20testing",
"name": "needs testing",
"color": "66ddab",
"default": false,
"description": "PRs that are not ready to merge due to lacking tests"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5457739150,
"node_id": "LA_kwDOACgets8AAAABRU59jg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/vasp",
"name": "vasp",
"color": "BF4B01",
"default": false,
"description": "Vienna Ab initio Simulation Package"
}
] |
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 @yanghan234, I will merge this."
] | 2024-06-06T05:52:40
| 2024-09-07T04:25:31
|
2024-06-09T03:11:08Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
Major changes:
- This PR solved the issue in #3780
`pymatgen` automatically converts the input `ALGO` to the leading capitalized format, e.g. `GW0` will be converted to `Gw0` and written to `vasprun.xml`. In such case, `Vasprun` would fail to parse the results. In this PR, I fixed this bug.
Tagging @mkhorton for awareness.
|
{
"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/3866/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/3866/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3866",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3866",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3866.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3866.patch",
"merged_at": "2024-06-09T03:11:08Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3867
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3867/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3867/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3867/events
|
https://github.com/materialsproject/pymatgen/issues/3867
| 2,339,002,280
|
I_kwDOACgets6Laleo
| 3,867
|
Documentation inconsistent with code for Composition._get_oxi_state_guesses
|
{
"login": "JiQi535",
"id": 54908836,
"node_id": "MDQ6VXNlcjU0OTA4ODM2",
"avatar_url": "https://avatars.githubusercontent.com/u/54908836?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JiQi535",
"html_url": "https://github.com/JiQi535",
"followers_url": "https://api.github.com/users/JiQi535/followers",
"following_url": "https://api.github.com/users/JiQi535/following{/other_user}",
"gists_url": "https://api.github.com/users/JiQi535/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JiQi535/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JiQi535/subscriptions",
"organizations_url": "https://api.github.com/users/JiQi535/orgs",
"repos_url": "https://api.github.com/users/JiQi535/repos",
"events_url": "https://api.github.com/users/JiQi535/events{/privacy}",
"received_events_url": "https://api.github.com/users/JiQi535/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-06-06T19:23:13
| 2024-06-12T14:39:40
|
2024-06-12T14:39:40Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
Python 3.9
### Pymatgen version
2024.6.4
### Operating system version
_No response_
### Current behavior
The documentation of the argument `all_oxidation_state` is inconsistent with what the code really does.
**According to doc, `common_oxidation_states` and `icsd_oxidation_states` are used when `all_oxidation_state` is `False` and `True`, respectively.** https://github.com/materialsproject/pymatgen/blob/6d45741fd1a9e7b4b6d0efc1ce28b2f5aa5cf8d4/pymatgen/core/composition.py#L922-L926
**According to code, `common_oxidation_states` is actually never used, and `icsd_oxidation_states` is used when `all_oxidation_state` is `False`.** https://github.com/materialsproject/pymatgen/blob/6d45741fd1a9e7b4b6d0efc1ce28b2f5aa5cf8d4/pymatgen/core/composition.py#L977-L982
### Expected Behavior
I think this inconsistency in code and documentation should be corrected. However, I have a trouble understanding the difference and source of `oxidation_states` and `common_oxidation_states` as elemental data. Also, should the doc or the code be corrected?
### 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/3867/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/3867/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3868
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3868/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3868/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3868/events
|
https://github.com/materialsproject/pymatgen/pull/3868
| 2,340,684,331
|
PR_kwDOACgets5xz6Uo
| 3,868
|
Bug fix: handle non-integer oxidation states in `Species`
|
{
"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
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5648629103,
"node_id": "LA_kwDOACgets8AAAABUK89bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/core",
"name": "core",
"color": "299448",
"default": false,
"description": "Pymatgen core"
}
] |
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-06-07T15:12:54
| 2024-06-26T16:42:29
|
2024-06-07T15:34:18Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Simple bug fix for when elements have non-integer oxidation states assigned to them. Pymatgen can assign non-integer charges to sites, but when trying to initialize `Species` with non-integer oxidation state:
```
from pymatgen.core import Species
Species("C0.25+")._oxi_state
```
this raises an `AttributeError`.
This PR fixes that bug and adds test cases to `tests/core/test_periodic_table.test_symbol_oxi_state_str`.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3868/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/3868/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3868",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3868",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3868.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3868.patch",
"merged_at": "2024-06-07T15:34:18Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3869
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3869/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3869/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3869/events
|
https://github.com/materialsproject/pymatgen/pull/3869
| 2,341,392,552
|
PR_kwDOACgets5x2T16
| 3,869
|
Slightly more robust `MSONAtoms` handling
|
{
"login": "Andrew-S-Rosen",
"id": 8674072,
"node_id": "MDQ6VXNlcjg2NzQwNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/8674072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Andrew-S-Rosen",
"html_url": "https://github.com/Andrew-S-Rosen",
"followers_url": "https://api.github.com/users/Andrew-S-Rosen/followers",
"following_url": "https://api.github.com/users/Andrew-S-Rosen/following{/other_user}",
"gists_url": "https://api.github.com/users/Andrew-S-Rosen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Andrew-S-Rosen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Andrew-S-Rosen/subscriptions",
"organizations_url": "https://api.github.com/users/Andrew-S-Rosen/orgs",
"repos_url": "https://api.github.com/users/Andrew-S-Rosen/repos",
"events_url": "https://api.github.com/users/Andrew-S-Rosen/events{/privacy}",
"received_events_url": "https://api.github.com/users/Andrew-S-Rosen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5585129979,
"node_id": "LA_kwDOACgets8AAAABTOZR-w",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ase",
"name": "ase",
"color": "B8E879",
"default": false,
"description": "Atomic simulation environment"
},
{
"id": 6591917865,
"node_id": "LA_kwDOACgets8AAAABiOivKQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/serialization",
"name": "serialization",
"color": "5BCA72",
"default": false,
"description": "Data/object serialization"
}
] |
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 |
[
"Will re-open if needed.",
"how come it's no longer needed? seems like a sensible change",
"Feel free to merge. I was indifferent. ",
"i guess i'm still missing something. if it avoids an error that occurred in practice for @samblau, it's a keeper, no?",
"I only encountered this error because I was dealing with task docs from an older version of QuAcc... this shouldn't be a common scenario. But it still seems better to have it than not."
] | 2024-06-08T02:50:49
| 2024-06-09T01:29:45
|
2024-06-09T01:22:05Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Broader context: This PR basically impacts nobody and is just a marginally safer way to index the `MSONAtoms` info key when parsing the dictionary representation.
Technical details: As noted by @samblau, if for some reason your `MSONAtoms.as_dict()` representation no longer has an `atoms_info` key, then doing `MSONAtoms.from_dict()` will crash. In virtually all cases, the user will have an `atoms_info` key, but it's pretty trivial to fix this by doing `.get(dct["atoms_info"], {})` instead of `dct["atoms_info"]`, so I've done that here.
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3869/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/3869/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3869",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3869",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3869.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3869.patch",
"merged_at": "2024-06-09T01:22:05Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3870
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3870/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3870/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3870/events
|
https://github.com/materialsproject/pymatgen/pull/3870
| 2,341,923,144
|
PR_kwDOACgets5x39Tn
| 3,870
|
Fix bug in VASP parameter parsing
|
{
"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
}
|
[
{
"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-06-09T00:23:27
| 2024-06-10T16:03:42
|
2024-06-09T02:59:24Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
VASP 6.4.3 introduced additional white space in the values of some parameters in the vasprun.xml, for example ` <i type="string" name="GGA ">PE</I>`. This leads to incorrect determination of `run_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/3870/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/3870/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3870",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3870",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3870.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3870.patch",
"merged_at": "2024-06-09T02:59:24Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3871
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3871/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3871/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3871/events
|
https://github.com/materialsproject/pymatgen/pull/3871
| 2,341,994,248
|
PR_kwDOACgets5x4LvL
| 3,871
|
Enable more ruff rules including `A`, `DTZ`, `PGH` and more
|
{
"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
}
|
[
{
"id": 5318918309,
"node_id": "LA_kwDOACgets8AAAABPQhApQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/linting",
"name": "linting",
"color": "5DBC83",
"default": false,
"description": "Linting and quality assurance"
},
{
"id": 5457867742,
"node_id": "LA_kwDOACgets8AAAABRVBz3g",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/breaking",
"name": "breaking",
"color": "41396E",
"default": false,
"description": "Breaking change"
},
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@DanielYang59 could you trigger the atomate2 tests?",
"@JaGeo Thanks for commenting. Can you let me how to achieve that? It should only be possible when pushing to `master` I guess?https://github.com/materialsproject/pymatgen/blob/624e6eb5cfefbf5736fe31b8910dd19c1042e94e/.github/workflows/test.yml#L94\r\n\r\nThis PR is still a type annotation improvement, and I don't expect much code functionality change :)",
"@DanielYang59 ah okay. Then, we will see after merging! Thanks!",
"@janosh Can you please advice on whether we want to fix [`A002`](https://docs.astral.sh/ruff/rules/builtin-argument-shadowing/)? It requires quite a lot of breaking argument renames.\r\n```\r\npymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py:770:46: A002 Argument `input` is shadowing a Python builtin\r\npymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py:1147:28: A002 Argument `type` is shadowing a Python builtin\r\npymatgen/cli/pmg_analyze.py:94:24: A002 Argument `dir` is shadowing a Python builtin\r\npymatgen/command_line/critic2_caller.py:354:9: A002 Argument `type` is shadowing a Python builtin\r\npymatgen/electronic_structure/dos.py:1091:9: A002 Argument `type` is shadowing a Python builtin\r\npymatgen/entries/correction_calculator.py:362:47: A002 Argument `dir` is shadowing a Python builtin\r\npymatgen/io/abinit/abitimer.py:721:65: A002 Argument `sorted` is shadowing a Python builtin\r\npymatgen/io/abinit/inputs.py:1100:30: A002 Argument `input` is shadowing a Python builtin\r\npymatgen/io/abinit/netcdf.py:104:24: A002 Argument `type` is shadowing a Python builtin\r\npymatgen/io/aims/parsers.py:108:28: A002 Argument `property` is shadowing a Python builtin\r\npymatgen/io/cp2k/utils.py:53:29: A002 Argument `dir` is shadowing a Python builtin\r\npymatgen/io/lammps/utils.py:193:9: A002 Argument `bin` is shadowing a Python builtin\r\npymatgen/io/lammps/utils.py:433:59: A002 Argument `bin` is shadowing a Python builtin\r\npymatgen/vis/structure_vtk.py:632:32: A002 Argument `type` is shadowing a Python builtin\r\ntests/io/aims/test_aims_inputs.py:77:32: A002 Argument `type` is shadowing a Python builtin\r\n```\r\n",
"> @janosh Can you please advice on whether we want to fix [A002](https://docs.astral.sh/ruff/rules/builtin-argument-shadowing/)? It requires quite a lot of breaking argument renames.\r\n\r\nlet's enable it to avoid builtin shadowing in the future but add `noqa: A002` for all existing cases to avoid breaking changes\r\n\r\nedit: the ones in `tests/` and `pymatgen/cli/` can likely be fixed without breaking changes",
"@janosh Ready for review! Thanks for your time as always :)",
"@janosh I replaced some already multi-lined dictionary constructor `dict()` with `{}` for speed in 47d72f3c3c1738f7926ab30e30cceb6d4c8ffae4, I know you don't want to introduce extra line, so I just replaced those that wouldn't do so. \r\n\r\nFrom my side, the [speed up](https://switowski.com/blog/dict-function-vs-literal-syntax/) is something I really want to have (2x - 4x, though being in the nanosecond level) :)",
"@shyuep Can I have your approval on the following potentially breaking change/fix (change some `ValueError` to `TypeError` where the type doesn't match)? Thanks!\r\n\r\n> [b1aa5bb](https://github.com/materialsproject/pymatgen/commit/b1aa5bbe8e55461fa2e59672d5762272218f681b) and [50e9b7d](https://github.com/materialsproject/pymatgen/commit/50e9b7ddee9764324795d84bff532ca6bc500ae1) changed multiple `ValueError` to more semantic `TypeError` to fix [`TRY004`](https://docs.astral.sh/ruff/rules/type-check-without-type-error/). this is breaking. however, downstream repercussions are expected to be small.\r\n\r\n\r\n",
"If the errors are not the type that are meant to be caught, it is fine to change the error type. What I mean is that if the error is something that happens because of a bad use of code. Rather than something like catching an expected exception case and then handling it in some way. ",
"Thanks for your reply!\r\n\r\nYes I could confirm those are exceptions we `raise` instead of catch (`try...except...`), see b1aa5bbe8e55461fa2e59672d5762272218f681b and 50e9b7ddee9764324795d84bff532ca6bc500ae1.\r\n\r\nMostly in the following pattern:\r\n```diff\r\nif not isinstance(variable, expected_type):\r\n- raise ValueError(\"variable should be in {expected_type}\")\r\n+ raise TypeError(\"variable should be in {expected_type}\")\r\n```\r\n\r\nStill it could be breaking if any downstream operation replies on catching a `ValueError`, but I would consider this a fix as the wrong type of exception was raised in the first place.\r\n\r\n",
"Thanks I have merged them,.",
"Thanks!"
] | 2024-06-09T03:12:40
| 2024-06-22T00:39:49
|
2024-06-21T15:11:33Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Enable more `ruff` rules
- Revert an accidental change in tests for `io.lobster.inputs` in https://github.com/materialsproject/pymatgen/pull/3848#discussion_r1632144875
- Other format tweaks
### Enable more [`ruff` rules](https://docs.astral.sh/ruff/rules/)
The following requires code change:
- [rule family `PGH`](https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh) for stricter typing
- [rule family `A`](https://docs.astral.sh/ruff/rules/#flake8-builtins-a) to avoid shadowing of builtins
> [!CAUTION]
> b1aa5bbe8e and 50e9b7dde changed multiple `ValueError` to more semantic `TypeError` to fix [`TRY004`](https://docs.astral.sh/ruff/rules/type-check-without-type-error/). this is breaking. however, downstream repercussions are expected to be small.
pinging @mkhorton @shyuep for approval
#### Future PR
- 7fac0b466bbb18372334b87c990c46a1096b6415 need to fix #3791
- Enable rule family `S` and `NPY`
### Other format tweaks
- Replace `match.group(x)` with `match[x]`
- Replace `array[0:x]` slicing with `array[:x]`
- Replace already multi-lined `dict()` constructor with `{}` [for speed](https://switowski.com/blog/dict-function-vs-literal-syntax/) (almost 2x-4x speedup).
|
{
"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/3871/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/3871/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3871",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3871",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3871.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3871.patch",
"merged_at": "2024-06-21T15:11:33Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3872
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3872/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3872/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3872/events
|
https://github.com/materialsproject/pymatgen/pull/3872
| 2,342,010,537
|
PR_kwDOACgets5x4OuV
| 3,872
|
Add `SymmetryUndetermined(ValueError)` exception 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
}
|
[] |
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-06-09T04:10:58
| 2024-06-09T04:25:28
|
2024-06-09T04:25:27Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
`spglib` will not raise if symmetry cannot be determined, but will instead return `None`. This is not currently handled in `SpacegroupAnalyzer`.
As a result, a common issue encountered is calling `Structure.get_space_group_info` for a structure where symmetry cannot be determined leading to an opaque `ValueError` from a non-sensical subscript (`None["international"]`). With this change, an error will now be raised which can be handled appropriately by the end user.
|
{
"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/3872/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/3872/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3872",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3872",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3872.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3872.patch",
"merged_at": "2024-06-09T04:25:27Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3873
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3873/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3873/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3873/events
|
https://github.com/materialsproject/pymatgen/pull/3873
| 2,342,732,504
|
PR_kwDOACgets5x6hPp
| 3,873
|
Improve types for `electronic_structure.{bandstructure/cohp}`
|
{
"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
}
|
[
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"One more thing: i feel we again need to install LobsterPy with these changes. If you have time for this, @DanielYang59 , this would be highly appreciated. (Atomate2 will now be done automtically at least)",
"> i feel we again need to install LobsterPy with these changes. \r\n\r\nI assume you mean \"test\" `LobsterPy`? Exactly, I don't expect any change in functionality, but being overly-cautious never hurts :) As mistakes could happen unexpectedly 00b7134352548d2fdb4852fa7aaa32096d4276ab. I would certainly test it before marking this for review.\r\n\r\n\r\n\r\n",
"> > i feel we again need to install LobsterPy with these changes.\r\n> \r\n> I assume you mean \"test\" `LobsterPy`? Exactly, I don't expect any change in functionality, but being overly-cautious never hurts :) As mistakes could happen unexpectedly [00b7134](https://github.com/materialsproject/pymatgen/commit/00b7134352548d2fdb4852fa7aaa32096d4276ab). I would certainly test it before marking this for review.\r\n\r\nYes, surely installing it and testing it. Thanks!",
"(Update: moved to PR description for discoverability) Drafted this bash script to make everyone's life easier.\r\n\r\n(**Update: fixed** in 8cfaa33e1314dd633a07a39ed19a20498efbe156) Which gives two errors on my Ubuntu machine.\r\n\r\n\r\n",
"@JaGeo @QuantumChemist @naik-aakash Tested on both Python 3.11 and Python 3.12 on Ubuntu 22.04 LTS (refer to the head of this PR for the bash script used), all tests passed :)\r\n\r\n## Full test log:\r\n\r\n\r\n### Python 3.11\r\n\r\n<details>\r\n<summary>Python 3.11 test log</summary>\r\n\r\n ```\r\n Channels:\r\n - conda-forge\r\n - nodefaults\r\n Platform: linux-64\r\n Collecting package metadata (repodata.json): done\r\n Solving environment: done\r\n \r\n ## Package Plan ##\r\n \r\n environment location: /home/yang/opt/miniconda3/envs/test_lobster\r\n \r\n added / updated specs:\r\n - python=3.11\r\n \r\n \r\n The following packages will be downloaded:\r\n \r\n package | build\r\n ---------------------------|-----------------\r\n _libgcc_mutex-0.1 | conda_forge 3 KB conda-forge\r\n _openmp_mutex-4.5 | 2_gnu 23 KB conda-forge\r\n bzip2-1.0.8 | hd590300_5 248 KB conda-forge\r\n ca-certificates-2024.6.2 | hbcca054_0 152 KB conda-forge\r\n ld_impl_linux-64-2.40 | hf3520f5_3 697 KB conda-forge\r\n libexpat-2.6.2 | h59595ed_0 72 KB conda-forge\r\n libffi-3.4.2 | h7f98852_5 57 KB conda-forge\r\n libgcc-ng-13.2.0 | h77fa898_9 784 KB conda-forge\r\n libgomp-13.2.0 | h77fa898_9 434 KB conda-forge\r\n libnsl-2.0.1 | hd590300_0 33 KB conda-forge\r\n libsqlite-3.46.0 | hde9e2c9_0 845 KB conda-forge\r\n libuuid-2.38.1 | h0b41bf4_0 33 KB conda-forge\r\n libxcrypt-4.4.36 | hd590300_1 98 KB conda-forge\r\n libzlib-1.3.1 | h4ab18f5_1 60 KB conda-forge\r\n ncurses-6.5 | h59595ed_0 867 KB conda-forge\r\n openssl-3.3.1 | h4ab18f5_0 2.8 MB conda-forge\r\n pip-24.0 | pyhd8ed1ab_0 1.3 MB conda-forge\r\n python-3.11.9 |hb806964_0_cpython 29.5 MB conda-forge\r\n readline-8.2 | h8228510_1 275 KB conda-forge\r\n setuptools-70.0.0 | pyhd8ed1ab_0 472 KB conda-forge\r\n tk-8.6.13 |noxft_h4845f30_101 3.2 MB conda-forge\r\n tzdata-2024a | h0c530f3_0 117 KB conda-forge\r\n wheel-0.43.0 | pyhd8ed1ab_1 57 KB conda-forge\r\n xz-5.2.6 | h166bdaf_0 409 KB conda-forge\r\n ------------------------------------------------------------\r\n Total: 42.3 MB\r\n \r\n The following NEW packages will be INSTALLED:\r\n \r\n _libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge\r\n _openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-2_gnu\r\n bzip2 conda-forge/linux-64::bzip2-1.0.8-hd590300_5\r\n ca-certificates conda-forge/linux-64::ca-certificates-2024.6.2-hbcca054_0\r\n ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.40-hf3520f5_3\r\n libexpat conda-forge/linux-64::libexpat-2.6.2-h59595ed_0\r\n libffi conda-forge/linux-64::libffi-3.4.2-h7f98852_5\r\n libgcc-ng conda-forge/linux-64::libgcc-ng-13.2.0-h77fa898_9\r\n libgomp conda-forge/linux-64::libgomp-13.2.0-h77fa898_9\r\n libnsl conda-forge/linux-64::libnsl-2.0.1-hd590300_0\r\n libsqlite conda-forge/linux-64::libsqlite-3.46.0-hde9e2c9_0\r\n libuuid conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0\r\n libxcrypt conda-forge/linux-64::libxcrypt-4.4.36-hd590300_1\r\n libzlib conda-forge/linux-64::libzlib-1.3.1-h4ab18f5_1\r\n ncurses conda-forge/linux-64::ncurses-6.5-h59595ed_0\r\n openssl conda-forge/linux-64::openssl-3.3.1-h4ab18f5_0\r\n pip conda-forge/noarch::pip-24.0-pyhd8ed1ab_0\r\n python conda-forge/linux-64::python-3.11.9-hb806964_0_cpython\r\n readline conda-forge/linux-64::readline-8.2-h8228510_1\r\n setuptools conda-forge/noarch::setuptools-70.0.0-pyhd8ed1ab_0\r\n tk conda-forge/linux-64::tk-8.6.13-noxft_h4845f30_101\r\n tzdata conda-forge/noarch::tzdata-2024a-h0c530f3_0\r\n wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1\r\n xz conda-forge/linux-64::xz-5.2.6-h166bdaf_0\r\n \r\n \r\n \r\n Downloading and Extracting Packages:\r\n \r\n Preparing transaction: done\r\n Verifying transaction: done\r\n Executing transaction: done\r\n #\r\n # To activate this environment, use\r\n #\r\n # $ conda activate test_lobster\r\n #\r\n # To deactivate an active environment, use\r\n #\r\n # $ conda deactivate\r\n \r\n Cloning into 'pymatgen'...\r\n remote: Enumerating objects: 2813, done.\r\n remote: Counting objects: 100% (2813/2813), done.\r\n remote: Compressing objects: 100% (2237/2237), done.\r\n remote: Total 2813 (delta 744), reused 1870 (delta 508), pack-reused 0\r\n Receiving objects: 100% (2813/2813), 238.96 MiB | 12.68 MiB/s, done.\r\n Resolving deltas: 100% (744/744), done.\r\n Updating files: 100% (2593/2593), done.\r\n Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\n Processing /home/yang/test_lobster/3.11/pymatgen\r\n Installing build dependencies ... done\r\n Getting requirements to build wheel ... done\r\n Installing backend dependencies ... done\r\n Preparing metadata (pyproject.toml) ... done\r\n Collecting matplotlib>=3.8 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/41/f1/115e7c79b4506b4f0533acba742babd9718ff92eeca6d4205843173b6173/matplotlib-3.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 41.2 MB/s eta 0:00:00\r\n Collecting monty>=2024.5.24 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ba/3f/80fe058dff77315c401f56aa46b7339d9bcc4a4d586d5b3487596f185c08/monty-2024.5.24-py3-none-any.whl (67 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.9/67.9 kB 8.9 MB/s eta 0:00:00\r\n Collecting networkx>=2.2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/38/e9/5f72929373e1a0e8d142a130f3f97e6ff920070f87f91c4e13e40e0fba5a/networkx-3.3-py3-none-any.whl (1.7 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 64.4 MB/s eta 0:00:00\r\n Collecting numpy>=1.25.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3a/d0/edc009c27b406c4f9cbc79274d6e46d634d139075492ad055e3d68445925/numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 40.8 MB/s eta 0:00:00\r\n Collecting palettable>=3.1.1 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cf/f7/3367feadd4ab56783b0971c9b7edfbdd68e0c70ce877949a5dd2117ed4a0/palettable-3.3.3-py2.py3-none-any.whl (332 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 332.3/332.3 kB 25.4 MB/s eta 0:00:00\r\n Collecting pandas>=2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fc/a5/4d82be566f069d7a9a702dcdf6f9106df0e0b042e738043c0cc7ddd7e3f6/pandas-2.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.0/13.0 MB 30.0 MB/s eta 0:00:00\r\n Collecting plotly>=4.5.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0b/f8/b65cdd2be32e442c4efe7b672f73c90b05eab5a7f3f4115efe181d432c60/plotly-5.22.0-py3-none-any.whl (16.4 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.4/16.4 MB 14.4 MB/s eta 0:00:00\r\n Collecting pybtex>=0.24.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ad/5f/40d8e90f985a05133a8895fc454c6127ecec3de8b095dd35bba91382f803/pybtex-0.24.0-py2.py3-none-any.whl (561 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 561.4/561.4 kB 11.4 MB/s eta 0:00:00\r\n Collecting requests>=2.32 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 8.7 MB/s eta 0:00:00\r\n Collecting ruamel.yaml>=0.17.0 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/73/67/8ece580cc363331d9a53055130f86b096bf16e38156e33b1d3014fffda6b/ruamel.yaml-0.18.6-py3-none-any.whl (117 kB)\r\n Collecting scipy>=1.13.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/36/07/035d22ff9795129c5a847c64cb43c1fa9188826b59344fee28a3ab02e283/scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.6 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.6/38.6 MB 23.2 MB/s eta 0:00:00\r\n Collecting spglib>=2.0.2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0c/37/cec788dc12d1ff38eb000b6cfaf03a28fc25a9b05c3f2e8dd51a7f2cd2d6/spglib-2.4.0-cp311-cp311-manylinux_2_17_x86_64.whl (809 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 809.2/809.2 kB 20.1 MB/s eta 0:00:00\r\n Collecting sympy>=1.2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/61/53/e18c8c97d0b2724d85c9830477e3ebea3acf1dcdc6deb344d5d9c93a9946/sympy-1.12.1-py3-none-any.whl (5.7 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 34.8 MB/s eta 0:00:00\r\n Collecting tabulate>=0.9 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.whl (35 kB)\r\n Collecting tqdm>=4.60 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/18/eb/fdb7eb9e48b7b02554e1664afd3bd3f117f6b6d6c5881438a0b055554f9b/tqdm-4.66.4-py3-none-any.whl (78 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB 9.5 MB/s eta 0:00:00\r\n Collecting uncertainties>=3.1.4 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/00/86/af0ecc6ea413c6880411c8857faa12ed9be70fa38c7741280592257615da/uncertainties-3.2.1-py3-none-any.whl (57 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.9/57.9 kB 7.3 MB/s eta 0:00:00\r\n Collecting joblib>=1 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/29/df4b9b42f2be0b623cbd5e2140cafcaa2bef0759a00b7b70104dcfe2fb51/joblib-1.4.2-py3-none-any.whl (301 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 301.8/301.8 kB 23.7 MB/s eta 0:00:00\r\n Collecting contourpy>=1.0.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ee/c0/9bd123d676eb61750e116a2cd915b06483fc406143cfc36c7f263f0f5368/contourpy-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (306 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 306.0/306.0 kB 24.3 MB/s eta 0:00:00\r\n Collecting cycler>=0.10 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl (8.3 kB)\r\n Collecting fonttools>=4.22.0 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0a/79/b5be063ea65d048a041ad8438fa1e8c7c4bf9dc3f4ac2794a850fe70c5c5/fonttools-4.53.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 38.2 MB/s eta 0:00:00\r\n Collecting kiwisolver>=1.3.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/17/ba/17a706b232308e65f57deeccae503c268292e6a091313f6ce833a23093ea/kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 39.8 MB/s eta 0:00:00\r\n Collecting packaging>=20.0 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl (53 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 7.9 MB/s eta 0:00:00\r\n Collecting pillow>=8 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/81/ff/ad3c942d865f9e45ce84eeb31795e6d4d94e1f1eea51026d5154028510d7/pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (4.5 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 38.9 MB/s eta 0:00:00\r\n Collecting pyparsing>=2.3.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl (103 kB)\r\n Collecting python-dateutil>=2.7 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)\r\n Collecting pytz>=2020.1 (from pandas>=2->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9c/3d/a121f284241f08268b21359bd425f7d4825cffc5ac5cd0e1b3d82ffd2b10/pytz-2024.1-py2.py3-none-any.whl (505 kB)\r\n Collecting tzdata>=2022.7 (from pandas>=2->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/65/58/f9c9e6be752e9fcb8b6a0ee9fb87e6e7a1f6bcab2cdc73f02bb7ba91ada0/tzdata-2024.1-py2.py3-none-any.whl (345 kB)\r\n Collecting tenacity>=6.2.0 (from plotly>=4.5.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/61/a1/6bb0cbebefb23641f068bb58a2bc56da9beb2b1c550242e3c540b37698f3/tenacity-8.3.0-py3-none-any.whl (25 kB)\r\n Collecting PyYAML>=3.01 (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/5e/efd033ab7199a0b2044dab3b9f7a4f6670e6a52c089de572e928d2873b06/PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.7/757.7 kB 34.5 MB/s eta 0:00:00\r\n Collecting latexcodec>=1.0.4 (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b0/bf/ea8887e9f31a8f93ca306699d11909c6140151393a4216f0d9f85a004077/latexcodec-3.0.0-py3-none-any.whl (18 kB)\r\n Collecting six (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)\r\n Collecting charset-normalizer<4,>=2 (from requests>=2.32->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/40/26/f35951c45070edc957ba40a5b1db3cf60a9dbb1b350c2d5bef03e01e61de/charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.3/140.3 kB 12.5 MB/s eta 0:00:00\r\n Collecting idna<4,>=2.5 (from requests>=2.32->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl (66 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 8.9 MB/s eta 0:00:00\r\n Collecting urllib3<3,>=1.21.1 (from requests>=2.32->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl (121 kB)\r\n Collecting certifi>=2017.4.17 (from requests>=2.32->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5b/11/1e78951465b4a225519b8c3ad29769c49e0d8d157a070f681d5b6d64737f/certifi-2024.6.2-py3-none-any.whl (164 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 164.4/164.4 kB 25.6 MB/s eta 0:00:00\r\n Collecting ruamel.yaml.clib>=0.2.7 (from ruamel.yaml>=0.17.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a4/f7/22d6b620ed895a05d40802d8281eff924dc6190f682d933d4efff60db3b5/ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (544 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 544.0/544.0 kB 39.1 MB/s eta 0:00:00\r\n Collecting mpmath<1.4.0,>=1.1.0 (from sympy>=1.2->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 29.3 MB/s eta 0:00:00\r\n Building wheels for collected packages: pymatgen\r\n Building wheel for pymatgen (pyproject.toml) ... done\r\n Created wheel for pymatgen: filename=pymatgen-2024.6.10-cp311-cp311-linux_x86_64.whl size=3560764 sha256=2e136c4503f73fd260dca3c603f79f0e4380a77cd2da3efe0dd5c7d961eaee95\r\n Stored in directory: /tmp/pip-ephem-wheel-cache-3ss5qgqt/wheels/18/89/da/b0bb88e0a7cf7165bd8b4a31afccdfdab45d9c31d3a3e310d1\r\n Successfully built pymatgen\r\n Installing collected packages: pytz, mpmath, urllib3, uncertainties, tzdata, tqdm, tenacity, tabulate, sympy, six, ruamel.yaml.clib, PyYAML, pyparsing, pillow, palettable, packaging, numpy, networkx, monty, latexcodec, kiwisolver, joblib, idna, fonttools, cycler, charset-normalizer, certifi, spglib, scipy, ruamel.yaml, requests, python-dateutil, pybtex, plotly, contourpy, pandas, matplotlib, pymatgen\r\n Successfully installed PyYAML-6.0.1 certifi-2024.6.2 charset-normalizer-3.3.2 contourpy-1.2.1 cycler-0.12.1 fonttools-4.53.0 idna-3.7 joblib-1.4.2 kiwisolver-1.4.5 latexcodec-3.0.0 matplotlib-3.9.0 monty-2024.5.24 mpmath-1.3.0 networkx-3.3 numpy-1.26.4 packaging-24.1 palettable-3.3.3 pandas-2.2.2 pillow-10.3.0 plotly-5.22.0 pybtex-0.24.0 pymatgen-2024.6.10 pyparsing-3.1.2 python-dateutil-2.9.0.post0 pytz-2024.1 requests-2.32.3 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 scipy-1.13.1 six-1.16.0 spglib-2.4.0 sympy-1.12.1 tabulate-0.9.0 tenacity-8.3.0 tqdm-4.66.4 tzdata-2024.1 uncertainties-3.2.1 urllib3-2.2.1\r\n Cloning into 'LobsterPy'...\r\n remote: Enumerating objects: 349, done.\r\n remote: Counting objects: 100% (349/349), done.\r\n remote: Compressing objects: 100% (322/322), done.\r\n remote: Total 349 (delta 26), reused 270 (delta 15), pack-reused 0\r\n Receiving objects: 100% (349/349), 93.03 MiB | 12.45 MiB/s, done.\r\n Resolving deltas: 100% (26/26), done.\r\n Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\n Obtaining file:///home/yang/test_lobster/3.11/LobsterPy\r\n Installing build dependencies ... done\r\n Checking if build backend supports build_editable ... done\r\n Getting requirements to build editable ... done\r\n Preparing editable metadata (pyproject.toml) ... done\r\n Requirement already satisfied: pymatgen>=2024.5.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from lobsterpy==0.4.4) (2024.6.10)\r\n Requirement already satisfied: numpy in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from lobsterpy==0.4.4) (1.26.4)\r\n Collecting typing (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/05/d9/6eebe19d46bd05360c9a9aae822e67a80f9242aabbfc58b641b957546607/typing-3.7.4.3.tar.gz (78 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.6/78.6 kB 1.1 MB/s eta 0:00:00\r\n Preparing metadata (setup.py) ... done\r\n Collecting pre-commit>=2.12.1 (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b9/0f/d6d0b4e2f5b2933a557087fc0560371aa545a18232d4d3427eb3bb3af12e/pre_commit-3.7.1-py2.py3-none-any.whl (204 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 204.3/204.3 kB 5.1 MB/s eta 0:00:00\r\n Collecting mendeleev==0.17.0 (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/70/b4/3af035bc0dc6916f7a7b8ff1029985b3c867f749420d30e8d25d779b155e/mendeleev-0.17.0-py3-none-any.whl (367 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 367.4/367.4 kB 14.1 MB/s eta 0:00:00\r\n Collecting flake8 (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e3/01/cc8cdec7b61db0315c2ab62d80677a138ef06832ec17f04d87e6ef858f7f/flake8-7.0.0-py2.py3-none-any.whl (57 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.6/57.6 kB 8.5 MB/s eta 0:00:00\r\n Collecting pytest (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/e7/81ebdd666d3bff6670d27349b5053605d83d55548e6bd5711f3b0ae7dd23/pytest-8.2.2-py3-none-any.whl (339 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 339.9/339.9 kB 12.0 MB/s eta 0:00:00\r\n Collecting pytest-mock (from lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f2/3b/b26f90f74e2986a82df6e7ac7e319b8ea7ccece1caec9f8ab6104dc70603/pytest_mock-3.14.0-py3-none-any.whl (9.9 kB)\r\n Collecting pytest-split (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/82/7dba24afe8ccd082adbc8128d972c6eb184e86e4c466c04aea983fc9b567/pytest_split-0.8.2-py3-none-any.whl (11 kB)\r\n Collecting pytest-cov (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/78/3a/af5b4fa5961d9a1e6237b530eb87dd04aea6eb83da09d2a4073d81b54ccf/pytest_cov-5.0.0-py3-none-any.whl (21 kB)\r\n Collecting Pygments<3.0.0,>=2.11.2 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl (1.2 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 17.7 MB/s eta 0:00:00\r\n Collecting SQLAlchemy>=1.4.0 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4d/21/87bcad723070f7cd5f9d45fb05557596aa1d23d19eef078b13edc9e31813/SQLAlchemy-2.0.30-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 52.5 MB/s eta 0:00:00\r\n Collecting colorama<0.5.0,>=0.4.6 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB)\r\n Requirement already satisfied: pandas>=1.0.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from mendeleev==0.17.0->lobsterpy==0.4.4) (2.2.2)\r\n Collecting pyfiglet<0.9,>=0.8.post1 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/33/07/fcfdd7a2872f5b348953de35acce1544dab0c1e8368dca54279b1cde5c15/pyfiglet-0.8.post1-py2.py3-none-any.whl (865 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 865.8/865.8 kB 45.6 MB/s eta 0:00:00\r\n Collecting cfgv>=2.0.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\r\n Collecting identify>=1.0.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/d3/d31b7fe744a3b2e6c51ea04af6575d1583deb09eb33cecfc99fa7644a725/identify-2.5.36-py2.py3-none-any.whl (98 kB)\r\n Collecting nodeenv>=0.11.1 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl (22 kB)\r\n Requirement already satisfied: pyyaml>=5.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pre-commit>=2.12.1->lobsterpy==0.4.4) (6.0.1)\r\n Collecting virtualenv>=20.10.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0a/02/085eee8570e807db9a1aa905e18c9123efec753ae9021b029115c6e0bb28/virtualenv-20.26.2-py3-none-any.whl (3.9 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 41.5 MB/s eta 0:00:00\r\n Requirement already satisfied: matplotlib>=3.8 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.9.0)\r\n Requirement already satisfied: monty>=2024.5.24 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2024.5.24)\r\n Requirement already satisfied: networkx>=2.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3)\r\n Requirement already satisfied: palettable>=3.1.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3.3)\r\n Requirement already satisfied: plotly>=4.5.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (5.22.0)\r\n Requirement already satisfied: pybtex>=0.24.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.24.0)\r\n Requirement already satisfied: requests>=2.32 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.32.3)\r\n Requirement already satisfied: ruamel.yaml>=0.17.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.18.6)\r\n Requirement already satisfied: scipy>=1.13.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.13.1)\r\n Requirement already satisfied: spglib>=2.0.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.4.0)\r\n Requirement already satisfied: sympy>=1.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.12.1)\r\n Requirement already satisfied: tabulate>=0.9 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.9.0)\r\n Requirement already satisfied: tqdm>=4.60 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (4.66.4)\r\n Requirement already satisfied: uncertainties>=3.1.4 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.2.1)\r\n Requirement already satisfied: joblib>=1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.4.2)\r\n Collecting mccabe<0.8.0,>=0.7.0 (from flake8->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)\r\n Collecting pycodestyle<2.12.0,>=2.11.0 (from flake8->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b1/90/a998c550d0ddd07e38605bb5c455d00fcc177a800ff9cc3dafdcb3dd7b56/pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)\r\n Collecting pyflakes<3.3.0,>=3.2.0 (from flake8->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d4/d7/f1b7db88d8e4417c5d47adad627a93547f44bdc9028372dbd2313f34a855/pyflakes-3.2.0-py2.py3-none-any.whl (62 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 9.3 MB/s eta 0:00:00\r\n Collecting iniconfig (from pytest->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl (5.9 kB)\r\n Requirement already satisfied: packaging in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pytest->lobsterpy==0.4.4) (24.1)\r\n Collecting pluggy<2.0,>=1.5 (from pytest->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl (20 kB)\r\n Collecting coverage>=5.2.1 (from coverage[toml]>=5.2.1->pytest-cov->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9c/38/d8d6616b3c5da0b6d6ab99a0141f8ba80e979596b360196240c96a67ac11/coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (235 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 235.4/235.4 kB 27.4 MB/s eta 0:00:00\r\n Requirement already satisfied: contourpy>=1.0.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.2.1)\r\n Requirement already satisfied: cycler>=0.10 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.12.1)\r\n Requirement already satisfied: fonttools>=4.22.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (4.53.0)\r\n Requirement already satisfied: kiwisolver>=1.3.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.4.5)\r\n Requirement already satisfied: pillow>=8 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (10.3.0)\r\n Requirement already satisfied: pyparsing>=2.3.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.1.2)\r\n Requirement already satisfied: python-dateutil>=2.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.9.0.post0)\r\n Requirement already satisfied: pytz>=2020.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pandas>=1.0.0->mendeleev==0.17.0->lobsterpy==0.4.4) (2024.1)\r\n Requirement already satisfied: tzdata>=2022.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pandas>=1.0.0->mendeleev==0.17.0->lobsterpy==0.4.4) (2024.1)\r\n Requirement already satisfied: tenacity>=6.2.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from plotly>=4.5.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (8.3.0)\r\n Requirement already satisfied: latexcodec>=1.0.4 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pybtex>=0.24.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.0.0)\r\n Requirement already satisfied: six in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pybtex>=0.24.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.16.0)\r\n Requirement already satisfied: charset-normalizer<4,>=2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3.2)\r\n Requirement already satisfied: idna<4,>=2.5 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.7)\r\n Requirement already satisfied: urllib3<3,>=1.21.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.2.1)\r\n Requirement already satisfied: certifi>=2017.4.17 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2024.6.2)\r\n Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from ruamel.yaml>=0.17.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.2.8)\r\n Collecting typing-extensions>=4.6.0 (from SQLAlchemy>=1.4.0->mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl (37 kB)\r\n Collecting greenlet!=0.4.17 (from SQLAlchemy>=1.4.0->mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/1f/12d5a6cc26e8b483c2e7975f9c22e088ac735c0d8dcb8a8f72d31a4e5f04/greenlet-3.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (620 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 620.0/620.0 kB 46.2 MB/s eta 0:00:00\r\n Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from sympy>=1.2->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.3.0)\r\n Collecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8e/41/9307e4f5f9976bc8b7fea0b66367734e8faf3ec84bc0d412d8cfabbb66cd/distlib-0.3.8-py2.py3-none-any.whl (468 kB)\r\n Collecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/44/aa/edf5205465b70cee020b711f1f4b6179a0ae369cc13aadb8f8ec6fd7d2f5/filelock-3.15.1-py3-none-any.whl (15 kB)\r\n Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/68/13/2aa1f0e1364feb2c9ef45302f387ac0bd81484e9c9a4c5688a322fbdfd08/platformdirs-4.2.2-py3-none-any.whl (18 kB)\r\n Checking if build backend supports build_editable ... done\r\n Building wheels for collected packages: lobsterpy, typing\r\n Building editable for lobsterpy (pyproject.toml) ... done\r\n Created wheel for lobsterpy: filename=lobsterpy-0.4.4-0.editable-py3-none-any.whl size=7702 sha256=59bc6be268f22b52ac6c6029902e814ac9130dad9b137b62c5949493bc88d4b1\r\n Stored in directory: /tmp/pip-ephem-wheel-cache-47b8007z/wheels/89/30/af/34fda415133490a968629c8a75021e934f2c53119afb6d7199\r\n Building wheel for typing (setup.py) ... done\r\n Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26306 sha256=d5afb329a0a00cd1bd8ffd21dc87f3598b72191b5ba6456134389fa9c54b501e\r\n Stored in directory: /home/yang/.cache/pip/wheels/b5/18/15/81cd7bec7677962c530a174f96440b7b7dfe9f2b1355db4426\r\n Successfully built lobsterpy typing\r\n Installing collected packages: pyfiglet, distlib, typing-extensions, typing, Pygments, pyflakes, pycodestyle, pluggy, platformdirs, nodeenv, mccabe, iniconfig, identify, greenlet, filelock, coverage, colorama, cfgv, virtualenv, SQLAlchemy, pytest, flake8, pytest-split, pytest-mock, pytest-cov, pre-commit, mendeleev, lobsterpy\r\n Successfully installed Pygments-2.18.0 SQLAlchemy-2.0.30 cfgv-3.4.0 colorama-0.4.6 coverage-7.5.3 distlib-0.3.8 filelock-3.15.1 flake8-7.0.0 greenlet-3.0.3 identify-2.5.36 iniconfig-2.0.0 lobsterpy-0.4.4 mccabe-0.7.0 mendeleev-0.17.0 nodeenv-1.9.1 platformdirs-4.2.2 pluggy-1.5.0 pre-commit-3.7.1 pycodestyle-2.11.1 pyfiglet-0.8.post1 pyflakes-3.2.0 pytest-8.2.2 pytest-cov-5.0.0 pytest-mock-3.14.0 pytest-split-0.8.2 typing-3.7.4.3 typing-extensions-4.12.2 virtualenv-20.26.2\r\n Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\n Collecting pytest-xdist\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6d/82/1d96bf03ee4c0fdc3c0cbe61470070e659ca78dc0086fb88b66c185e2449/pytest_xdist-3.6.1-py3-none-any.whl (46 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.1/46.1 kB 1.8 MB/s eta 0:00:00\r\n Collecting execnet>=2.1 (from pytest-xdist)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/09/2aea36ff60d16dd8879bdb2f5b3ee0ba8d08cbbdcdfe870e695ce3784385/execnet-2.1.1-py3-none-any.whl (40 kB)\r\n Requirement already satisfied: pytest>=7.0.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pytest-xdist) (8.2.2)\r\n Requirement already satisfied: iniconfig in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pytest>=7.0.0->pytest-xdist) (2.0.0)\r\n Requirement already satisfied: packaging in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pytest>=7.0.0->pytest-xdist) (24.1)\r\n Requirement already satisfied: pluggy<2.0,>=1.5 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.11/site-packages (from pytest>=7.0.0->pytest-xdist) (1.5.0)\r\n Installing collected packages: execnet, pytest-xdist\r\n Successfully installed execnet-2.1.1 pytest-xdist-3.6.1\r\n .........................................s...................................................................... [ 82%]\r\n ....................... [100%]\r\n ============================================================================== slowest 30 durations ===============================================================================\r\n 44.30s setup tests/cohp/test_describe.py::TestDescribe::test_text\r\n 30.51s call tests/featurize/test_batch.py::TestExceptions::test_batch_summary_featurizer_exception\r\n 20.82s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_overall\r\n 18.29s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_cdf_comp_range_coop\r\n 17.83s call tests/cli/test_cli.py::TestCLI::test_cli_interactive_plotter_coops\r\n 17.09s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_nacl_pymatgen_objs\r\n 15.90s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_orbitalwise\r\n 14.32s call tests/cohp/test_describe.py::TestDescribe::test_plot\r\n 13.92s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_without_json\r\n 12.78s call tests/cohp/test_describe.py::TestCalcQualityDescribeWarnings::test_warnings\r\n 9.39s setup tests/cohp/test_describe.py::TestDescribe::test_write_description\r\n 7.57s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_antibonding\r\n 7.36s call tests/featurize/test_core.py::TestFeaturizeLobsterpy::test_featurize_mp463\r\n 7.33s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json\r\n 7.32s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_bonding\r\n 7.25s call tests/featurize/test_batch.py::TestBatchStructureGraphs::test_batch_structure_graphs_all_bonds\r\n 7.22s call tests/featurize/test_batch.py::TestBatchStructureGraphs::test_batch_structure_graphs_cation_anion_bonds\r\n 7.02s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_coop\r\n 6.86s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cohp_overall\r\n 6.77s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cobi\r\n 6.66s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cohp_bonding\r\n 6.44s call tests/cli/test_cli.py::TestCLI::test_cli_with_poscar_lobster\r\n 6.30s call tests/cli/test_cli.py::TestCLI::test_nongz_file_cli\r\n 5.82s call tests/plotting/test_plotting.py::TestInteractiveCohpPlotter::test_plot_colors\r\n 5.77s call tests/cli/test_cli.py::TestCLI::test_calc_quality_summary_nacl\r\n 5.57s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_no_bonds\r\n 5.52s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_nacl_comp_range_orbital\r\n 5.32s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_nacl_comp_range_cobi_orbital\r\n 5.16s call tests/cli/test_cli.py::TestCLI::test_cli_interactive_plotter_cobi\r\n 5.08s call tests/structuregraph/test_graph.py::TestGraph::test_graph_nacl_close_fermi\r\n ============================================================================= short test summary info =============================================================================\r\n SKIPPED [1] tests/cli/test_cli.py:702: Only enable this test to regenerate test data\r\n 134 passed, 1 skipped in 484.81s (0:08:04)\r\n \r\n Remove all packages in environment /home/yang/opt/miniconda3/envs/test_lobster:\r\n ```\r\n\r\n</details>\r\n\r\n### Python 3.12\r\n\r\n<details>\r\n<summary>Python 3.12 test log</summary>\r\n\r\n```\r\nChannels:\r\n - conda-forge\r\n - nodefaults\r\nPlatform: linux-64\r\nCollecting package metadata (repodata.json): done\r\nSolving environment: done\r\n\r\n## Package Plan ##\r\n\r\n environment location: /home/yang/opt/miniconda3/envs/test_lobster\r\n\r\n added / updated specs:\r\n - python=3.12\r\n\r\n\r\nThe following packages will be downloaded:\r\n\r\n package | build\r\n ---------------------------|-----------------\r\n python-3.12.3 |hab00c5b_0_cpython 30.5 MB conda-forge\r\n ------------------------------------------------------------\r\n Total: 30.5 MB\r\n\r\nThe following NEW packages will be INSTALLED:\r\n\r\n _libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge\r\n _openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-2_gnu\r\n bzip2 conda-forge/linux-64::bzip2-1.0.8-hd590300_5\r\n ca-certificates conda-forge/linux-64::ca-certificates-2024.6.2-hbcca054_0\r\n ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.40-hf3520f5_3\r\n libexpat conda-forge/linux-64::libexpat-2.6.2-h59595ed_0\r\n libffi conda-forge/linux-64::libffi-3.4.2-h7f98852_5\r\n libgcc-ng conda-forge/linux-64::libgcc-ng-13.2.0-h77fa898_9\r\n libgomp conda-forge/linux-64::libgomp-13.2.0-h77fa898_9\r\n libnsl conda-forge/linux-64::libnsl-2.0.1-hd590300_0\r\n libsqlite conda-forge/linux-64::libsqlite-3.46.0-hde9e2c9_0\r\n libuuid conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0\r\n libxcrypt conda-forge/linux-64::libxcrypt-4.4.36-hd590300_1\r\n libzlib conda-forge/linux-64::libzlib-1.3.1-h4ab18f5_1\r\n ncurses conda-forge/linux-64::ncurses-6.5-h59595ed_0\r\n openssl conda-forge/linux-64::openssl-3.3.1-h4ab18f5_0\r\n pip conda-forge/noarch::pip-24.0-pyhd8ed1ab_0\r\n python conda-forge/linux-64::python-3.12.3-hab00c5b_0_cpython\r\n readline conda-forge/linux-64::readline-8.2-h8228510_1\r\n setuptools conda-forge/noarch::setuptools-70.0.0-pyhd8ed1ab_0\r\n tk conda-forge/linux-64::tk-8.6.13-noxft_h4845f30_101\r\n tzdata conda-forge/noarch::tzdata-2024a-h0c530f3_0\r\n wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1\r\n xz conda-forge/linux-64::xz-5.2.6-h166bdaf_0\r\n\r\n\r\n\r\nDownloading and Extracting Packages:\r\n\r\nPreparing transaction: done\r\nVerifying transaction: done\r\nExecuting transaction: done\r\n#\r\n# To activate this environment, use\r\n#\r\n# $ conda activate test_lobster\r\n#\r\n# To deactivate an active environment, use\r\n#\r\n# $ conda deactivate\r\n\r\nCloning into 'pymatgen'...\r\nremote: Enumerating objects: 2813, done.\r\nremote: Counting objects: 100% (2813/2813), done.\r\nremote: Compressing objects: 100% (2237/2237), done.\r\nremote: Total 2813 (delta 744), reused 1869 (delta 508), pack-reused 0\r\nReceiving objects: 100% (2813/2813), 238.96 MiB | 7.97 MiB/s, done.\r\nResolving deltas: 100% (744/744), done.\r\nUpdating files: 100% (2593/2593), done.\r\nLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\nProcessing /home/yang/test_lobster/3.12/pymatgen\r\n Installing build dependencies ... done\r\n Getting requirements to build wheel ... done\r\n Installing backend dependencies ... done\r\n Preparing metadata (pyproject.toml) ... done\r\nCollecting matplotlib>=3.8 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f4/ff/da311c1e679eed54d3aed67754a4e859bd3b773060c2fa187962e60fcb85/matplotlib-3.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 22.7 MB/s eta 0:00:00\r\nCollecting monty>=2024.5.24 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ba/3f/80fe058dff77315c401f56aa46b7339d9bcc4a4d586d5b3487596f185c08/monty-2024.5.24-py3-none-any.whl (67 kB)\r\nCollecting networkx>=2.2 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/38/e9/5f72929373e1a0e8d142a130f3f97e6ff920070f87f91c4e13e40e0fba5a/networkx-3.3-py3-none-any.whl (1.7 MB)\r\nCollecting numpy>=1.25.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0f/50/de23fde84e45f5c4fda2488c759b69990fd4512387a8632860f3ac9cd225/numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 40.8 MB/s eta 0:00:00\r\nCollecting palettable>=3.1.1 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cf/f7/3367feadd4ab56783b0971c9b7edfbdd68e0c70ce877949a5dd2117ed4a0/palettable-3.3.3-py2.py3-none-any.whl (332 kB)\r\nCollecting pandas>=2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/40/10/79e52ef01dfeb1c1ca47a109a01a248754ebe990e159a844ece12914de83/pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.7 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.7/12.7 MB 40.1 MB/s eta 0:00:00\r\nCollecting plotly>=4.5.0 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0b/f8/b65cdd2be32e442c4efe7b672f73c90b05eab5a7f3f4115efe181d432c60/plotly-5.22.0-py3-none-any.whl (16.4 MB)\r\nCollecting pybtex>=0.24.0 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ad/5f/40d8e90f985a05133a8895fc454c6127ecec3de8b095dd35bba91382f803/pybtex-0.24.0-py2.py3-none-any.whl (561 kB)\r\nCollecting requests>=2.32 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB)\r\nCollecting ruamel.yaml>=0.17.0 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/73/67/8ece580cc363331d9a53055130f86b096bf16e38156e33b1d3014fffda6b/ruamel.yaml-0.18.6-py3-none-any.whl (117 kB)\r\nCollecting scipy>=1.13.0 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/88/ab/6ecdc526d509d33814835447bbbeedbebdec7cca46ef495a61b00a35b4bf/scipy-1.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.2 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.2/38.2 MB 13.0 MB/s eta 0:00:00\r\nCollecting spglib>=2.0.2 (from pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d9/29/9bd61aea1b3bfc294b51c2dbc2160d99b643799c1409f4301fcd1745ed0d/spglib-2.4.0-cp312-cp312-manylinux_2_35_x86_64.whl (819 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.7/819.7 kB 13.1 MB/s eta 0:00:00\r\nCollecting sympy>=1.2 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/53/e18c8c97d0b2724d85c9830477e3ebea3acf1dcdc6deb344d5d9c93a9946/sympy-1.12.1-py3-none-any.whl (5.7 MB)\r\nCollecting tabulate>=0.9 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.whl (35 kB)\r\nCollecting tqdm>=4.60 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/eb/fdb7eb9e48b7b02554e1664afd3bd3f117f6b6d6c5881438a0b055554f9b/tqdm-4.66.4-py3-none-any.whl (78 kB)\r\nCollecting uncertainties>=3.1.4 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/00/86/af0ecc6ea413c6880411c8857faa12ed9be70fa38c7741280592257615da/uncertainties-3.2.1-py3-none-any.whl (57 kB)\r\nCollecting joblib>=1 (from pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/91/29/df4b9b42f2be0b623cbd5e2140cafcaa2bef0759a00b7b70104dcfe2fb51/joblib-1.4.2-py3-none-any.whl (301 kB)\r\nCollecting contourpy>=1.0.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/01/29/65d81d2546a2487d57e16b2b789bbc0279b081766a75587e60002f16a6b8/contourpy-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (309 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 309.2/309.2 kB 12.3 MB/s eta 0:00:00\r\nCollecting cycler>=0.10 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl (8.3 kB)\r\nCollecting fonttools>=4.22.0 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3a/4a/9ad09a38b4ebdaead66ad8abd5d1a74fe6db7b62cb3d2f148898cfd2f37b/fonttools-4.53.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 15.1 MB/s eta 0:00:00\r\nCollecting kiwisolver>=1.3.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e3/d5/bc0f22ac108743062ab703f8d6d71c9c7b077b8839fa358700bfb81770b8/kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 18.4 MB/s eta 0:00:00\r\nCollecting packaging>=20.0 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl (53 kB)\r\nCollecting pillow>=8 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/c1/3521ddb9c1f3ac106af3e4512a98c785b6ed8a39e0f778480b8a4d340165/pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.5 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 21.3 MB/s eta 0:00:00\r\nCollecting pyparsing>=2.3.1 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl (103 kB)\r\nCollecting python-dateutil>=2.7 (from matplotlib>=3.8->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)\r\nCollecting pytz>=2020.1 (from pandas>=2->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9c/3d/a121f284241f08268b21359bd425f7d4825cffc5ac5cd0e1b3d82ffd2b10/pytz-2024.1-py2.py3-none-any.whl (505 kB)\r\nCollecting tzdata>=2022.7 (from pandas>=2->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/65/58/f9c9e6be752e9fcb8b6a0ee9fb87e6e7a1f6bcab2cdc73f02bb7ba91ada0/tzdata-2024.1-py2.py3-none-any.whl (345 kB)\r\nCollecting tenacity>=6.2.0 (from plotly>=4.5.0->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/a1/6bb0cbebefb23641f068bb58a2bc56da9beb2b1c550242e3c540b37698f3/tenacity-8.3.0-py3-none-any.whl (25 kB)\r\nCollecting PyYAML>=3.01 (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b4/33/720548182ffa8344418126017aa1d4ab4aeec9a2275f04ce3f3573d8ace8/PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 725.0/725.0 kB 20.3 MB/s eta 0:00:00\r\nCollecting latexcodec>=1.0.4 (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/bf/ea8887e9f31a8f93ca306699d11909c6140151393a4216f0d9f85a004077/latexcodec-3.0.0-py3-none-any.whl (18 kB)\r\nCollecting six (from pybtex>=0.24.0->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)\r\nCollecting charset-normalizer<4,>=2 (from requests>=2.32->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ee/fb/14d30eb4956408ee3ae09ad34299131fb383c47df355ddb428a7331cfa1e/charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 141.9/141.9 kB 15.4 MB/s eta 0:00:00\r\nCollecting idna<4,>=2.5 (from requests>=2.32->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl (66 kB)\r\nCollecting urllib3<3,>=1.21.1 (from requests>=2.32->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl (121 kB)\r\nCollecting certifi>=2017.4.17 (from requests>=2.32->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/5b/11/1e78951465b4a225519b8c3ad29769c49e0d8d157a070f681d5b6d64737f/certifi-2024.6.2-py3-none-any.whl (164 kB)\r\nCollecting ruamel.yaml.clib>=0.2.7 (from ruamel.yaml>=0.17.0->pymatgen==2024.6.10)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/30/d3/5fe978cd01a61c12efd24d65fa68c6f28f28c8073a06cf11db3a854390ca/ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (734 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 734.6/734.6 kB 20.6 MB/s eta 0:00:00\r\nCollecting mpmath<1.4.0,>=1.1.0 (from sympy>=1.2->pymatgen==2024.6.10)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB)\r\nBuilding wheels for collected packages: pymatgen\r\n Building wheel for pymatgen (pyproject.toml) ... done\r\n Created wheel for pymatgen: filename=pymatgen-2024.6.10-cp312-cp312-linux_x86_64.whl size=3564715 sha256=5a49cc11f5efb8fc4525f84dc77dedcfb44f69947003854de44da65adcb89058\r\n Stored in directory: /tmp/pip-ephem-wheel-cache-vjvxx4wl/wheels/d2/25/f9/57ac74df41442cc8fed781c6fd9b99dfc3dff4acf0f03975a5\r\nSuccessfully built pymatgen\r\nInstalling collected packages: pytz, mpmath, urllib3, uncertainties, tzdata, tqdm, tenacity, tabulate, sympy, six, ruamel.yaml.clib, PyYAML, pyparsing, pillow, palettable, packaging, numpy, networkx, monty, latexcodec, kiwisolver, joblib, idna, fonttools, cycler, charset-normalizer, certifi, spglib, scipy, ruamel.yaml, requests, python-dateutil, pybtex, plotly, contourpy, pandas, matplotlib, pymatgen\r\nSuccessfully installed PyYAML-6.0.1 certifi-2024.6.2 charset-normalizer-3.3.2 contourpy-1.2.1 cycler-0.12.1 fonttools-4.53.0 idna-3.7 joblib-1.4.2 kiwisolver-1.4.5 latexcodec-3.0.0 matplotlib-3.9.0 monty-2024.5.24 mpmath-1.3.0 networkx-3.3 numpy-1.26.4 packaging-24.1 palettable-3.3.3 pandas-2.2.2 pillow-10.3.0 plotly-5.22.0 pybtex-0.24.0 pymatgen-2024.6.10 pyparsing-3.1.2 python-dateutil-2.9.0.post0 pytz-2024.1 requests-2.32.3 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 scipy-1.13.1 six-1.16.0 spglib-2.4.0 sympy-1.12.1 tabulate-0.9.0 tenacity-8.3.0 tqdm-4.66.4 tzdata-2024.1 uncertainties-3.2.1 urllib3-2.2.1\r\nCloning into 'LobsterPy'...\r\nremote: Enumerating objects: 349, done.\r\nremote: Counting objects: 100% (349/349), done.\r\nremote: Compressing objects: 100% (322/322), done.\r\nremote: Total 349 (delta 26), reused 272 (delta 15), pack-reused 0\r\nReceiving objects: 100% (349/349), 93.03 MiB | 12.51 MiB/s, done.\r\nResolving deltas: 100% (26/26), done.\r\nLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\nObtaining file:///home/yang/test_lobster/3.12/LobsterPy\r\n Installing build dependencies ... done\r\n Checking if build backend supports build_editable ... done\r\n Getting requirements to build editable ... done\r\n Preparing editable metadata (pyproject.toml) ... done\r\nRequirement already satisfied: pymatgen>=2024.5.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from lobsterpy==0.4.4) (2024.6.10)\r\nRequirement already satisfied: numpy in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from lobsterpy==0.4.4) (1.26.4)\r\nCollecting typing (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/05/d9/6eebe19d46bd05360c9a9aae822e67a80f9242aabbfc58b641b957546607/typing-3.7.4.3.tar.gz (78 kB)\r\n Preparing metadata (setup.py) ... done\r\nCollecting pre-commit>=2.12.1 (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/0f/d6d0b4e2f5b2933a557087fc0560371aa545a18232d4d3427eb3bb3af12e/pre_commit-3.7.1-py2.py3-none-any.whl (204 kB)\r\nCollecting mendeleev==0.17.0 (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/70/b4/3af035bc0dc6916f7a7b8ff1029985b3c867f749420d30e8d25d779b155e/mendeleev-0.17.0-py3-none-any.whl (367 kB)\r\nCollecting flake8 (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e3/01/cc8cdec7b61db0315c2ab62d80677a138ef06832ec17f04d87e6ef858f7f/flake8-7.0.0-py2.py3-none-any.whl (57 kB)\r\nCollecting pytest (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4e/e7/81ebdd666d3bff6670d27349b5053605d83d55548e6bd5711f3b0ae7dd23/pytest-8.2.2-py3-none-any.whl (339 kB)\r\nCollecting pytest-mock (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/3b/b26f90f74e2986a82df6e7ac7e319b8ea7ccece1caec9f8ab6104dc70603/pytest_mock-3.14.0-py3-none-any.whl (9.9 kB)\r\nCollecting pytest-split (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/82/7dba24afe8ccd082adbc8128d972c6eb184e86e4c466c04aea983fc9b567/pytest_split-0.8.2-py3-none-any.whl (11 kB)\r\nCollecting pytest-cov (from lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/78/3a/af5b4fa5961d9a1e6237b530eb87dd04aea6eb83da09d2a4073d81b54ccf/pytest_cov-5.0.0-py3-none-any.whl (21 kB)\r\nCollecting Pygments<3.0.0,>=2.11.2 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl (1.2 MB)\r\nCollecting SQLAlchemy>=1.4.0 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/51/b8/3fd88455562518b6e8b97c4bc5784a819bd0a5c26be2a3409d3245626fac/SQLAlchemy-2.0.30-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 12.6 MB/s eta 0:00:00\r\nCollecting colorama<0.5.0,>=0.4.6 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB)\r\nRequirement already satisfied: pandas<3.0,>=2.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from mendeleev==0.17.0->lobsterpy==0.4.4) (2.2.2)\r\nCollecting pyfiglet<0.9,>=0.8.post1 (from mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/33/07/fcfdd7a2872f5b348953de35acce1544dab0c1e8368dca54279b1cde5c15/pyfiglet-0.8.post1-py2.py3-none-any.whl (865 kB)\r\nCollecting cfgv>=2.0.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\r\nCollecting identify>=1.0.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/d3/d31b7fe744a3b2e6c51ea04af6575d1583deb09eb33cecfc99fa7644a725/identify-2.5.36-py2.py3-none-any.whl (98 kB)\r\nCollecting nodeenv>=0.11.1 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl (22 kB)\r\nRequirement already satisfied: pyyaml>=5.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pre-commit>=2.12.1->lobsterpy==0.4.4) (6.0.1)\r\nCollecting virtualenv>=20.10.0 (from pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0a/02/085eee8570e807db9a1aa905e18c9123efec753ae9021b029115c6e0bb28/virtualenv-20.26.2-py3-none-any.whl (3.9 MB)\r\nRequirement already satisfied: matplotlib>=3.8 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.9.0)\r\nRequirement already satisfied: monty>=2024.5.24 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2024.5.24)\r\nRequirement already satisfied: networkx>=2.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3)\r\nRequirement already satisfied: palettable>=3.1.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3.3)\r\nRequirement already satisfied: plotly>=4.5.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (5.22.0)\r\nRequirement already satisfied: pybtex>=0.24.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.24.0)\r\nRequirement already satisfied: requests>=2.32 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.32.3)\r\nRequirement already satisfied: ruamel.yaml>=0.17.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.18.6)\r\nRequirement already satisfied: scipy>=1.13.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.13.1)\r\nRequirement already satisfied: spglib>=2.0.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.4.0)\r\nRequirement already satisfied: sympy>=1.2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.12.1)\r\nRequirement already satisfied: tabulate>=0.9 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.9.0)\r\nRequirement already satisfied: tqdm>=4.60 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (4.66.4)\r\nRequirement already satisfied: uncertainties>=3.1.4 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.2.1)\r\nRequirement already satisfied: joblib>=1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.4.2)\r\nCollecting mccabe<0.8.0,>=0.7.0 (from flake8->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)\r\nCollecting pycodestyle<2.12.0,>=2.11.0 (from flake8->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b1/90/a998c550d0ddd07e38605bb5c455d00fcc177a800ff9cc3dafdcb3dd7b56/pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)\r\nCollecting pyflakes<3.3.0,>=3.2.0 (from flake8->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d4/d7/f1b7db88d8e4417c5d47adad627a93547f44bdc9028372dbd2313f34a855/pyflakes-3.2.0-py2.py3-none-any.whl (62 kB)\r\nCollecting iniconfig (from pytest->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl (5.9 kB)\r\nRequirement already satisfied: packaging in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pytest->lobsterpy==0.4.4) (24.1)\r\nCollecting pluggy<2.0,>=1.5 (from pytest->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl (20 kB)\r\nCollecting coverage>=5.2.1 (from coverage[toml]>=5.2.1->pytest-cov->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0e/39/c44111cfc5e40fc1681a41b96911fba6560b51172b59c204b08b75d58495/coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 236.3/236.3 kB 24.9 MB/s eta 0:00:00\r\nRequirement already satisfied: contourpy>=1.0.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.2.1)\r\nRequirement already satisfied: cycler>=0.10 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.12.1)\r\nRequirement already satisfied: fonttools>=4.22.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (4.53.0)\r\nRequirement already satisfied: kiwisolver>=1.3.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.4.5)\r\nRequirement already satisfied: pillow>=8 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (10.3.0)\r\nRequirement already satisfied: pyparsing>=2.3.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.1.2)\r\nRequirement already satisfied: python-dateutil>=2.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from matplotlib>=3.8->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.9.0.post0)\r\nRequirement already satisfied: pytz>=2020.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pandas<3.0,>=2.1->mendeleev==0.17.0->lobsterpy==0.4.4) (2024.1)\r\nRequirement already satisfied: tzdata>=2022.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pandas<3.0,>=2.1->mendeleev==0.17.0->lobsterpy==0.4.4) (2024.1)\r\nRequirement already satisfied: tenacity>=6.2.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from plotly>=4.5.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (8.3.0)\r\nRequirement already satisfied: latexcodec>=1.0.4 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pybtex>=0.24.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.0.0)\r\nRequirement already satisfied: six in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pybtex>=0.24.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.16.0)\r\nRequirement already satisfied: charset-normalizer<4,>=2 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.3.2)\r\nRequirement already satisfied: idna<4,>=2.5 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (3.7)\r\nRequirement already satisfied: urllib3<3,>=1.21.1 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2.2.1)\r\nRequirement already satisfied: certifi>=2017.4.17 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from requests>=2.32->pymatgen>=2024.5.1->lobsterpy==0.4.4) (2024.6.2)\r\nRequirement already satisfied: ruamel.yaml.clib>=0.2.7 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from ruamel.yaml>=0.17.0->pymatgen>=2024.5.1->lobsterpy==0.4.4) (0.2.8)\r\nCollecting typing-extensions>=4.6.0 (from SQLAlchemy>=1.4.0->mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl (37 kB)\r\nCollecting greenlet!=0.4.17 (from SQLAlchemy>=1.4.0->mendeleev==0.17.0->lobsterpy==0.4.4)\r\n Downloading https://pypi.tuna.tsinghua.edu.cn/packages/bd/37/56b0da468a85e7704f3b2bc045015301bdf4be2184a44868c71f6dca6fe2/greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (625 kB)\r\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 625.7/625.7 kB 32.5 MB/s eta 0:00:00\r\nRequirement already satisfied: mpmath<1.4.0,>=1.1.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from sympy>=1.2->pymatgen>=2024.5.1->lobsterpy==0.4.4) (1.3.0)\r\nCollecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8e/41/9307e4f5f9976bc8b7fea0b66367734e8faf3ec84bc0d412d8cfabbb66cd/distlib-0.3.8-py2.py3-none-any.whl (468 kB)\r\nCollecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/44/aa/edf5205465b70cee020b711f1f4b6179a0ae369cc13aadb8f8ec6fd7d2f5/filelock-3.15.1-py3-none-any.whl (15 kB)\r\nCollecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit>=2.12.1->lobsterpy==0.4.4)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/68/13/2aa1f0e1364feb2c9ef45302f387ac0bd81484e9c9a4c5688a322fbdfd08/platformdirs-4.2.2-py3-none-any.whl (18 kB)\r\nChecking if build backend supports build_editable ... done\r\nBuilding wheels for collected packages: lobsterpy, typing\r\n Building editable for lobsterpy (pyproject.toml) ... done\r\n Created wheel for lobsterpy: filename=lobsterpy-0.4.4-0.editable-py3-none-any.whl size=7702 sha256=998d6034524ca3385a8818900c4f899a2504d79843fa7b4bc905adf8b7862a34\r\n Stored in directory: /tmp/pip-ephem-wheel-cache-i92p09q_/wheels/15/07/f3/4d8fb198fa9bc206347b77c0b0223683ba14181c7ff026ec90\r\n Building wheel for typing (setup.py) ... done\r\n Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26306 sha256=c4482c8e70738261ba79f3f530ddb86b15bc944396c5b7b780691237c4681991\r\n Stored in directory: /home/yang/.cache/pip/wheels/31/de/bc/5c19646eeaedc29a425a8dfd0a867e0ea8330fde03ffccb4ef\r\nSuccessfully built lobsterpy typing\r\nInstalling collected packages: pyfiglet, distlib, typing-extensions, typing, Pygments, pyflakes, pycodestyle, pluggy, platformdirs, nodeenv, mccabe, iniconfig, identify, greenlet, filelock, coverage, colorama, cfgv, virtualenv, SQLAlchemy, pytest, flake8, pytest-split, pytest-mock, pytest-cov, pre-commit, mendeleev, lobsterpy\r\nSuccessfully installed Pygments-2.18.0 SQLAlchemy-2.0.30 cfgv-3.4.0 colorama-0.4.6 coverage-7.5.3 distlib-0.3.8 filelock-3.15.1 flake8-7.0.0 greenlet-3.0.3 identify-2.5.36 iniconfig-2.0.0 lobsterpy-0.4.4 mccabe-0.7.0 mendeleev-0.17.0 nodeenv-1.9.1 platformdirs-4.2.2 pluggy-1.5.0 pre-commit-3.7.1 pycodestyle-2.11.1 pyfiglet-0.8.post1 pyflakes-3.2.0 pytest-8.2.2 pytest-cov-5.0.0 pytest-mock-3.14.0 pytest-split-0.8.2 typing-3.7.4.3 typing-extensions-4.12.2 virtualenv-20.26.2\r\nLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\r\nCollecting pytest-xdist\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6d/82/1d96bf03ee4c0fdc3c0cbe61470070e659ca78dc0086fb88b66c185e2449/pytest_xdist-3.6.1-py3-none-any.whl (46 kB)\r\nCollecting execnet>=2.1 (from pytest-xdist)\r\n Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/09/2aea36ff60d16dd8879bdb2f5b3ee0ba8d08cbbdcdfe870e695ce3784385/execnet-2.1.1-py3-none-any.whl (40 kB)\r\nRequirement already satisfied: pytest>=7.0.0 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pytest-xdist) (8.2.2)\r\nRequirement already satisfied: iniconfig in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pytest>=7.0.0->pytest-xdist) (2.0.0)\r\nRequirement already satisfied: packaging in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pytest>=7.0.0->pytest-xdist) (24.1)\r\nRequirement already satisfied: pluggy<2.0,>=1.5 in /home/yang/opt/miniconda3/envs/test_lobster/lib/python3.12/site-packages (from pytest>=7.0.0->pytest-xdist) (1.5.0)\r\nInstalling collected packages: execnet, pytest-xdist\r\nSuccessfully installed execnet-2.1.1 pytest-xdist-3.6.1\r\n.........................................s............................................................................................. [100%]\r\n============================================================================== slowest 30 durations ===============================================================================\r\n282.73s call tests/cohp/test_describe.py::TestDescribe::test_plot\r\n44.16s setup tests/cohp/test_describe.py::TestDescribe::test_text\r\n29.69s call tests/featurize/test_batch.py::TestExceptions::test_batch_summary_featurizer_exception\r\n20.66s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_overall\r\n17.00s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_nacl_pymatgen_objs\r\n16.83s call tests/cli/test_cli.py::TestCLI::test_cli_interactive_plotter_coops\r\n16.52s setup tests/cohp/test_analyze.py::TestAnalyse::test_all_attributes_cdf_comp_range_coop\r\n16.05s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_orbitalwise\r\n14.52s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_without_json\r\n11.25s call tests/cohp/test_describe.py::TestCalcQualityDescribeWarnings::test_warnings\r\n9.20s setup tests/cohp/test_describe.py::TestDescribe::test_write_description\r\n7.63s call tests/featurize/test_batch.py::TestBatchStructureGraphs::test_batch_structure_graphs_all_bonds\r\n7.61s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_antibonding\r\n7.57s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json\r\n7.42s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_coop\r\n7.39s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_json_bonding\r\n7.15s call tests/featurize/test_core.py::TestFeaturizeLobsterpy::test_featurize_mp463\r\n7.10s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cobi\r\n7.04s call tests/featurize/test_batch.py::TestBatchStructureGraphs::test_batch_structure_graphs_cation_anion_bonds\r\n6.76s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cohp_bonding\r\n6.68s call tests/featurize/test_batch.py::TestBatchCoxxFingerprint::test_fp_cohp_overall\r\n6.02s call tests/cli/test_cli.py::TestCLI::test_nongz_file_cli\r\n5.85s call tests/cli/test_cli.py::TestCLI::test_cli_with_poscar_lobster\r\n5.47s call tests/featurize/test_batch.py::TestBatchSummaryFeaturizer::test_summary_featurize_with_no_bonds\r\n5.42s call tests/plotting/test_plotting.py::TestInteractiveCohpPlotter::test_plot_colors\r\n5.41s call tests/structuregraph/test_graph.py::TestGraph::test_graph_nacl_close_fermi\r\n5.25s call tests/structuregraph/test_graph.py::TestGraph::test_graph_cdf_all\r\n5.24s call tests/cli/test_cli.py::TestCLI::test_calc_quality_summary_nacl\r\n5.22s setup tests/cohp/test_analyze.py::TestAnalyse::test_final_dicts\r\n4.99s setup tests/plotting/test_plotting.py::TestInteractiveCohpPlotter::test_add_all_relevant_cohps_nacl_cobi_orb\r\n============================================================================= short test summary info =============================================================================\r\nSKIPPED [1] tests/cli/test_cli.py:702: Only enable this test to regenerate test data\r\n134 passed, 1 skipped in 740.84s (0:12:20)\r\n\r\nRemove all packages in environment /home/yang/opt/miniconda3/envs/test_lobster:\r\n```\r\n\r\n\r\n</details>\r\n\r\n",
"@DanielYang59 Great, I am fine if this gets merged now. We will see if atomate2 tests pass after merging.",
"> Great, I am fine if this gets merged now. We will see if atomate2 tests pass after merging.\r\n\r\nThanks for the quick reply and the confirmation. Perhaps I would need to wait until other parts of this PR is reviewed too :) Mostly `electronic_structure.bandstructure`.\r\n\r\nHopefully that script could make everyone's life easier because I might do more typing/cleaning work for `io.lobster.outputs` later :)",
"@janosh Can you please review this at your convenience? Thanks :)",
"All good, thanks for reviewing. I would clean up the merge conflicts in #3880 to get it ready for review. Thanks for your time :)"
] | 2024-06-10T03:02:09
| 2024-08-09T00:11:48
|
2024-08-03T13:46:46Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Improve type annotations and docstring for `electronic_structure`
- [x] `bandstructure`
- [x] `cohp`
- Replace unnecessary single-item list extend with `append` in 8e252388e718415140142a69605896342a5e16c3 [for performance](https://stackoverflow.com/questions/725782/in-python-what-is-the-difference-between-append-and)
> [!CAUTION]
> Change the cell translation vector `translation` from `list[float]` to `tuple[float, float, float] (Vector3D)` in 9551db207ce444119b35b5881e71e26c38527d74 and 5fcf23619fa804e31b0f7e2d521821a2552c6474
### New custom type
- Add a custom type `SpinLike`: https://github.com/materialsproject/pymatgen/blob/c83d5d5280cf0004f7d3571b7afc41b7604d8124/pymatgen/electronic_structure/cohp.py#L120-L121
### Script for testing `lobsterpy`
<details>
<summary>Bash script</summary>
```bash
#!/bin/bash -l
CONDA_PROFILE="/opt/anaconda3/etc/profile.d/conda.sh"
ENV_NAME="test_lobster"
PYTHON_VERSION="3.11"
PMG_REPO="https://github.com/DanielYang59/pymatgen.git"
PMG_BRANCH="type-elec-struct"
LOBSTERPY_REPO="https://github.com/JaGeo/LobsterPy.git"
# Functions
function create_and_activate_env() {
conda create -y -n $ENV_NAME python=$PYTHON_VERSION
conda activate $ENV_NAME
}
function clone_and_install_pymatgen() {
git clone --depth 1 -b $PMG_BRANCH $PMG_REPO
cd pymatgen
pip install .
cd ..
}
function clone_and_install_lobsterpy() {
git clone --depth 1 $LOBSTERPY_REPO
cd LobsterPy
pip install -e '.[featurizer,dev,tests]'
pip install pytest-xdist
cd ..
}
function run_pytest() {
cd LobsterPy
pytest tests --maxfail=1000
cd ..
}
function remove_env() {
conda deactivate
conda env remove -n $ENV_NAME -y
}
# Main Script
source $CONDA_PROFILE
create_and_activate_env
clone_and_install_pymatgen
clone_and_install_lobsterpy
run_pytest
remove_env
```
</details>
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3873/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/3873/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3873",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3873",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3873.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3873.patch",
"merged_at": "2024-08-03T13:46:45Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3874
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3874/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3874/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3874/events
|
https://github.com/materialsproject/pymatgen/issues/3874
| 2,344,184,349
|
I_kwDOACgets6LuWod
| 3,874
|
Missing structure files
|
{
"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
}
|
[
{
"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 |
[
"please stop calling other people's contributions irrelevant (i assume you're referring to https://github.com/materialsproject/pymatgen/pull/3831).\r\n\r\n> PymatgenTest is used not just within Pymatgen but a lot of downstream packages\r\n\r\nin my opinion, having a publicly exported `PymatgenTest` class was an antipattern to begin with. it's below your current coding standards. imagine someone proposed to add such a class now. you wouldn't accept such a PR.\r\n`pymatgen` shipped several dozen CIF and JSON files to thousands of users even though downstream usage is likely limited to a handful of call sites (a [dev script in `atomate`](https://github.com/hackingmaterials/atomate/blob/2e541f297165254ac054b50e8132adaa282a01e0/dev_scripts/gibbs.py#L150) is the only one i could find from a github search) \r\n\r\nif you really want those structures in the package, there should be a clearly user-facing API like `pymatgen.core.get_example_structure` function that loads these files as opposed to `pymatgen.util.testing.PymatgenTest.get_structure`. then more people would use them, justifying their inclusion in the package.\r\n\r\nif it was important that external packages can load these structures, there should have been tests for that. you often told me yourself, if people don't write tests for things they added to `pymatgen`, they should not expect others to maintain that untested functionality for them.\r\n\r\nfinally, i would like to point out that _you_ were the one to do a massive (in your own words apparently irrelevant) migration of test files into the `tests` directory in https://github.com/materialsproject/pymatgen/commit/77f89dfbb. you're attacking others for your own behavior\r\n",
"1. Moving the structure files is irrelevant - it improves none of pymatgen's main functionality.\r\n2. Tests were actually written for PymatgenTest - it is everywhere that PymatgenTest is used. What are you expecting - a test for a code that implements a testing class? Or something that checks for existence of files? Moving the structure files does not cause issues within pymatgen tests because the CI checkouts the Github version, but it does cause issues in downstream code that uses PymatgenTest when installed via pip.\r\n3. Just because you don't understand the reason why the structure files were included in pymatgen (21 very small json files, which added at best a few kb to the pymatgen wheel) doesn't mean there is no good reason for it. *ASK*. Apparently this is very difficult for you to do.\r\n",
"Hi thanks for pinging me.\r\n\r\nYes indeed I relocated those structure files in #3831, and I was not expecting them to be needed outside `pymatgen` tests (just like any other `pymatgen` test files).\r\n\r\nMoving such files might not be a major concern/improvement here, but from my side, `PymatgenTest` being needed outside `pymatgen` tests is truly unexpected. That's the reason I didn't ask in the first place, also as you might have noticed, I tried to explicitly tag and ask for approval for any potentially breaking changes already :)\r\n\r\nAs per the module docstring (and everything else I could infer from), it should not be accessed externally:\r\nhttps://github.com/materialsproject/pymatgen/blob/4542689450425c7a7af289c360b86f161df32e86/pymatgen/util/testing/__init__.py#L1-L6",
"> What are you expecting - a test for a code that implements a testing class? Or something that checks for existence of files?\r\n\r\n@shyuep yes, that's exactly what i'm expecting for any external API! `PymatgenTest` certainly doesn't sound like an external API which is why in my opinion, the issue is not the lack of tests but the fact that `PymatgenTest` wasn't marked as private. but given you see it as an external API, i'm surprised is not not self-evident to you that it then requires test coverage. you yourself have always emphasized the importance of tests for anything you want to stay unchanged over time.\r\n\r\n> Moving the structure files does not cause issues within pymatgen tests because the CI checkouts the Github version, but it does cause issues in downstream code that uses PymatgenTest when installed via pip.\r\n\r\nno need to explain, i'm well aware of that.\r\n\r\n> doesn't mean there is no good reason for it\r\n\r\nso what is the good reason? like i said, those files were there to support an antipattern which is hardly a _good_ reason. and because it was an antipattern neither i nor @DanielYang59 suspected that there was a reason at all. given there were no tests or documentation to inform us otherwise, i think you should tone down your language",
"@DanielYang59 Thanks for the thoughtful response. The intent is for PymatgenTest to be an *public* utility class to be used for testing materials science code, not just within pymatgen. There are some packages that use PymatgenTest to load example structures to simplify testing. E.g., matcalc, maml, pymatgen.analysis.diffusion. That change broke the CI of multiple downstream codes. It is really no different from something like the built-in datasets for something like scikit-learn or seaborn.\r\n\r\nIt is a good practice to find out who the original author of the code is (which is available from Git) and then clarify intent first before making breaking changes. I am not a newbie. I know the difference between a private class and a public class. I know the difference between test files and code files. There are reasons why I left the json files in pymatgen/utils/files and not pymatgen/utils/tests/files. When I consolidated the test files, I did *not* move them like all the other test files. \r\n\r\nPerhaps let me outline the guidelines:\r\n1. Backwards compatibility wherever possible.\r\n2. Absolutely no breakages for purely aesthetic or housekeeping changes unless followed by a very long deprecation period. This is not on you, but there was a similar change to variable names just for spelling which caused breakages for no good reason. \r\n3. For actual new functionality/bug fixes, breaking changes can be tolerated if gains > costs. But again, preferable if there is a deprecation period.\r\n\r\nI am not going to dignify the rest of the comments from others with a response.",
"> Perhaps let me outline the guidelines:\r\n> \r\n> 1. Backwards compatibility wherever possible.\r\n> \r\n> 2. Absolutely no breakages for purely aesthetic or housekeeping changes unless followed by a very long deprecation period. This is not on you, but there was a similar change to variable names just for spelling which caused breakages for no good reason.\r\n> \r\n> 3. For actual new functionality/bug fixes, breaking changes can be tolerated if gains > costs. But again, preferable if there is a deprecation period.\r\n\r\nI appreciate your sharing this, which certainly would help me become a better contributor :) Also I'm beginning to feel the same as I gain more experience in open-source.\r\n\r\n> The intent is for PymatgenTest to be an _public_ utility class to be used for testing materials science code, not just within pymatgen. There are some packages that use PymatgenTest to load example structures to simplify testing. E.g., matcalc, maml, pymatgen.analysis.diffusion.\r\n\r\nThanks for explaining this, I was not expecting this in the first place. As per its name `PymatgenTest`, it should be a unit test class for `pymatgen` (not a more general name like `EnhancedUnitTest`). Therefore, I skipped the following consultation phases (ask for approval/deprecate with a deprecation period and such). As such, thanks for clarifying this in c83d5d5280cf0004f7d3571b7afc41b7604d8124\r\n\r\nIf I were to realize (or even just suspect) it might be access externally, I would certainly follow the guidelines you mentioned above :)\r\n\r\nWith all these said, perhaps those packages should consider trying to get structures (even for unit test) through the `mp-api` (just because it can get structure from `PymatgenTest.get_structure`, doesn't mean it should, right?)? This sounds like a more rational choice to me...\r\n",
"> I am not going to dignify the rest of the comments from others with a response.\r\n\r\nsounds more like you lost the argument on its merit...",
"@DanielYang59 Sure, perhaps naming can be modified (with a deprecation period because this is purely aesthetic change), but even just for Pymatgen add-on packages, it is expected that PymatgenTest would be useful.\r\n\r\nAs for getting structures, you can use the mp-api of course but it is more involved. You need to set up an API key as a Github secret. And online access is always needed. Why not simply have some example files within code? I would note for example that codes like seaborn, scikit-learn, all have example data within the code for ease of testing, tutorials, etc. There was a method called get_mp_structure in PymatgenTest previously. Anyway, I added a Structure.from_id, which is a more robust solution for other applications.",
"\r\n> Sure, perhaps naming can be modified (with a deprecation period because this is purely aesthetic change), but even just for Pymatgen add-on packages, it is expected that PymatgenTest would be useful.\r\n\r\nThat's a fair point to me!\r\n\r\n> As for getting structures, you can use the mp-api of course but it is more involved. You need to set up an API key as a Github secret. And online access is always needed. \r\n\r\nYes it's less \"convenient\", but for CI environment, Internet access is usually available anyway (installing `pymatgen` requires Internet access too).\r\n\r\n> Why not simply have some example files within code? I would note for example that codes like seaborn, scikit-learn, all have example data within the code for ease of testing, tutorials, etc. \r\n\r\nI have a feeling that this is not \"best practice\", but I'm not quite certain yet. Perhaps we can do better than others :)\r\n\r\n> There was a method called get_mp_structure in PymatgenTest previously. Anyway, I added a Structure.from_id, which is a more robust solution for other applications.\r\n\r\nThanks for adding this! It sounds much more reasonable :)\r\n",
"Hi everyone - I need to add a note to this thread. I am glad to have discussions and disagreements, but we have to maintain a standard of civil and kind communication throughout these disagreements. There are some examples in this thread where this standard is not met.\r\n\r\nI want the pymatgen community to be a welcoming place to all contributors, without whom pymatgen would not be what it is today. We also want to encourage voices to speak up when they think something is done badly, or a mistake has been made.\r\n\r\nWe will only encourage useful, critical feedback if people feel safe to make it, and know that we can collectively tackle the problem and not the person (no \"you\" statements that are used to attack an individual please).\r\n\r\nThank you everyone for your work here on the underlying issue."
] | 2024-06-10T15:17:04
| 2024-06-18T11:15:51
|
2024-06-11T02:52:49Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
any
### Pymatgen version
2024.6.4
### Operating system version
_No response_
### Current behavior
PymatgenTest.get_structure fail if `tests` is not are not present, e.g., if it is installed from pip.
@DanielYang59 @janosh You cannot do this kind of thing. PymatgenTest is used not just within Pymatgen but a lot of downstream packages. Some of those packages rely on having PymatgenTest to generate a structure. I have to ask that you stop with all these irrelevant moving of files around and causing breakages. STRICTLY keep backwards compatiblity! Revert this change and issue a release immediately.
### Expected Behavior
PymatgenTest.get_structure actually does not result in a failure.
### 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/3874/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/3874/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
||
https://api.github.com/repos/materialsproject/pymatgen/issues/3875
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3875/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3875/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3875/events
|
https://github.com/materialsproject/pymatgen/pull/3875
| 2,345,257,242
|
PR_kwDOACgets5yDLtD
| 3,875
|
Revert "Move test structures out of `util` directory"
|
{
"login": "shyuep",
"id": 577107,
"node_id": "MDQ6VXNlcjU3NzEwNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shyuep",
"html_url": "https://github.com/shyuep",
"followers_url": "https://api.github.com/users/shyuep/followers",
"following_url": "https://api.github.com/users/shyuep/following{/other_user}",
"gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shyuep/subscriptions",
"organizations_url": "https://api.github.com/users/shyuep/orgs",
"repos_url": "https://api.github.com/users/shyuep/repos",
"events_url": "https://api.github.com/users/shyuep/events{/privacy}",
"received_events_url": "https://api.github.com/users/shyuep/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[] |
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-06-11T02:50:22
| 2024-06-11T02:50:39
|
2024-06-11T02:50:39Z
|
MEMBER
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
Reverts materialsproject/pymatgen#3831
|
{
"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/3875/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/3875/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3875",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3875",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3875.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3875.patch",
"merged_at": "2024-06-11T02:50:38Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3876
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3876/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3876/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3876/events
|
https://github.com/materialsproject/pymatgen/pull/3876
| 2,346,545,598
|
PR_kwDOACgets5yHmi1
| 3,876
|
Add OPTIMADE adapter
|
{
"login": "ml-evs",
"id": 7916000,
"node_id": "MDQ6VXNlcjc5MTYwMDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/7916000?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ml-evs",
"html_url": "https://github.com/ml-evs",
"followers_url": "https://api.github.com/users/ml-evs/followers",
"following_url": "https://api.github.com/users/ml-evs/following{/other_user}",
"gists_url": "https://api.github.com/users/ml-evs/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ml-evs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ml-evs/subscriptions",
"organizations_url": "https://api.github.com/users/ml-evs/orgs",
"repos_url": "https://api.github.com/users/ml-evs/repos",
"events_url": "https://api.github.com/users/ml-evs/events{/privacy}",
"received_events_url": "https://api.github.com/users/ml-evs/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"
},
{
"id": 6817617461,
"node_id": "LA_kwDOACgets8AAAABllyWNQ",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ext",
"name": "ext",
"color": "3766AC",
"default": false,
"description": "pymatgen ext package for API data fetching"
}
] |
closed
| false
|
{
"login": "",
"id": 0,
"node_id": "",
"avatar_url": "",
"gravatar_id": "",
"url": "",
"html_url": "",
"followers_url": "",
"following_url": "",
"gists_url": "",
"starred_url": "",
"subscriptions_url": "",
"organizations_url": "",
"repos_url": "",
"events_url": "",
"received_events_url": "",
"type": "",
"user_view_type": "",
"site_admin": false
}
|
[] | null |
[
"I would put this in pymatgen.ext rather than pymatgen.io. The ext are external interfaces to things like API resources. E.g., matproj is in pymatgen.ext. Thanks.",
"Given this is purely for conversion to/from the OPTIMADE schema, `io` is appropriate (but yes, any API-calling code lives in `ext`).\r\n\r\nThanks for the PR @ml-evs !",
"Apologies, I made this during the OPTIMADE workshop and your responses got lost in the notifications -- happy for this to go wherever but agree with Matt that `io` seems more appropriate to me (given that more tools are adding \"offline\" OPTIMADE support).\r\n\r\nI'll get around to adding a couple more tests to this, but I think the code itself is ready for review.",
"Ok, slightly concerned that rebasing this PR has lead to 395 files being changed...",
"> Ok, slightly concerned that rebasing this PR has lead to 395 files being changed...\r\n\r\nthat's from the recent 9100860d7d which didn't ensure [`pymatgen` is recognized as a first-party package](https://docs.astral.sh/ruff/settings/#lint_isort_known-first-party)",
"Ok, rebased this more intelligently this time, have beefed up the test a little and think its ready to go."
] | 2024-06-11T14:10:57
| 2024-08-07T17:52:59
|
2024-08-07T17:52:59Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
This PR adds a converter between the `pymatgen.core.Structure` object and an OPTIMADE structure resource, migrated primarily out of https://github.com/Materials-Consortia/optimade-python-tools/blob/master/optimade/adapters/structures/pymatgen.py with the aim to remove it from our library.
## Todos
- [x] Finish off tests
- [ ] See if it can be used internally in the `pymatgen.ext.optimade` client (future work)
## 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": "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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3876/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/3876/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3876",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3876",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3876.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3876.patch",
"merged_at": "2024-08-07T17:52:59Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3877
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3877/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3877/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3877/events
|
https://github.com/materialsproject/pymatgen/pull/3877
| 2,348,714,425
|
PR_kwDOACgets5yO_nB
| 3,877
|
Accounting for FHI-aims species' defaults
|
{
"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 |
[
"Would it be possible to reintroduce the default `species_dir` behavior? For some people using only one set of defaults is relatively okay",
"otherwise this looks good from an fhi-aims perspective. This will break atomate2 tests but we can fix that once it is merged",
"> Would it be possible to reintroduce the default `species_dir` behavior? For some people using only one set of defaults is relatively okay\r\n\r\nYeah, it could be possible (just remove one check and add `species_dir` to `paths_to_try`, I guess), but based on my discussions over here people also want to freely change the defaults, and they don't like writing out the full path every time. ",
"Okay that makes sense",
"Hi, is there anything that should be done here?",
"@ansobolev Thanks for contributing in any case! I alao hope one of the maintainers will soon have some time! 😃",
"Thanks for the contribution. I have merged it!"
] | 2024-06-12T12:58:18
| 2024-07-08T13:18:34
|
2024-06-20T14:37:20Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
This PR adds new SpeciesDefaults object to account for files with the default definitions of species-related keywords (integration grids, basis sets...) in FHI-aims, named _species' defaults_. This is done to abstract away the work with species' defaults from the `AimsControlIn` object, to bring the API more in line with VASP, and to enable running heterogeneous calculations that need different precision levels for different atoms.
Major changes:
- An `AimsSpeciesFile` class representing the defaults for one species is introduced
- A `SpeciesDefaults` class representing a list of species' defaults is introduced; the `AimsControlIn` class now uses `SpeciesDefault`
- An `AIMS_SPECIES_DIR` configuration variable is introduced which should point to the root of `FHIaims/species_defaults` directory
- Breaking change: the possibility to use default species' defaults directory is removed. Every input sets need explicit definition of the species' defaults directory relative to `FHIaims/species_defaults` or `FHIaims/species_defaults/defaults_2020`.
## Todos
None
## Checklist
- [x] Google format doc strings added. Check with `ruff`.
- [x] Type annotations included. Check with `mypy`.
- [x] Tests added for new features/fixes.
- [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
|
{
"login": "shyuep",
"id": 577107,
"node_id": "MDQ6VXNlcjU3NzEwNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/577107?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shyuep",
"html_url": "https://github.com/shyuep",
"followers_url": "https://api.github.com/users/shyuep/followers",
"following_url": "https://api.github.com/users/shyuep/following{/other_user}",
"gists_url": "https://api.github.com/users/shyuep/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shyuep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shyuep/subscriptions",
"organizations_url": "https://api.github.com/users/shyuep/orgs",
"repos_url": "https://api.github.com/users/shyuep/repos",
"events_url": "https://api.github.com/users/shyuep/events{/privacy}",
"received_events_url": "https://api.github.com/users/shyuep/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3877/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/3877/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3877",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3877",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3877.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3877.patch",
"merged_at": "2024-06-20T14:37:20Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3878
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3878/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3878/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3878/events
|
https://github.com/materialsproject/pymatgen/pull/3878
| 2,349,282,008
|
PR_kwDOACgets5yQ87J
| 3,878
|
Add modification to aims input to match atomate2 magnetic order script
|
{
"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
}
|
[
{
"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"
},
{
"id": 5304335471,
"node_id": "LA_kwDOACgets8AAAABPCm8bw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/io",
"name": "io",
"color": "c2e0c6",
"default": false,
"description": "Input/output functionality"
},
{
"id": 5733199609,
"node_id": "LA_kwDOACgets8AAAABVbmu-Q",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/magmoms",
"name": "magmoms",
"color": "3B4F19",
"default": false,
"description": "Magnetism related"
},
{
"id": 6157350943,
"node_id": "LA_kwDOACgets8AAAABbwG4Hw",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/ecosystem",
"name": "ecosystem",
"color": "83A7A8",
"default": false,
"description": "Concerning the larger pymatgen ecosystem"
}
] |
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 |
[
"ready for review",
"Thanks for the PR @tpurcell90, can you expand on:\r\n\r\n> How it deals with spins is not through magmoms, but FHI-aims uses magmoms exclusively\r\n\r\nI'm not sure I understand, apologies.",
"> Thanks for the PR @tpurcell90, can you expand on:\r\n> \r\n> > How it deals with spins is not through magmoms, but FHI-aims uses magmoms exclusively\r\n> \r\n> I'm not sure I understand, apologies.\r\n\r\nIn pymatgen it looks like the spin can be stored either as a part of the species information as `Species.spin` or by setting the `magmom` site_property in `site_properties`. When looking at the VASP results it seems that VASP treats these as different cases, but for FHI-aims it only works if it is passed via `magmom` and not as a input on the species. \r\n",
"Any update on this?",
"Can this be merged in?",
"@mkhorton @shyuep @janosh Can this be merged in once I resolve the conflicts?",
"i'd be happy to merge but i think @mkhorton is much more knowledgeable here. so would be good to get his approval. any remaining concerns @mkhorton?",
"Test passed locally will check if they pass here ready for review",
"I should have incorporated all of the suggestions from @janosh ",
"Thanks for your patience during review @tpurcell90, appreciate your PR!",
"missed a few typos in my review. fixed in https://github.com/materialsproject/pymatgen/commit/149e11544c62237421118770328171b02eca7b0d.\r\n\r\n@tpurcell90 I noticed that it might make more sense to turn `AimsSpeciesFile` into a `dataclass` instead of implementing total ordering manually:\r\n\r\nhttps://github.com/materialsproject/pymatgen/blob/149e11544c62237421118770328171b02eca7b0d/src/pymatgen/io/aims/inputs.py#L708-L737",
"I made it a dataclass in a separate PR"
] | 2024-06-12T17:06:58
| 2024-09-08T04:16:12
|
2024-09-07T20:41:52Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
How it deals with spins is not through magmoms, but FHI-aims uses magmoms exclusively
## Summary
Modifying FHI-aims inputs to work with the magnetism workflows in atomate2
## Todos
If this is work in progress, what else needs to be done?
## Checklist
- [x] Google format doc strings added. Check with `ruff`.
- [x] Type annotations included. Check with `mypy`.
- [x] Tests added for new features/fixes.
- [x] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))
Tip: Install `pre-commit` hooks to auto-check types and linting before every commit:
```sh
pip install -U pre-commit
pre-commit install
```
|
{
"login": "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/3878/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/3878/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3878",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3878",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3878.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3878.patch",
"merged_at": "2024-09-07T20:41:52Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3879
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3879/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3879/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3879/events
|
https://github.com/materialsproject/pymatgen/pull/3879
| 2,355,201,640
|
PR_kwDOACgets5ylJcK
| 3,879
|
Update `FermiDos.get_doping()` to be more robust
|
{
"login": "kavanase",
"id": 51478689,
"node_id": "MDQ6VXNlcjUxNDc4Njg5",
"avatar_url": "https://avatars.githubusercontent.com/u/51478689?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kavanase",
"html_url": "https://github.com/kavanase",
"followers_url": "https://api.github.com/users/kavanase/followers",
"following_url": "https://api.github.com/users/kavanase/following{/other_user}",
"gists_url": "https://api.github.com/users/kavanase/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kavanase/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kavanase/subscriptions",
"organizations_url": "https://api.github.com/users/kavanase/orgs",
"repos_url": "https://api.github.com/users/kavanase/repos",
"events_url": "https://api.github.com/users/kavanase/events{/privacy}",
"received_events_url": "https://api.github.com/users/kavanase/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 5318590534,
"node_id": "LA_kwDOACgets8AAAABPQNARg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/fix",
"name": "fix",
"color": "40DE1F",
"default": false,
"description": "Bug fix PRs"
},
{
"id": 5966808010,
"node_id": "LA_kwDOACgets8AAAABY6ZDyg",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/electronic%20structure",
"name": "electronic structure",
"color": "6027F8",
"default": false,
"description": "Electronic structure functionality related"
}
] |
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 @kavanase, happy to merge this once the tests are updated. Really appreciate the detailed issue description.",
"If I understand correctly, this does not fix the issue of the inaccurate CBM itself however?",
"Hi @mkhorton, yes this doesn't fix the issue of the inaccurate CBM, but just makes the calculation of doping concentrations essentially independent of any inaccuracies in the CBM/VBM from the DOS. \r\nGenerally we've found that the `Vasprun.eigenvalue_band_properties` property, with the default `occu_tol=1e-8`, is quite reliable for extracting the band gap and edges, but the DOS methods not so much. Tuning the tolerances with the DOS methods improves this but there are still some inaccuracies. \r\n\r\nI've dug into this a bit more to see where this comes from. The main issue seems to be that the default occupation tolerance in the DOS methods of 1e-3 (c.f. 1e-8 for `occu_tol` with `Vasprun`) is too large, especially when you have disperse band edges like with CdTe, GaAs etc. Dropping this from the default 1e-3 (gap = 1.58 eV) to 1e-4 (gap = 1.53 eV) improves performance, compared to the correct `Vasprun.eigenvalue_band_properties` value of 1.497 eV, but you can't (meaningfully) drop this tolerance any further, as the DOS output in VASP is truncated to 4 decimal places – I've seen this discussed somewhere before but can't remember where, might've been in internal group discussions.\r\ne.g. here in CdTe the CBM starts at 3.1435 eV eigenvalue, but only shows up in the `vasprun.xml` DOS output (screenshot) at 3.1617 eV:\r\n<img width=\"489\" alt=\"image\" src=\"https://github.com/materialsproject/pymatgen/assets/51478689/bb8e8d8d-b1f8-4d53-a0ac-0760c33ca634\">\r\nNot sure if it's worth noting this somewhere in docstrings? – _added this in the latest commit._\r\n\r\nI would suggest updating the default tolerance for this to 1e-4 in that case, as it should be more accurate and also is closer to the behaviour of the `Vasprun` defaults – _added this in the latest commit._\r\n\r\nAlso just to note this currently passes all tests, there were just one or two random failures due to issues with the API key for Materials Project tests\r\n",
"Just to note, this rounding to 4 decimal places by VASP is also why `nelecs` needs to be provided to `FermiDos` to normalize the DOS densities, because this rounding summed over many values (particularly in large systems) can give inaccurate total electron counts; https://github.com/materialsproject/pymatgen/blob/master/pymatgen/electronic_structure/dos.py#L376",
"Just bumping so it doesn't get lost, I think this PR is all ready to go. \r\nFixed the merge conflict that had been introduced with the updated `master` branch",
"All tests passing, but I'm not sure why the `lobster_basis` functions are appearing as changed files here?",
"sorry for keeping you waiting and repeatedly addressing merge conflicts @kavanase! could you resolve the conflict one more time and then i'll merge?",
"Merge conflict resolved!\r\n\r\nJust to note about this point I mentioned above:\r\n> All tests passing, but I'm not sure why the lobster_basis functions are appearing as changed files here?\r\n\r\nI looked into this, and it seems to be an issue with the line endings. On the current `master` branch, it seems the line endings are CRLF ('DOS' style) rather than LF ('Unix' style). If I delete my version of these files and download the current `master` version, it suggests this is the case (below). LF is the desired file ending I believed, as stated in the [editorconfig](https://github.com/materialsproject/pymatgen/blob/master/.editorconfig) and best for Mac/Linux compatibility etc, and also my `git` tries to automatically convert CRLF files to LF:\r\n```\r\n❯ git diff\r\nwarning: in the working copy of 'src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_max.yaml', CRLF will be replaced by LF the next time Git touches it\r\n```\r\nSo in this PR, those 3 `lobster` `yaml` files are LF endings, causing them to be picked up as changed too.\r\n\r\n```\r\n[FermiDos_update e9fd84cbd] Remove yaml files to force re-eval\r\n 3 files changed, 567 deletions(-)\r\n delete mode 100644 src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_max.yaml\r\n delete mode 100644 src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_min.yaml\r\n delete mode 100644 src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_standard.yaml\r\n❯ wget https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_standard.yaml\r\n--2024-08-30 10:35:14-- https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_standard.yaml\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 3863 (3.8K) [text/plain]\r\nSaving to: ‘BASIS_PBE_54_standard.yaml’\r\n\r\nBASIS_PBE_54_standard.yaml 100%[============================================================================================================================================================================>] 3.77K --.-KB/s in 0s\r\n\r\n2024-08-30 10:35:14 (35.1 MB/s) - ‘BASIS_PBE_54_standard.yaml’ saved [3863/3863]\r\n\r\n❯ wget https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_min.yaml\r\n--2024-08-30 10:35:18-- https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_min.yaml\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 3734 (3.6K) [text/plain]\r\nSaving to: ‘BASIS_PBE_54_min.yaml’\r\n\r\nBASIS_PBE_54_min.yaml 100%[============================================================================================================================================================================>] 3.65K --.-KB/s in 0s\r\n\r\n2024-08-30 10:35:18 (26.2 MB/s) - ‘BASIS_PBE_54_min.yaml’ saved [3734/3734]\r\n\r\n❯ wget https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_max.yaml\r\n--2024-08-30 10:35:21-- https://raw.githubusercontent.com/materialsproject/pymatgen/master/src/pymatgen/io/lobster/lobster_basis/BASIS_PBE_54_max.yaml\r\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...\r\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 3863 (3.8K) [text/plain]\r\nSaving to: ‘BASIS_PBE_54_max.yaml’\r\n\r\nBASIS_PBE_54_max.yaml 100%[============================================================================================================================================================================>] 3.77K --.-KB/s in 0s\r\n\r\n2024-08-30 10:35:21 (27.7 MB/s) - ‘BASIS_PBE_54_max.yaml’ saved [3863/3863]\r\n\r\n❯ ll\r\n.rw-r--r-- 3.9k kavanase 30 Aug 10:35 BASIS_PBE_54_max.yaml\r\n.rw-r--r-- 3.7k kavanase 30 Aug 10:35 BASIS_PBE_54_min.yaml\r\n.rw-r--r-- 3.9k kavanase 30 Aug 10:35 BASIS_PBE_54_standard.yaml\r\n❯ git status\r\nOn branch FermiDos_update\r\nYour branch is ahead of 'origin/FermiDos_update' by 1 commit.\r\n (use \"git push\" to publish your local commits)\r\n\r\nUntracked files:\r\n (use \"git add <file>...\" to include in what will be committed)\r\n\t./\r\n\r\nnothing added to commit but untracked files present (use \"git add\" to track)\r\n❯ file *yaml\r\nBASIS_PBE_54_max.yaml: ASCII text, with CRLF line terminators\r\nBASIS_PBE_54_min.yaml: ASCII text, with CRLF line terminators\r\nBASIS_PBE_54_standard.yaml: ASCII text, with CRLF line terminators\r\n❯ dos2unix *yaml\r\ndos2unix: converting file BASIS_PBE_54_max.yaml to Unix format...\r\ndos2unix: converting file BASIS_PBE_54_min.yaml to Unix format...\r\ndos2unix: converting file BASIS_PBE_54_standard.yaml to Unix format...\r\n❯ file *yaml\r\nBASIS_PBE_54_max.yaml: ASCII text\r\nBASIS_PBE_54_min.yaml: ASCII text\r\nBASIS_PBE_54_standard.yaml: ASCII text\r\n❯ git add *yaml\r\n```"
] | 2024-06-15T20:07:53
| 2024-09-10T13:18:01
|
2024-08-31T05:45:47Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
`FermiDos.get_doping` performs an integral over the density of states with the Fermi Dirac occupations to determine the carrier concentrations. However, it starts the conduction band integral (`cb_integral`) from `self.idx_cbm` and vice versa with `self.idx_vbm` for the valence band integral.
But, these attributes are determined upon initialisation with `self.get_cbm_vbm()` (https://github.com/materialsproject/pymatgen/blob/master/pymatgen/electronic_structure/dos.py#L427), where (1) the user cannot control the occupation tolerance settings for `get_cbm_vbm()` (as they can when otherwise calling this function), and (2) even when tuning these settings the VBM/CBM/gap is often not correct. E.g. for CdTe with a band gap of 1.497 eV (as given by the VASP `EIGENVAL` and `vasprun.xml` outputs, and `Vasprun.eigenvalue_band_properties`), this gives a different result of 1.58 eV, mainly due to the disperse CBM and the way this is estimated from the DOS in `get_cbm_vbm()`:
<img width="655" alt="image" src="https://github.com/materialsproject/pymatgen/assets/51478689/867c1c23-1a00-4d12-8e62-941eca034a20">
In this PR, the integrals are adjusted to start from the mid-gap position (intermediate between `idx_vbm` and `idx_cbm`). This means that the result now is essentially independent of the calculated VBM/CBM positions and indices, as it's just integrating the DOS with the Fermi-Dirac distribution, and the DOS is zero in the gap until it reaches the (true) CBM/VBM, now giving the correct result.
<img width="622" alt="image" src="https://github.com/materialsproject/pymatgen/assets/51478689/7f17e50d-66dd-42f4-8286-bccc3a097702">
<img width="584" alt="image" src="https://github.com/materialsproject/pymatgen/assets/51478689/26c00974-95a6-445e-a65f-cba00e80d900">
<img width="579" alt="image" src="https://github.com/materialsproject/pymatgen/assets/51478689/53e0f64f-6d01-4eb7-a326-b29053368fd8">
Notebook with this test code and example files attached.
[Uploading pymatgen_get_doping_PR.zip…]()
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3879/reactions",
"total_count": 3,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 3,
"rocket": 0,
"eyes": 0
}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3879/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3879",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3879",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3879.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3879.patch",
"merged_at": "2024-08-31T05:45:47Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3880
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3880/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3880/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3880/events
|
https://github.com/materialsproject/pymatgen/pull/3880
| 2,355,389,205
|
PR_kwDOACgets5ylwkX
| 3,880
|
Improve types for `electronic_structure.{core/dos}`
|
{
"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
}
|
[
{
"id": 5509830160,
"node_id": "LA_kwDOACgets8AAAABSGlWEA",
"url": "https://api.github.com/repos/materialsproject/pymatgen/labels/types",
"name": "types",
"color": "7D66D9",
"default": false,
"description": "Type all the things"
}
] |
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 |
[
"@janosh Apologize for trying to mess up your weekend, just ping you to get this tracked as well and no rush at all. Thanks!",
"Thanks! Have a nice weekend ahead!"
] | 2024-06-16T02:40:13
| 2024-08-09T00:11:56
|
2024-08-03T15:53:36Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
## Summary
- Improve types and docstring cleanups for (follow up of #3873):
- `electronic_structure.core`
- `electronic_structure.dos`
- Nest private `classmethod` (which should not be `classmethod` but `staticmethod`) `get_transformation_matrix` inside `get_moment` method 2843854ea848a5a21898593a26acd8dc44059471, rationale:
- It's used by `get_moment` alone
- No unit test added for `get_transformation_matrix` (usually I would expose such internal function as private method if I need to unit test it)
|
{
"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
}
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/issues/3880/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/3880/timeline
| null | true
| false
|
{
"url": "https://api.github.com/repos/materialsproject/pymatgen/pulls/3880",
"html_url": "https://github.com/materialsproject/pymatgen/pull/3880",
"diff_url": "https://github.com/materialsproject/pymatgen/pull/3880.diff",
"patch_url": "https://github.com/materialsproject/pymatgen/pull/3880.patch",
"merged_at": "2024-08-03T15:53:36Z"
}
|
|||
https://api.github.com/repos/materialsproject/pymatgen/issues/3881
|
https://api.github.com/repos/materialsproject/pymatgen
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3881/labels{/name}
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3881/comments
|
https://api.github.com/repos/materialsproject/pymatgen/issues/3881/events
|
https://github.com/materialsproject/pymatgen/issues/3881
| 2,355,806,182
|
I_kwDOACgets6Mar_m
| 3,881
|
ImportError due (presumably) to numpy 2.0
|
{
"login": "rkingsbury",
"id": 1908695,
"node_id": "MDQ6VXNlcjE5MDg2OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1908695?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rkingsbury",
"html_url": "https://github.com/rkingsbury",
"followers_url": "https://api.github.com/users/rkingsbury/followers",
"following_url": "https://api.github.com/users/rkingsbury/following{/other_user}",
"gists_url": "https://api.github.com/users/rkingsbury/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rkingsbury/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rkingsbury/subscriptions",
"organizations_url": "https://api.github.com/users/rkingsbury/orgs",
"repos_url": "https://api.github.com/users/rkingsbury/repos",
"events_url": "https://api.github.com/users/rkingsbury/events{/privacy}",
"received_events_url": "https://api.github.com/users/rkingsbury/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
|
[
{
"id": 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 |
[
"See https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-migration-guide for summary of possibly required changes"
] | 2024-06-16T14:27:21
| 2024-06-16T15:18:59
|
2024-06-16T15:18:59Z
|
CONTRIBUTOR
|
{
"total": 0,
"completed": 0,
"percent_completed": 0
}
|
### Python version
python 3.11.9
### Pymatgen version
2024.06.10
### Operating system version
Ubuntu (Windows WSL2)
### Current behavior
import `Element` from pymatgen raises an `ImportError`
### Expected Behavior
The import should work.
### Minimal example
```Python
from pymatgen.core import Element
../../../.local/lib/python3.10/site-packages/pymatgen/core/__init__.py:13: in <module>
from pymatgen.core.lattice import Lattice
../../../.local/lib/python3.10/site-packages/pymatgen/core/lattice.py:21: in <module>
from pymatgen.util.coord import pbc_shortest_vectors
../../../.local/lib/python3.10/site-packages/pymatgen/util/coord.py:15: in <module>
from pymatgen.util import coord_cython
pymatgen/util/coord_cython.pyx:1: in init pymatgen.util.coord_cython
???
E ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).
------------------------------- Captured stderr --------------------------------
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
```
```
### 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/3881/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/3881/timeline
| null |
completed
| false
| false
|
{
"url": "",
"html_url": "",
"diff_url": "",
"patch_url": "",
"merged_at": ""
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.