-
Notifications
You must be signed in to change notification settings - Fork 871
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
Allow Structure.interpolate to extrapolate #3467
Allow Structure.interpolate to extrapolate #3467
Conversation
pymatgen/core/structure.py
Outdated
@@ -2138,6 +2138,7 @@ def interpolate( | |||
interpolate_lattices: bool = False, | |||
pbc: bool = True, | |||
autosort_tol: float = 0, | |||
extrapolation: float = 0, |
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.
Could you add a test for this new keyword?
Yep, It's on my to-do list. I'll try to get the tests written by the end of the week.
…On Nov 26, 2023, 5:16 PM, at 5:16 PM, Janosh Riebesell ***@***.***> wrote:
@janosh requested changes on this pull request.
> @@ -2138,6 +2138,7 @@ def interpolate(
interpolate_lattices: bool = False,
pbc: bool = True,
autosort_tol: float = 0,
+ extrapolation: float = 0,
Could you add a test for this new keyword?
--
Reply to this email directly or view it on GitHub:
#3467 (review)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
|
…ion vector connecting structure to end_structure. This allows for reverse inter/extrapolation as well as partial inter/extrapolation. With this argument, 0 implies no distortion, 1 implies full distortion to end_structure (default), 0.5 implies distortion to a point halfway between structure and end_structure, and -1 implies full distortion in the opposite direction to end_structure.
Tests written |
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.
Tests look great! Just 1 line length issue left before we can merge.
…tring -- ensuring consistency is required for obtaining useful results
Looks good. I fixed that and also added some additions about cell setting & site order consistency to the docstring. If you don't think it belongs or should be in a separate PR, let me know. |
…matgen into structure_extrapolate
Summary
Major changes:
Structure.interpolate()
to extrapolate beyond theend_structure
. The parameter is the fractional amount of extrapolation beyondextrapolation=0.5
would produce structures spanningTodos
Create tests
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: