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

module 'networkx' has no attribute 'biconnected_component_subgraphs #84

Open
Shunsuke-1994 opened this issue Mar 31, 2020 · 3 comments · May be fixed by #88
Open

module 'networkx' has no attribute 'biconnected_component_subgraphs #84

Shunsuke-1994 opened this issue Mar 31, 2020 · 3 comments · May be fixed by #88

Comments

@Shunsuke-1994
Copy link

Shunsuke-1994 commented Mar 31, 2020

description

conda install -c rdkit -c mordred-descriptor mordred installed the newest version of networkx(2.4.0, as for today). But biconnected_component_subgraphs is already depricated in networkx (>2.1.0).

minimal reproduction code

I installed mordred via conda as following,

conda create -n mordred python=3.8
conda activate mordred
conda install -c rdkit -c mordred-descriptor mordred

and then I ran the following code.

from mordred import Calculator, descriptors
from rdkit import Chem

smiles = "c1ccccc1"
calc = Calculator(descriptors, ignore_3D=True)
df = calc.pandas([Chem.MolFromSmiles(smiles)])
df["DetourIndex"] # this returns "module 'networkx' has no attribute 'biconnected_component_subgraphs"

environment

macOS High Sierra 10.13.6
conda version : 4.8.2

Best regards,
Shunsuke

ademidun added a commit to ademidun/mordred that referenced this issue Apr 9, 2020
mordred installs the newest version of networkx(2.4.0, as for today). But `biconnected_component_subgraphs` is already depricated in networkx (>2.1.0).
Closes mordred-descriptor#84
@ademidun
Copy link

ademidun commented Apr 9, 2020

@Shunsuke-1994 I have proposed a simple fix in #87. Though I'm not sure when it will get resolved as this repo does not seem to be actively monitored.

@philopon do you think you will have a chance to look into this?

If you are busy, we completely undestand, maybe you could give some other people ability to contribute to this repo?

@Shunsuke-1994
Copy link
Author

@ademidun Thank you! I didn't notice! Or, if you know somebody forked this repository, I would use it.

ademidun pushed a commit to ademidun/mordred that referenced this issue Apr 9, 2020
mordred installs the newest version of networkx(2.4.0, as for today). But `biconnected_component_subgraphs` is already depracated in networkx (>2.1.0).
closes mordred-descriptor#84
ademidun pushed a commit to ademidun/mordred that referenced this issue Apr 9, 2020
mordred installs the newest version of networkx(2.4.0, as for today). But `biconnected_component_subgraphs` is already depracated in networkx (>2.1.0).
closes mordred-descriptor#84
ademidun pushed a commit to ademidun/mordred that referenced this issue Apr 9, 2020
mordred installs the newest version of networkx(2.4.0, as for today). But `biconnected_component_subgraphs` is already depracated in networkx (>2.1.0).
closes mordred-descriptor#84
@ademidun ademidun linked a pull request Apr 9, 2020 that will close this issue
@mkrompiec
Copy link

Instead of forcing an old version of networkx, change line 121 in DetourMatrix.py from:
for bcc in networkx.biconnected_component_subgraphs(self.G, False):
to:
for bcc in (self.G.subgraph(c) for c in networkx.biconnected_components(self.G)):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants