Hi Greg,

 

Brilliant - thanks for the detailed answer. Sorry I missed out the MatchVect 
argument.

 

I'll try this out.

 

All the best,

 

George.
 
> From: [email protected]
> Date: Fri, 24 Jul 2009 20:54:33 +0200
> Subject: Re: [Rdkit-discuss] Bookmarks
> To: [email protected]
> CC: [email protected]
> 
> George,
> 
> On Fri, Jul 24, 2009 at 8:06 PM, George Oakman<[email protected]> wrote:
> >
> > If I wanted to bookmark atoms that match a particular substructure, how
> > would I go about it? SubstructMatch returns the number of matches for a
> > given substructure, but how can I extract information about the location of
> > the matches?
> 
> SubstructMatch() is overloaded. The first form:
> http://www.rdkit.org/C++_Docs/namespaceRDKit.html#e494d544f0cbc823554f13c11b26763e
> places a single match in the the matchVect argument (if there is one)
> and returns whether or not a match was found.
> 
> The second form:
> http://www.rdkit.org/C++_Docs/namespaceRDKit.html#9b20ad23a3197798585685fe766bae41
> returns the number of matches and places the matches in the vector of
> MatchVects that is provided as an argument
> 
> A MatchVect is an vector of int,int pairs, the length of the vect is
> the number of atoms in the substructure query. Each pair contains an
> atom index from the query and an atom index from the molecule. So for
> a match of the query CCO onto the molecule OCCC, you'd have the vector
> : [pair(0,2), pair(1,1), pair(2,0)]
> 
> Hope this helps,
> -greg

_________________________________________________________________
Share your memories online with anyone you want.
http://clk.atdmt.com/UKM/go/134665338/direct/01/

Reply via email to