dgllife.utils.atom_total_degree_one_hot

dgllife.utils.atom_total_degree_one_hot(atom, allowable_set=None, encode_unknown=False)[source]

One hot encoding for the degree of an atom including Hs.

Parameters
  • atom (rdkit.Chem.rdchem.Atom) – RDKit atom instance.

  • allowable_set (list) – Total degrees to consider. Default: 0 - 5.

  • encode_unknown (bool) – If True, map inputs not in the allowable set to the additional last element. (Default: False)