dgl.data.chem.CanonicalBondFeaturizer

class dgl.data.chem.CanonicalBondFeaturizer(bond_data_field='e')[source]

A default featurizer for bonds.

The bond features include: * One hot encoding of the bond type. The supported bond types include

SINGLE, DOUBLE, TRIPLE, AROMATIC.
  • Whether the bond is conjugated..
  • Whether the bond is in a ring of any size.
  • One hot encoding of the stereo configuration of a bond. The supported bond stereo configurations include STEREONONE, STEREOANY, STEREOZ, STEREOE, STEREOCIS, STEREOTRANS.

We assume the resulting DGLGraph will be created with :func:`smiles_to_bigraph` without self loops.

__init__(bond_data_field='e')[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([bond_data_field]) Initialize self.
feat_size(feat_name) Get the feature size for feat_name.