Closed sevyharris closed 6 months ago
Surface site thermo is represented with all zeros for the NASA polynomial, but when you call thermo.is_identical_to() or thermo.is_similar_to() on two thermo models that are both all zeros, it returns False because there's a divide by zero in there.
Here's a miniscipt demonstrating the problem:
import os import rmgpy.data.thermo import rmgpy library_path = os.path.join(rmgpy.settings['database.directory'], 'thermo') database = rmgpy.data.thermo.ThermoDatabase() database.load( library_path, libraries = ['surfaceThermoPt111'] ) X_thermo_data = database.libraries['surfaceThermoPt111'].entries['vacant'].data print(X_thermo_data) print(X_thermo_data.is_identical_to(X_thermo_data)) print(X_thermo_data.is_similar_to(X_thermo_data))
Even though it's all zeros, the thermo data object should be returning True when checking if it's identical to itself.
True
This matters because the surface regression test will fail if it compares vacant sites to each other.
Bug Description
Surface site thermo is represented with all zeros for the NASA polynomial, but when you call thermo.is_identical_to() or thermo.is_similar_to() on two thermo models that are both all zeros, it returns False because there's a divide by zero in there.
How To Reproduce
Here's a miniscipt demonstrating the problem:
Expected Behavior
Even though it's all zeros, the thermo data object should be returning
True
when checking if it's identical to itself.Additional Context
This matters because the surface regression test will fail if it compares vacant sites to each other.