Skip to content

Adjust relative tolerance based on input #75

@97gamjak

Description

@97gamjak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementonly for internal usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions