Hi Rafael,

 

You might find the RDKitSearchSMARTS.py 
<http://www.mayachemtools.org/docs/scripts/html/RDKitSearchSMARTS.html>  script 
helpful for filtering molecules using the SMARTS pattern Pat has provided in 
his response.

 

For example:

 

% RDKitSearchSMARTS.py -p 
'[!#1;!C;!O;!N;!S;!P;!F;!Cl;!Br;!I;!c;!o;!n;!s;!p;!Na;!K;!Mg;!Ca;!Li]' -i 
Sample.smi -o SampleOut.smi --outfileFiltered yes 

 

% RDKitSearchSMARTS.py -n yes -p 
'[!#1;!C;!O;!N;!S;!P;!F;!Cl;!Br;!I;!c;!o;!n;!s;!p;!Na;!K;!Mg;!Ca;!Li]' -i 
Sample.sdf -o SampleOutNotOrganic.sdf

 

Manish

 

 

From: Patrick Walters <[email protected]> 
Sent: Saturday, March 5, 2022 6:17 PM
To: Rafael L <[email protected]>
Cc: rdkit-discuss <[email protected]>
Subject: Re: [Rdkit-discuss] Find structures with "non-organic" atoms

 

Here's what I use. 

 

not_organic_pat = 
Chem.MolFromSmarts("[!#1;!C;!O;!N;!S;!P;!F;!Cl;!Br;!I;!c;!o;!n;!s;!p;!Na;!K;!Mg;!Ca;!Li]")
cisplatin = Chem.MolFromSmiles("[NH3+]-[Pt-2](Cl)(Cl)[NH3+]")
cisplatin.HasSubstructMatch(not_organic_pat)

 

 

 

On Sat, Mar 5, 2022 at 8:08 PM Rafael L via Rdkit-discuss 
<[email protected] 
<mailto:[email protected]> > wrote:

Dear all, I remember having used some SMARTS-based function to flag structures 
containing "non-organic" atoms. It seems that there is a knime node for that 
(https://forum.knime.com/t/rdkit-molecule-substructure-filter-incorrectly-matches-aromatic-sulfur-atoms-molecule-as-metal-containing-compounds/12935),
 but I wasn't able to find any Python implementations. Does anyone know where 
to find it?

Thanks in advance


 

--

Rafael da Fonseca Lameiro

PhD Student - Medicinal and Biological Chemistry Group (NEQUIMED)

São Carlos Institute of Chemistry - University of São Paulo - Brazil

  <https://info.orcid.org/wp-content/uploads/2020/12/orcid_16x16.gif>   
<https://orcid.org/0000-0003-4466-2682> https://orcid.org/0000-0003-4466-2682

_______________________________________________
Rdkit-discuss mailing list
[email protected] 
<mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to