Re: [Rdkit-discuss] delete a substructure

2017-03-11 Thread David Cosgrove
There's a bit more to it than that. If you're developing a SMARTS for a particular type of group, you can run it against a large file and see the false hits and false non-hits quickly and revise your SMARTS accordingly. And as you say, it is also available. Dave On Fri, 10 Mar 2017 at 20:53,

Re: [Rdkit-discuss] delete a substructure

2017-03-10 Thread Peter S. Shenkin
Sounds like Daylight's "depictmatch", unfortunately no longer available on line -P. On Fri, Mar 10, 2017 at 1:28 PM, David Cosgrove wrote: > Hi, > In the RDKit source, under the 2d drawing code in the c++ part there's the > full source code for a QT program that

Re: [Rdkit-discuss] delete a substructure

2017-03-09 Thread Chenyang Shi
Thank you Chris. I found that one too; it is quite convenient to visualize both SMARTS and SMILES strings. On Thu, Mar 9, 2017 at 11:28 AM, Chris Swain wrote: > I use SMARTSviewer at Univ of Hamburg > > http://www.zbh.uni-hamburg.de/en/bioinformatics-server.html > > Chris > > On

Re: [Rdkit-discuss] delete a substructure

2017-03-09 Thread Chris Swain
I use SMARTSviewer at Univ of Hamburg http://www.zbh.uni-hamburg.de/en/bioinformatics-server.html Chris > On 9 Mar 2017, at 17:21, rdkit-discuss-requ...@lists.sourceforge.net wrote: > > One last question I have is do you guys have

Re: [Rdkit-discuss] delete a substructure

2017-03-09 Thread Chenyang Shi
.smarts.html > 4.4 > > -- > Hongbin Yang > > > *From:* Chenyang Shi <cs3...@columbia.edu> > *Date:* 2017-03-09 01:32 > *To:* Greg Landrum <greg.land...@gmail.com> > *CC:* rdkit-discuss <rdkit-discuss@lists.sourceforge.net>; 杨弘宾 &g

Re: [Rdkit-discuss] delete a substructure

2017-03-08 Thread 杨弘宾
iles('[$(Oc)]'))    >>> ((10,),) Then only atom 10 will be matched and it won't interfere with other counts. Reference: http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html  4.4 Hongbin Yang   From: Chenyang ShiDate: 2017-03-09 01:32To: Greg LandrumCC: rdkit-discuss; 杨弘宾Subject

Re: [Rdkit-discuss] delete a substructure

2017-03-08 Thread Pavel Polishchuk
- Hongbin Yang 杨弘宾 *From:* Chenyang Shi <mailto:cs3...@columbia.edu> *Date:* 2017-03-06 14:04 *To:* Greg Landrum <mailto:greg.land...@gmail.com> *CC:* RDKit Discuss <mailto:rdkit-discuss@lists.sourceforge.ne

Re: [Rdkit-discuss] delete a substructure

2017-03-06 Thread Chenyang Shi
in Yang 杨弘宾 >> >> >> *From:* Chenyang Shi >> <javascript:_e(%7B%7D,'cvml','cs3...@columbia.edu');> >> *Date:* 2017-03-06 14:04 >> *To:* Greg Landrum >> <javascript:_e(%7B%7D,'cvml','greg.land...@gmail.com');> >> *CC:* RDKit Discuss &g

Re: [Rdkit-discuss] delete a substructure

2017-03-05 Thread Greg Landrum
uld be ignored. > So you can create a "set" to record the matched atoms to avoid repetitive > count. > > -- > Hongbin Yang 杨弘宾 > > > *From:* Chenyang Shi <cs3...@columbia.edu> > *Date:* 2017-03-06 14:04 > *To:* Greg Landru

Re: [Rdkit-discuss] delete a substructure

2017-03-05 Thread 杨弘宾
Hi, Chenyang,    You don't need to delete the substructure from the molecule. Just check whehter the mapped atoms have been matched. For example: m = Chem.MolFromSmiles('CC(=O)O')OH = Chem.MolFromSmarts('[OH]')COOH = Chem.MolFromSmarts('C(O)=O') m.GetSubstructMatches(OH)>> 

Re: [Rdkit-discuss] delete a substructure

2017-03-05 Thread Chenyang Shi
Hi Greg, Thanks for a prompt reply. I did try "GetSubstructMatches()" and it returns correct numbers of substructures for CH3COOH. The potential problem with this approach is that if the molecule is getting complicated, it will possibly generate duplicate numbers for certain functional groups.

Re: [Rdkit-discuss] delete a substructure

2017-03-05 Thread Greg Landrum
Hi Chenyang, If you're really interested in counting the number of times the substructure appears, you can do that much quicker with `GetSubstructMatches()`: In [2]: m = Chem.MolFromSmiles('CC(C)CCO') In [3]: len(m.GetSubstructMatches(Chem.MolFromSmarts('[CH3;X4]'))) Out[3]: 2 Is that

[Rdkit-discuss] delete a substructure

2017-03-05 Thread Chenyang Shi
Hi everyone, I am new to rdkit but I am already impressed by its vibrant community. I have a question regarding deleting substructure. In the RDKIT documentation, this is a snippet of code describing how to delete substructure: >>>m = Chem.MolFromSmiles("CC(=O)O") >>>patt =