ChemistryFeaturization.jl icon indicating copy to clipboard operation
ChemistryFeaturization.jl copied to clipboard

Using strings to create Featurizations via GraphNodeFeaturization doesn't work with things other than ElementFeatureDescriptors

Open Boxylmer opened this issue 3 years ago • 1 comments

MWE Below:

using ChemistryFeaturization

# these work
featurization = GraphNodeFeaturization([
    "Group",
    "Row",
    "Block",
    "Atomic mass",
    "Atomic radius",
    "X",
])

# but with "isaromatic", which is a SpeciesFeatureDescriptor, it will not. (Block thrown in just for fun)
featurization = GraphNodeFeaturization([
    "Block",
    "isaromatic"
])

The error is: ERROR: LoadError: AssertionError: Feature isaromatic isn't in the lookup table!, so do these terms just need to simply be added?

Boxylmer avatar Dec 02 '21 01:12 Boxylmer

Thanks for pointing this out, this definitely needs to be fixed! Will be sure to address in next version tag.

(The issue is that right now that convenience constructor for GraphNodeFeaturization assumes that everything is an ElementFeatureDescriptor because when I implemented it, SpeciesFeatureDescriptor didn't exist yet 😉)

rkurchin avatar Dec 07 '21 13:12 rkurchin