rdkit / shape-it

Updated version of Silicos-it's shape-based alignment tool
MIT License
40 stars 12 forks source link

option scoreOnly cannot work #17

Closed gkxiao closed 8 months ago

gkxiao commented 2 years ago

Expected behavior

When option scoreOnyl is used, it should return the similarity score which is a floating type.

Actual behavior

With the option scoreOnly on, the score value is -nan and the volume of reference and database molecule are 0.

Step to reproduce scoreOnly failure

shape-it -r ex1.sdf -d ex1.sdf -o ex1_aligned.sdf -s ex1_aligned.score --scoreOnly
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Shape-it v2.0.0 | Aug  9 2022 19:11:26

  -> GCC:       11.2.0
  -> OpenBabel: 3.1.0

  Copyright 2012-2021 by Silicos-it, a division of Imacosi BVBA, Hans De Winter,
     and the Shape-it contributors

  Shape-it is free software: you can redistribute it and/or modify
  it under the terms of the MIT license.

  Shape-it is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  MIT License for more details.

  Shape-it is linked against OpenBabel version 2.
  OpenBabel is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation version 2 of the License.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

COMMAND_LINE OPTIONS:

  -> Reference file:    ex1.sdf
  -> Database file:     ex1.sdf
  -> Output file:       ex1_aligned.sdf
  -> Scores file:       ex1_aligned.score
  -> Best hits:         no
  -> Scoring only:      yes
  -> Extra iterations:  no
  -> Rank by:           Shape-it::Tanimoto
  -> Cutoff:            no
  -> Output reference   yes

Processed 1 molecules
1 molecules in 0.022083 seconds (45.2837 molecules per second)

show scoring file:

$ cat ex1_aligned.score
dbName  refName Shape-it::Tanimoto      Shape-it::Tversky_Ref   Shape-it::Tversky_Db    overlap refVolume       dbVolume
EX1     EX1     -nan    -nan    -nan    0       0       0
iwatobipen commented 8 months ago

This issue was solved. #18