Chemellia / ChemistryFeaturization.jl

Interface package for featurizing atomic structures
https://chemistryfeaturization.chemellia.org/dev/
MIT License
41 stars 14 forks source link

make `DummyFeaturization` #85

Closed rkurchin closed 3 years ago

rkurchin commented 3 years ago

We want to enforce that Atoms objects with encoded features populated always carry a featurization. However, for certain model layers (e.g. graph convolution), the output is another such Atoms object, but the original featurization doesn't actually make sense anymore (and in fact may not even be strictly valid if the size of the feature matrix changed through the layer). Hence, we should probably make a DummyFeaturization to basically be a placeholder and if you try to actually do a decode with it, it gives some helpful message explaining why it can't decode.

On a related note, I had to comment out some checks in the main AtomGraph constructor that were validating that the encoded features actually matched the featurization (because it now dispatches on AbstractFeaturization rather than GraphNodeFeaturization specifically), so we could just make a new function like validate_features(encoded, fzn) that would dispatch across different featurization types, and if you fed in a DummyFeaturization it would always say it was okay.

Labeling priority because some solution to this is needed to make AtomicGraphNets compatible with the restructured package.

rkurchin commented 3 years ago

On second thought, since we don't really have a specific use for validate_features right now, I'm putting that in a separate issue #YAGNI