code: def __init__(self, smiles_list, bayesian_optimization=False):
      self.vocab = smiles_list
      self.vmap = {x: i for i, x in enumerate(self.vocab)}
      self.slots = [get_slots(smiles) for smiles in self.vocab]
      if not bayesian_optimization:
          Vocab.benzynes = [
              s
              for s in smiles_list
              if s.count("=") >= 2
              and Chem.MolFromSmiles(s).GetNumAtoms() == 6
          ] + ["C1=CCNCC1"]
          Vocab.penzynes = [
              s
              for s in smiles_list
              if s.count("=") >= 2
              and Chem.MolFromSmiles(s).GetNumAtoms() == 5
          ] + ["C1=NCCN1", "C1=NNCC1"]
  
file_path: DIG/dig/ggraph/method/JTVAE/fast_jtnn/vocab.py
imports: import rdkit
  import rdkit.Chem
  import copy
label_desc: Use image node_id 1 to create a new Vocab object from inherited base classes: object with example: obj = Vocab(smiles_list, bayesian_optimization)