Skip to content
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

Adjust relative tolerance based on input #75

Open
97gamjak opened this issue May 30, 2024 · 0 comments
Open

Adjust relative tolerance based on input #75

97gamjak opened this issue May 30, 2024 · 0 comments
Labels
enhancement only for internal usage

Comments

@97gamjak
Copy link
Collaborator

As for example the __eq__ comparison of two AtomicSystem objects is based on a lot of floating point comparisons. Would it make sense to consider the worst possible relative tolerance when reading for example trajectory files and hence make the __eq__ method automatically take this relative tolerance as default value.

Further explanation:

If we decide now to rely on the defaults of math.isclose the absoulte tolerance is set to 0.0, But the relative tolerance has a default value of 1e-9. This makes sense when a Trajectory or AtomicSystem object is directly created via the API. But if the user reads in an AtomicSystem object that has only four significant digits wouldn't it make sense to adjust the default parameter of rtol taking this into consideration? @galjos

@97gamjak 97gamjak added the enhancement only for internal usage label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement only for internal usage
Projects
None yet
Development

No branches or pull requests

1 participant