-
Notifications
You must be signed in to change notification settings - Fork 5
Closes: #37 #39
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
Merged
jonmarks12
merged 9 commits into
thegomeslab:main
from
mattball30:feature/raise_error_backtransfer
May 25, 2026
Merged
Closes: #37 #39
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7a6da91
Fixed issue #37
bf8bf50
Make raise on backtransform failure an optional argument. Keep verbos…
461a7c0
revert some formatting and typing changes
jonmarks12 0da56d3
rever more formatting and typing changes
jonmarks12 aa93801
revert one more change in atoms_to_ric
jonmarks12 958427d
Merge remote-tracking branch 'origin/main' into feature/raise_error_b…
jonmarks12 cca7bad
fix merge conflict due to output files
jonmarks12 0555096
Revert "fix merge conflict due to output files"
jonmarks12 f5e1560
Apply Ruff formatting
joegomes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ To access the most recent features and bug fixes, install from source: | |
| Optional: Calculator Dependencies | ||
| -------------------------------------- | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
|
|
||
| ML-FSM works with any ASE-compatible calculator including traditional QM and semi-empirical potential energy surfaces. | ||
| ML-FSM works with any ASE-compatible calculator including traditional QM and semi-empirical potential energy surfaces. | ||
| The following potentials have been tested and are supported out of the box via ``examples/fsm_example.py``: | ||
|
|
||
| .. list-table:: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| """Interpolation methods for constructing paths between endpoint geometries.""" | ||
|
|
||
| from collections.abc import Callable | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 |
||
| from dataclasses import dataclass | ||
| from typing import Callable | ||
|
|
||
| import numpy as np | ||
| from ase import Atoms | ||
|
|
@@ -35,13 +35,18 @@ class Interpolate: | |
| If ``True``, return interpolated internal coordinate vectors instead | ||
| of Cartesian positions. Only meaningful for :class:`RIC`. Default is | ||
| ``False``. | ||
| raise_on_backtransf_fail : bool, optional | ||
| If ``True``, raise a RuntimeError if the RIC back transformation fails | ||
| to converge during interpolation or node growth. Only meaningful for | ||
| :class:`RIC`. Default is ``True``. | ||
| """ | ||
|
|
||
| atoms1: Atoms | ||
| atoms2: Atoms | ||
| ninterp: int | ||
| gtol: float = 1e-4 | ||
| return_q: bool = False | ||
| raise_on_backtransf_fail: bool = True | ||
|
|
||
| def interpolate(self) -> NDArray[np.float32]: | ||
| """Abstract interpolation routine — must be overridden by subclasses.""" | ||
|
|
@@ -184,7 +189,9 @@ class RIC(Interpolate): | |
|
|
||
| def __post_init__(self) -> None: | ||
| """Build the shared redundant internal coordinate system.""" | ||
| self.coords = Redundant(self.atoms1, self.atoms2, verbose=False) | ||
| self.coords = Redundant( | ||
| self.atoms1, self.atoms2, verbose=False, raise_on_backtransf_fail=self.raise_on_backtransf_fail | ||
| ) | ||
|
|
||
| def interpolate(self) -> NDArray[np.float32]: | ||
| """Return RIC-interpolated path in Cartesian (or internal) coordinates. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ok