Closed aa-schoepfer closed 2 months ago
Hello, I'm trying to compute similarities with SSSearcherWithIndex
SSSearcherWithIndex
Here is a snippet to simulate my problem using version 8.9.0:
8.9.0
const { Molecule, SSSearcherWithIndex } = require('openchemlib'); const mol1 = Molecule.fromSmiles('CO'); const mol2 = Molecule.fromSmiles('CCO'); const sss = new SSSearcherWithIndex(); const index1 = sss.createIndex(mol1); const index2 = sss.createIndex(mol2); const similarity = sss.getSimilarityTanimoto(index1, index2); console.log(similarity)
This gives the following error: TypeError: sss.getSimilarityTanimoto is not a function. However, the following does the trick:
TypeError: sss.getSimilarityTanimoto is not a function
const similarity = sss.sc.e.getSimilarityTanimoto(index1, index2);
I guess that this is not the intended way... Thanks for the awesome package otherwise!
This is a static method so should be called using the constructor: SSSearcherWithIndex.getSimilarityTanimoto(index1, index2)
SSSearcherWithIndex.getSimilarityTanimoto(index1, index2)
https://github.com/cheminfo/openchemlib-js/blob/70edd49cc5b7d45ac0e7060ad81f3281fdc4cef4/types.d.ts#L3134
Hello, I'm trying to compute similarities with
SSSearcherWithIndex
Here is a snippet to simulate my problem using version
8.9.0
:This gives the following error:
TypeError: sss.getSimilarityTanimoto is not a function
. However, the following does the trick:I guess that this is not the intended way... Thanks for the awesome package otherwise!