diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 842f429..d192127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.7", "3.13"] + python: ["3.9", "3.13"] runs-on: ubuntu-22.04 diff --git a/README.md b/README.md index a2bd851..76d12a6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ After installation, the code is available as a script via the `promdens` command promdens --help ``` -The minimum supported Python version is 3.7. +The minimum supported Python version is 3.9. The code depends on `numpy` and `matplotlib` libraries that are automatically installed by pip. However, since pip by default installs packages into a global Python environment, it can break previously installed packages, e.g., by installing an incompatible version of numpy. diff --git a/pyproject.toml b/pyproject.toml index fc65a63..cfa3191 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,9 +15,9 @@ classifiers = [ ] description = "Promoted Density Approach for sampling initial conditions for trajectory-based nonadiabatic photodynamics" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.9" dependencies = [ - "numpy>=1.15", + "numpy>=2.0.0", "matplotlib~=3.0", ] diff --git a/src/promdens/promdens.py b/src/promdens/promdens.py index 21db5ed..0a24d1c 100755 --- a/src/promdens/promdens.py +++ b/src/promdens/promdens.py @@ -217,7 +217,7 @@ def wigner_transform(self, tprime, de): s = np.arange(0, factor[self.envelope_type]*self.fwhm, step=ds) # Note: We assume here that de is in atomic units, otherwise it needs to be divided by hbar cos = np.cos((de - loc_omega)*s) - integral = 2*np.trapz(x=s, + integral = 2*np.trapezoid(x=s, y=cos*self.calc_field_envelope(tprime + s/2)*self.calc_field_envelope(tprime - s/2)) return integral