Chemellia / ChemistryFeaturization.jl

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

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

Open Boxylmer opened 2 years ago

Boxylmer commented 2 years ago

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?

rkurchin commented 2 years ago

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