mordred-descriptor / mordred

a molecular descriptor calculator
http://mordred-descriptor.github.io/documentation/master/
BSD 3-Clause "New" or "Revised" License
355 stars 95 forks source link

Deprecation Warning #100

Open Pantelispanka opened 2 years ago

Pantelispanka commented 2 years ago

description

Getting some Deprecation warnings from numpy. DeprecationWarning: Calling np.sum(generator) is deprecated, and in the future will give a different result. Use np.sum(np.fromiter(generator)) or the python sum builtin instead.

site-packages/mordred/ABCIndex.py:88:

minimal reproduction code

Base usage of calc function

    from rdkit import Chem

    from mordred import Chi, ABCIndex

    benzene = Chem.MolFromSmiles('c1ccccc1')

    # create descriptor instance
    abci = ABCIndex.ABCIndex()

    # calculate descriptor value
    result = abci(benzene)

    print(str(abci), result)

    # create descriptor instance with parameter
    chi_pc4 = Chi.Chi(type='path_cluster', order=4)

    # calculate
    result = chi_pc4(benzene)

    print(str(chi_pc4), result)

environment

OS/distribution

Mac os python 3.8

conda or pip

pip

python version

Python 3.8.6

library version

mordred==1.2.0 numpy==1.19.4

martinwk commented 1 year ago

This issue is one year old, any chance this will be addressed?

JacksonBurns commented 5 months ago

This is resolved in our community maintained fork of mordred: https://github.com/JacksonBurns/mordred-community