Re: [Rdkit-discuss] Find structures with "non-organic" atoms

2022-03-07 Thread Rafael L via Rdkit-discuss
Thank you, all! Here is my Python implementation for anyone interested: # Check for compounds with "non-organic" atoms not_organic_pat = Chem.MolFromSmarts("[!#5;!#6;!#7;!#8;!#16;!#15;!F;!Cl;!Br;!I;!#1]") # not_organic_pat =

Re: [Rdkit-discuss] Question matching substructures from SMARTS with explicit hydrogens

2022-03-07 Thread David Cosgrove
Glad it works for you. As Greg pointed out to someone else today, it’s marginally more efficient to do [#6] than [C,c] and likewise for nitrogen. But it’s always a trade off between speed and legibility/maintainability. If speed is of the essence and you’re running on millions of compounds it

Re: [Rdkit-discuss] Question matching substructures from SMARTS with explicit hydrogens

2022-03-07 Thread Adam Moyer
Ahh! Thank you so much, to both of you. Yes, the different meaning of H in the various contexts was tripping me up. Also, DescribeQuery() was definitely a function that I needed for debugging this solo. Thank you. I will keep that in mind in the future. I found that this smiles (S4) is exactly