Skip to content

Colab showcase notebook is currently giving an error #197

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

Closed
hannahbaumann opened this issue Apr 14, 2025 · 4 comments
Closed

Colab showcase notebook is currently giving an error #197

hannahbaumann opened this issue Apr 14, 2025 · 4 comments
Assignees

Comments

@hannahbaumann
Copy link
Contributor

The showcase notebook hasn't been updated to the newest OpenFE release.

Additionally, running the showcase notebook in google colab is giving me following numpy error.

import locale
locale.getpreferredencoding = lambda _: 'UTF-8'  # hack for google colab, not needed for local execution
from openfe import SmallMoleculeComponent

# Load ligands using RDKit
ligands_sdf = Chem.SDMolSupplier('inputs/tyk2_ligands.sdf', removeHs=False)

# Now pass these to form a list of Molecules
ligand_mols = [SmallMoleculeComponent(sdf) for sdf in ligands_sdf]
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-11-00f731212e82>](https://localhost:8080/#) in <cell line: 0>()
      1 import locale
      2 locale.getpreferredencoding = lambda _: 'UTF-8'  # hack for google colab, not needed for local execution
----> 3 from openfe import SmallMoleculeComponent
      4 
      5 # Load ligands using RDKit

15 frames
[/usr/local/lib/python3.11/dist-packages/numpy/__init__.py](https://localhost:8080/#) in __getattr__(attr)
    408             return char.chararray
    409 
--> 410         raise AttributeError("module {!r} has no attribute "
    411                              "{!r}".format(__name__, attr))
    412 

AttributeError: module 'numpy' has no attribute 'cumproduct'
@IAlibay
Copy link
Member

IAlibay commented Apr 14, 2025

This seems to be a numpy 2.0 issue, I know that it was migrated to np.cumprod, and that np.cumproduct is not available anymore.

That being said, wasn't numpy 2.0 incompatible with openmmtools? Should we just pin for now?

@IAlibay
Copy link
Member

IAlibay commented Apr 14, 2025

Relevant openmmtools issue for numpy 2.0: choderalab/openmmtools#772

@atravitz
Copy link
Contributor

@atravitz
Copy link
Contributor

atravitz commented May 1, 2025

resolved by #204

@atravitz atravitz closed this as completed May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants