Re: [Rdkit-discuss] How to calculate Tanimoto similarity score between reactions

2020-06-11 Thread Greg Landrum
Hi Shaozhen,

The function for creating reaction fingerprints is
rdChemReactions.CreateDifferenceFingerprintForReaction()
Here's a quick demo of using it on your reactions:

In [44]: rxn1 = rdChemReactions.ReactionFromSmarts('CCCO>>CCC=O')

In [45]: rxn2 = rdChemReactions.ReactionFromSmarts('CC(O)C>>CC(=O)C')

In [46]: fp1 = rdChemReactions.CreateDifferenceFingerprintForReaction(rxn1)

In [47]: fp2 = rdChemReactions.CreateDifferenceFingerprintForReaction(rxn2)

In [48]: DataStructs.TanimotoSimilarity(fp1,fp2)

Out[48]: 0.0


The similarity here is zero because as far as the reaction fingerprint is
concerned the parts which change within the reactions have nothing in
common with each other.

An example where there is some similarity in what changes:

In [49]: rxn3 = rdChemReactions.ReactionFromSmarts('NCCO>>NCC=O')

In [50]: fp3 = rdChemReactions.CreateDifferenceFingerprintForReaction(rxn3)

In [51]: DataStructs.TanimotoSimilarity(fp1,fp3)

Out[51]: 0.42857142857142855


The reaction fingerprinting algorithm is described in this paper:
https://pubs.acs.org/doi/abs/10.1021/ci5006614

Best,
-greg


On Wed, Jun 10, 2020 at 6:13 AM 丁邵珍 <164362...@qq.com> wrote:

> Hi, I want to calculate Tanimoto similarity score of two reactions
> ('CCCO>>CCC=O', 'CC(O)C>>CC(=O)C'), I found all methods of  Tanimoto
> similarity score calculation are for compounds. Could you please tell me
> how to calculate the Tanimoto similarity score of reactions? I am looking
> forward to your reply.
>
> Yours,
> shaozhen
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] How to calculate Tanimoto similarity score between reactions

2020-06-10 Thread Francois Berenger

On 10/06/2020 13:11, 丁邵珍 wrote:

Hi, I want to calculate Tanimoto similarity score of two reactions
('CCCO>>CCC=O', 'CC(O)C>>CC(=O)C'), I found all methods of  Tanimoto
similarity score calculation are for compounds. Could you please tell
me how to calculate the Tanimoto similarity score of reactions? I am
looking forward to your reply.


I don't know how to do it in rdkit, but if you need some inspiration,
here is how chemaxon does it:

https://docs.chemaxon.com/display/docs/Reaction_fingerprint_RF.html


Yours,
shaozhen
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



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


[Rdkit-discuss] How to calculate Tanimoto similarity score between reactions

2020-06-09 Thread ??????
Hi, I want to calculate Tanimoto similarity score of two reactions 
('CCCOCCC=O', 'CC(O)CCC(=O)C'), I found all methods of 
Tanimoto similarity score calculation are for compounds. Could you please tell 
me how to calculate the Tanimoto similarity score of reactions? I am looking 
forward to your reply.


Yours,
shaozhen___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss