-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a from_ase_atoms()
method to Structure
#3812
Conversation
WalkthroughThe recent update involves enhancing the Changes
Recent Review DetailsConfiguration used: .coderabbit.yaml Files selected for processing (2)
Files skipped from review as they are similar to previous changes (2)
Thank 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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: 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. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- pymatgen/core/structure.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- pymatgen/core/structure.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one, thanks @Andrew-S-Rosen! 👍
Now I can simplify a lot of my lecture code. 😅 |
@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. |
@shyuep: In general, not really. 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. 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. |
Much appreciated!
This is a very good point. For instance, a |
Summary
Adds a
.from_ase_atoms()
method toStructure
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
ruff
.mypy
.duecredit
@due.dcite
decorators to reference relevant papers by DOI (example)Tip: Install
pre-commit
hooks to auto-check types and linting before every commit:Summary by CodeRabbit
ase.Atoms
topymatgen Structure
, enhancing interoperability between different scientific libraries.