rdkit / shape-it

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

Linking against RDKit requires `-o out.sdf`, but linking against OpenBabel does not #11

Closed ljmartin closed 3 years ago

ljmartin commented 3 years ago

Hi all, thanks for this great package. I have two builds on different computers - on a Mac linked against RDKit, and on Ubuntu linked against OpenBabel.

Using the OpenBabel build, this command runs fine:

shape-it -r reference.sdf -d testligs0.sdf -s scores.dat

Using the RDKit build, this same command fails with:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Shape-it v2.0.0 | Jul  6 2021 06:18:11

  -> GCC:       Clang 11.1.0
  -> RDKit: 2021.03.3

  Copyright 2012 by Silicos-it, a division of Imacosi BVBA

  Shape-it is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  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
  GNU Lesser General Public License for more details.

  Shape-it is linked against the RDKit (https://www.rdkit.org).
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

COMMAND_LINE OPTIONS:

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

libc++abi.dylib: terminating with uncaught exception of type Invar::Invariant: null stream
zsh: abort      shape-it -r reference.sdf -d testligs0.sdf -s scores.dat

This can be fixed by simply including an output, i.e.

shape-it -r reference.sdf -d testligs0.sdf -o out.sdf -s scores.dat

so it's not a real problem to usage, just thought I would note it. Screening large libraries means one might not want to write out all the sdfs. Thanks!

greglandrum commented 3 years ago

Confirmed. Thaks @ljmartin !