ICAMS / calphy

A Python library and command line interface for automated free energy calculations
Other
71 stars 21 forks source link

ImportError: cannot import name 'cumtrapz' #136

Closed stefanhiemer closed 4 months ago

stefanhiemer commented 4 months ago

Hi there,

  1. Thanks for the nice package!
  2. I installed calphy according to instructions. When trying to use calphy for the free energy tutorial I get this error: ImportError: cannot import name 'cumtrapz' from 'scipy.integrate'

It seems that calphy relies on a deprecated command cumtrapz in its integrators. It should be replaced by the newer cumulative_trapezoid. I already fixed it in a backwards compatible fashion:

https://github.com/stefanhiemer/calphy/tree/main

If that is fine for you, I would do a pull request.

  1. After the fix it still does not run properly. When I try the free energy tutorial I get this error back:

fe-bcc-solid-100-0.sub.err.txt

It cannot locate the potential. Any idea where the issue might lie?

My OS is Fedora 40, Python version 3.12.4 and I use Anaconda3-2023.07-2-Linux-x86_64.

stefanhiemer commented 4 months ago

Nevermind point 3. My problem was, that calphy assumes the potentials to lie in a specific place and not some internal, automatically detected database or similar. It would be good to give a hint in the Examples section at the start or somewhere.

Regards Stefan

srmnitc commented 4 months ago

@stefanhiemer thanks for pointing this out, it would be great if you could open a PR. Thanks again!

stefanhiemer commented 4 months ago

No problem. The PR is done.