-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
good first issueGood for newcomersGood for newcomerslongtermCool things that probably won't happen for awhileCool things that probably won't happen for awhile
Description
With Julia 1.8, we'll be able to declare const fields in mutable structs. We should use this to make featurization in FeaturizedAtoms a const, since the featurization assigned to a FeaturizedAtoms object shouldn't change.
diff --git a/src/featurizedatoms.jl b/src/featurizedatoms.jl
index 983cde3..b36050a 100644
--- a/src/featurizedatoms.jl
+++ b/src/featurizedatoms.jl
@@ -14,7 +14,7 @@ Container object for an atomic structure object, a featurization, and the result
"""
struct FeaturizedAtoms{A,F<:AbstractFeaturization}
atoms::A
- featurization::F
+ const featurization::F
encoded_features::Any
FeaturizedAtoms{A,F}(atoms, featurization) where {A,F<:AbstractFeaturization} =
new(atoms, featurization, encode(atoms, featurization))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerslongtermCool things that probably won't happen for awhileCool things that probably won't happen for awhile