original_docstring: Given a smiles, return a mol
docstring: Given a smiles, return a mol
docstring_tokens: Given a smiles return a mol
code: def smiles2mol(smiles, maplist=None):
      '''Given a smiles, return a mol'''
      mol = Chem.MolFromSmiles(smiles)
      if not mol: mol = Chem.MolFromSmiles(smiles, sanitize=False)
      mol.UpdatePropertyCache()
      if maplist:
          for i,atom in enumerate(mol.GetAtoms()):
              atom.SetAtomMapNum(maplist[i])
      return mol
code_tokens: def smiles2mol ( smiles , maplist = None ) : mol = Chem . MolFromSmiles ( smiles ) if not mol : mol = Chem . MolFromSmiles ( smiles , sanitize = False ) mol . UpdatePropertyCache ( ) if maplist : for i , atom in enumerate ( mol . GetAtoms ( ) ) : atom . SetAtomMapNum ( maplist [ i ] ) return mol
short_docstring: Given a smiles, return a mol
short_docstring_tokens: Given a smiles return a mol
comment: '''Given a smiles, return a mol'''