Hi All,

I have one query about Substructure matching using RDKit.

I have a target SMILES codes (Required to convert Canonical SMILES format)
which may content 1 or more than one SMILES code

I have one more file, a query file, which content just one SMILES code of a
small fragment. Say,

Target file: Brc1ccc(cc1)C(=O)Nc1n[nH]c(c1)C1CCCCC1

Query file format: c1cn[nH]c1

I have to compare whether the query fragment is present in the target file
or not.


I able to do it in command line

Here is the command

from __future__ import print_function

from rdkit import Chem

m = Chem.MolFromSmiles('Brc1ccc(cc1)C(=O)Nc1n[nH]c(c1)C1CCCCC1')

m.HasSubstructMatch(Chem.MolFromSmarts('c1cn[nH]c1'))

True


However, I want to do this substructure search using command line
(say, python script).

Could you please help me to do this.

Your help will be highly appreciated.


Thanks and Kind Regards,

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

Reply via email to