Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fingerprint segfaults with branchedPaths=False and useHs=False #1793

Closed
chrishmorris opened this issue Mar 27, 2018 · 3 comments
Closed

Fingerprint segfaults with branchedPaths=False and useHs=False #1793

chrishmorris opened this issue Mar 27, 2018 · 3 comments
Labels
Milestone

Comments

@chrishmorris
Copy link

$ python -c 'import rdkit; print(rdkit.version)'
2017.09.2

  • Platform: Windows 10
  • Also observed in Centos 7.2 VirtualBox VM
from rdkit import Chem
from rdkit.Chem import rdmolops

mol = Chem.MolFromSmiles('C')  
Chem.rdmolops.RDKFingerprint(mol,
    useHs=False,
    branchedPaths=False
)
# Segmentation fault

Also LayeredFingerprint with

from rdkit import Chem
from rdkit.Chem import rdmolops

mol = Chem.MolFromSmiles('C')  
Chem.rdmolops.LayeredFingerprint(mol, 
    branchedPaths=False
)
# segfault
@greglandrum
Copy link
Member

I can't reproduce this with either 2017.09.2 or 2017.09.3 using python 3.6 and Windows 10::

In [4]: from rdkit import rdBase

In [5]: import rdkit

In [6]: rdkit.rdBase.rdkitVersion
Out[6]: '2017.09.3'

In [7]: Chem.RDKFingerprint(Chem.MolFromSmiles('C'),branchedPaths=False)
Out[7]: <rdkit.DataStructs.cDataStructs.ExplicitBitVect at 0x269d04ec440>

Did you build the RDKit yourself or is this a conda build?
Which version of Python are you using?

@chrishmorris
Copy link
Author

This is a conda build of rdkit:
rdkit=2017.09.2.0=py35h67c6137_1

$ python --version
Python 3.5.4 :: Anaconda, Inc.

We are on this version of python because we were trying to use Theano, which fails on 3.6.

Thank you for rdkit, which is awesome.

@greglandrum
Copy link
Member

Ah... it's actually the combination of useHs=False and branchedPaths=False that causes the problem:

In [2]: Chem.RDKFingerprint(Chem.MolFromSmiles('CC'),branchedPaths=False,useHs=False)
Segmentation fault (core dumped)

That's using the current version of master.

@greglandrum greglandrum added this to the 2018_03_1 milestone Mar 28, 2018
@greglandrum greglandrum changed the title Fingerprint segfaults with branchedPaths=False Fingerprint segfaults with branchedPaths=False and useHs=False Mar 28, 2018
greglandrum added a commit to greglandrum/rdkit that referenced this issue Mar 28, 2018
A bit of reformatting too.
greglandrum added a commit that referenced this issue Apr 2, 2018
A bit of reformatting too.
ricrogz pushed a commit to ricrogz/rdkit that referenced this issue Aug 21, 2018
A bit of reformatting too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants