| |
---|
Cases | |
MT ideas | Have Molecule.are_isomorphic take in 3 or more types (Molecule , _SimpleMolecule , nx.Graph , other FrozenMolecule subclasses) Make _SimpleMolecule.are_isomorphic and then when an isomorphism check is needed, look at the types that are to be compared and either call Molecule.are_isomorphic Have Molecule.are_isomorphic not know about its inputs, but immediately convert its inputs to graphs via getattr(mol1, "to_networkx")() and error out if that conversion fails.
|
JW ideas | Different classes can never be compared (always returns false) There's a hierarchy of subclasses where one is always identifiable as "more specific' and will be used for isomorphism checking isomorphism checks accept a lambda function, which can change how the comparison is done to allow for use in different contexts
|
| MT – In favor of “Molecule” compared to “SimpleMol” always fails. JW – In favor of “everything turns itself into a networkx graph”, paired “pass in lambda functions describing how you define identity” MT – Worth thinking about timelines - I want to get this out ASAP, generalized handling is nice but it’s not clear that people need this soon. PAths forward Option 1 NOW: Different types are never isomorphic, we implement SimpleMol.are_isomorphioc , objects of the same type can compare to each other LATER: either objects of different types know how to compare to each other, or
Option 2
Long-run decisions
|