code: def from_rdmol(rdmol, assign_descriptor=True):
      
      mol = Compound()
      conf = rdmol.GetConformer()
      Chem.Kekulize(rdmol)
      for atom in rdmol.GetAtoms():
          key = atom.GetIdx()
          a = Atom(atom.GetSymbol())
          a.coords = conf.GetAtomPosition(key)
          mol.add_atom(key, a)
      for bond in rdmol.GetBonds():
          u = bond.GetBeginAtomIdx()
          v = bond.GetEndAtomIdx()
          b = Bond()
          b.order = int(bond.GetBondTypeAsDouble())
          mol.add_bond(u, v, b)
      if assign_descriptor:
          molutil.assign_descriptors(mol)
      return mol
docs: Convert RDMol to molecule