Paolo,

thanks a lot for this solution, I am going to use that.
Also, TIL that ^ is Python's XOR operator. Thanks for that, too ;-) !

Kind regards,
Axel

On 29.06.2018 10:49, Paolo Tosco wrote:

Dear Axel,

what about this:

https://gist.github.com/ptosco/26af473fc1f3129878ca86cb070afe3a

Cheers,
p.

On 06/29/18 08:04, Axel Pahl wrote:
Dear all,

my google-fu is failing is me.
Is it possible in substructure searches to have chain atoms NOT match ring atoms?

In essence, I would like the following example query for n-propane in cyclo-hexane to return False (currently it is returning True):

mol = Chem.MolFromSmiles("C1CCCCC1")
q = Chem.MolFromSmiles("CCC")
print(mol.HasSubstructMatch(q))  # ==> True

Many thanks in advance for your help.

Kind regards,
Axel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to