Feature
- model openff.nagl.features.Feature[source]
Abstract base class for atom and bond features.
Features with length one can simply inherit
AtomFeature
orBondFeature
, implement_encode
, and definename
. Complex features should additionally define the_feature_length
class attribute and set it to the length of the feature.- Fields:
name (Literal[''])
- encode(molecule: Molecule) Tensor [source]
Encode the molecule feature into a tensor.
The output of this method must have shape
tensor_shape
. Subclasses may instead implement a_encode
method with the same signature as this one. The default implementation of this method will call that one and guarantee an appropriate shape.