def _generate_randomized_not_repeated(
         smi,
         num_rand=self.num_randomized_smiles,
         max_rand=self.max_randomized_smiles_sample):
     mol = uc.to_mol(smi)
     randomized_scaffolds = set()
     for _ in range(max_rand):
         randomized_scaffolds.add(usc.to_smiles(mol, variant="random"))
         if len(randomized_scaffolds) == num_rand:
             break
     return list(randomized_scaffolds)
 def _generate_randomized_repeated(smi,
                                   num_rand=self.num_randomized_smiles):
     mol = uc.to_mol(smi)
     return [
         usc.to_smiles(mol, variant="random") for _ in range(num_rand)
     ]
 def _join_scaffold(scaff, decs):
     mol = usc.join_joined_attachments(scaff, decs)
     if mol:
         return usc.to_smiles(mol)
 def _format_attachment_point(smi, num):
     smi = usc.add_first_attachment_point_number(smi, num)
     return usc.to_smiles(uc.to_mol(smi))  # canonicalize
 def _join_scaffold(scaff, dec):
     mol = usc.join(scaff, dec)
     if mol:
         return usc.to_smiles(mol)
def _cleanup_decoration(dec_smi):
    dec_mol = uc.to_mol(dec_smi)
    if not dec_mol:
        return None
    return usc.to_smiles(usc.remove_attachment_point_numbers(dec_mol))