Hi Fabian,

On Mar 19, 2013, at 2:05 PM, Fabian Dey wrote:
> - in order to get a 1-1 correspondence of atom ids (to get the coordinate 
> map) I had to search the MCS-SMARTS match again against the original files to 
> get the atom-ids - is there a more direct way to do this?

There is no more direct way to do this. There are two reasons why not.

Partially it's an API behavior. Given "CCOC" there is, of course,
2 possible matches for the substructure "CO". The MCS code can't
figure out which has preference, which means it should return either
0 mappings or all of them.

(In the "Zen of Python", this falls under "refuse the temptation
to guess.")

Second, it doesn't actually know the match coordinates. The MCS
code uses HasSubstructMatch, which only reports if at least one
match exists. It doesn't return the mapping.

So while the API could do a post-processing step, to return an
arbitrarily selected match, it isn't needed for the cases I
was interested in, and it's easy (a two-liner) to do it yourself.


                                Andrew
                                [email protected]



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to