Dear Paul and Brian, thanks a lot for your fast answers!
Brian's proposal works and is exactly what I was looking for! RDKit rules! Many thanks again! Kind regards, Axel On 07.11.2016 14:23, Brian Kelley wrote: > I would try checking: > > atom.HasQuery() > > I expect the smarts molecules have this property by default and smiles don't. > Greg can confirm, and I can double check later today. > > ---- > Brian Kelley > >> On Nov 7, 2016, at 7:57 AM, Paul Emsley <pems...@mrc-lmb.cam.ac.uk> wrote: >> >>> On 07/11/2016 12:37, Axel Pahl wrote: >>> >>> amongst other options, I can generate an RDKit mol object by one of >>> these two ways: >>> >>> mol1 = Chem.MolFromSmiles(<valid Smiles>) >>> mol2 = Chem.MolFromSmarts(<valid Smarts>) >>> >>> Is there a possibility to detect for a given mol object whether it was >>> generated from Smiles or Smarts? >> Not obviously to me. >> >> Perhaps you can do something like this at creation time: >> >> mol2.SetProp('origin', 'SMARTS') >> >> then use mol.GetProp('origin') when you need to do the test (inside a >> try/except KeyError). >> >> Paul. >> >> >> ------------------------------------------------------------------------------ >> Developer Access Program for Intel Xeon Phi Processors >> Access to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss