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
As for example the
__eq__comparison of twoAtomicSystemobjects 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.isclosethe absoulte tolerance is set to0.0, But the relative tolerance has a default value of1e-9. This makes sense when aTrajectoryorAtomicSystemobject is directly created via the API. But if the user reads in anAtomicSystemobject that has only four significant digits wouldn't it make sense to adjust the default parameter ofrtoltaking this into consideration? @galjos