I hope I have chosen the right forum part.
I need to calculate the similarity of two fingerprints (for example ECFP4).
Therefore I have calculated the binary ECFP fingerprints (generatemd) and stored them in a file. Now I want to calculate the similarity for two compounds. Or in best case all against all.
I have to do it on the command line. Therefore the "jcsearch" command should work but I am not sure how and if this is the right command.
Can anybody help me.
Best in advanced
The easiest way to calculate similarity values for molecule pairs is to use our screenmd command line tool.
If you have a for target and query molecules, you can use it as follows:
screenmd targets.sdf queries.smiles -g -k ECFP -c ecfp.xml
I hope this helps.
thanks for your answer.
This works well.
Please let me shortly summary the screenmd command:
- The result of this are the dissimilarity scores.
- No filter is used
No I want to get directly the tanimoto values. Therefore I used the Tanimoto Metric from the ecfp.xml file.
screenmd input.sdf reference.cfp -g -k ECFP -c ecfp.xml -M Tanimoto
I get a result but the "tanimoto" values (it should now be the similarity and not dissimilarity) looks wrong. The predefined threshold is 0.2.
What goes wrong with this command? Or do I understand something wrong?
The screenmd can only generate dissimilarity values. You can either manually subtract them to get the Tanimoto similarity, or modify the threshold to 1-diss.thr. in the XML config file for the calculation.
Does this help?
no I am really confused. I found the following describtion for the metric: (https://docs.chemaxon.com/display/jchembase/Similarity+search#Similaritysearch-search)
Similarity / Dissimilarity metrics for molecules
metrics are provided in JChem to compute the value of similarity or
dissimilarity. Some metrics (for example Tanimoto) provide similarity
values, some other metrics (for example Euclidean) provide dissimilarity
values. The values calculated with the metrics listed in the table
below (with the exception of Euclidean) vary from 0 to 1. Similarity (S)
value can be calculated from the value of dissimilarity(D): S = 1 - D
(with the exception of Euclidean metric).
Actually I do not really understand how I could modify the threshold to 1-diss.thr. in the XML file. How should this looks like?
You can modify the dissimilarity threshold in the ECFP config XML:
<ParametrizedMetric Name="Tanimoto" ActiveFamily="Generic" Metric="Tanimoto" Threshold="0.5"/>
<ParametrizedMetric Name="Euclidean" ActiveFamily="Generic" Metric="Euclidean" Threshold="10"/>
In this case the diss. threshold is 0.5. This means that every target molecule that has dissimilarity (compared to the query) greater than 0.5 will be listed in the output. This is the same as listing every target molecule that has smaller similarity than 0.5 to the query. What you can do is set a diss. threshold and sort the output in increasing order based on the Tanimoto value column. Then the most similar targets will stand at the top.
I am directly interested in the similarity matrix and not dissimilarity.
I tried some variants of Metrics. But nothing works.
So some questions:
- Do i use the right command for SIMILARIY search?
- is there a metric to do 1-dissim.
Unfortunately screenmd can only handle dissimilarity metrics. I suggest that you write a very simple script to calculate the similarity matrix based on the calculated dissimilarity.