Skip to content

Surface site thermo gets wrong answer when calling thermo.is_identical() #2657

Description

@sevyharris

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:

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))

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.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions