From c1f4ac2bb913d9e189de7f6571c1bbfa0023d539 Mon Sep 17 00:00:00 2001 From: Henrique Musseli Cezar Date: Mon, 14 Aug 2023 15:03:09 +0200 Subject: [PATCH] Force cython<3 for build and docs and revert to mpsort and pfft-python from PyPI Added missing file and cleanup unused file Change order in requirements and changes setup Force cython<3 in ci.yml Fix cython version in docs as well Get mpsort from PyPI Cython<3 in buildDocs and pfft-python from PyPI --- .github/workflows/ci.yml | 2 +- .github/workflows/docs_pages.yml | 2 +- config.toml | 102 ------------------------------- docs/buildDocs.sh | 2 +- pyproject.toml | 2 +- requirements.txt | 8 +-- setup.py | 2 +- 7 files changed, 9 insertions(+), 111 deletions(-) delete mode 100644 config.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8ce727d..ab85b747 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Install python dependencies run: | python3 -m pip install --upgrade pip - python3 -m pip install --upgrade wheel numpy mpi4py cython + python3 -m pip install --upgrade wheel numpy mpi4py "cython<3" CC="mpicc" HDF5_MPI="ON" python3 -m pip install --no-binary=h5py h5py python3 -m pip install -r requirements.txt - name: Install PLUMED diff --git a/.github/workflows/docs_pages.yml b/.github/workflows/docs_pages.yml index 75b2af20..7eab21e2 100644 --- a/.github/workflows/docs_pages.yml +++ b/.github/workflows/docs_pages.yml @@ -31,7 +31,7 @@ jobs: - name: Install python dependencies run: | python3 -m pip install --upgrade pip - python3 -m pip install --upgrade wheel numpy mpi4py cython + python3 -m pip install --upgrade wheel numpy mpi4py "cython<3" python3 -m pip install -r requirements.txt - name: Install package run: | diff --git a/config.toml b/config.toml deleted file mode 100644 index 6a6b13d8..00000000 --- a/config.toml +++ /dev/null @@ -1,102 +0,0 @@ -[meta] -# Name of the simulation. May be ommitted. -name = "DPPC bilayer with ML interaction parameters" -# Tags classifying the simulation. May be ommitted. -tags = ["bilayer", "solvent", "DPPC"] - -[particles] -# Number of total particles in the simulation. If an input .hdf5 format file is -# specified, the number of particles will be inferred from this and *may* be -# ommited. -n_particles = 20336 -# Mass of the particles in [g/mol]. All masses are assumed equal. -mass = 72.0 -# Maximum number of particles per molecules present in the system. A default of -# 200 is assumed, and this keyword may be ommitted for any system with smaller -# molecules. -max_molecule_size = 15 - -[simulation] -# Number of total time steps in the simulation in [picoseconds]. -n_steps = 1 -# Frequency of trajectory/energy file output in time steps. -n_print = 1 -# Frequency of requesting that the HDF5 library flush the file output buffers -# to disk after in number of n_print timesteps. -n_flush = 5000 -# Time step used in the simulation in [picoseconds]. -time_step = 0.3 -# Simulation box size in [nanometers]. -box_size = [13.0, 13.0, 14.0] -# Time integrator used in the simulation. Either "velocity-verlet" or "respa". -# If "respa", specify also the number of small rRESPA time steps per large -# time_step with the 'respa_inner' keyword. -integrator = "respa" -respa_inner = 10 -# Perform MPI rank domain decomposition every x time steps to (hopefully) -# reduce the amount of neccessary communication between ranks in the pmesh -# procedures. Ommit or set to 'false' or '0' to not perform any domain -# decomposition. -domain_decomposition = 1000 -# Starting temperature to generate before simulation begins in [kelvin]. Ommit -# or set to 'false' to not change the temperature before starting. -start_temperature = 323 -# Target temperature used in the velocity rescale thermostat in [kelvin]. Ommit -# or set to 'false' to use no thermostat, i.e. a constant energy simulation. -target_temperature = 323 -# Thermostat collision frequency in [1/picoseconds]. -tau = 0.1 -# The energy functional W[phi] to use. Options: -# "SquaredPhi": φ² / 2κφ₀, -# "DefaultNoChi": (φ - φ₀)² / 2κφ₀ -# "DefaultWithChi": (φ - φ₀)² / 2κφ₀ + Σ χφφ' / φ₀ -# Subclass Hamiltonian to create a new energy functional. -hamiltonian = 'DefaultWithChi' - -[field] -# Particle-mesh grid size, either a single integer or an array of 3 integers -# (number of grid points in each dimension). In order to guarantee consistency -# and speed in the PFFT routines, the actual mesh grid will be changed to ensure -# that each dimension of the 2d PFFT process grid divides each dimension of the -# mesh grid size. -mesh_size = [24, 24, 24] -# Compressibility used in the relaxed incompressibility term of W(phi) in -# [mol/kJ]. -kappa = 0.05 -# Standard deviation in the Gaussian filter (window function) in [nanometers]. -# This value is a characzteristic length scale for the size of the particles in -# the simulation. -sigma = 0.5 -# Interaction matrix, chi, ((atom name 1, atom name 2), (mixing energy in -# [kJ/mol])). -chi = [ - [["C", "W"], [42.24]], - [["G", "C"], [10.47]], - [["N", "W"], [-3.77]], - [["G", "W"], [4.53]], - [["N", "P"], [-9.34]], - [["P", "G"], [8.04]], - [["N", "G"], [1.97]], - [["P", "C"], [14.72]], - [["P", "W"], [-1.51]], - [["N", "C"], [13.56]], -] - -[bonds] -# Two-particle bonds, ((atom name 1, atom name 2), (equilibrium length in -# [nanometers], bond strenght in [kJ/mol])). Note the two -bonds = [ - [["N", "P"], [0.47, 1250.0]], - [["P", "G"], [0.47, 1250.0]], - [["G", "G"], [0.37, 1250.0]], - [["G", "C"], [0.47, 1250.0]], - [["C", "C"], [0.47, 1250.0]], -] -# Three-particle angular bonds, ((atom name 1, atom name 2, atom name 3), -# (equilibrium angle in [degrees], bond strenght in [kJ/mol])). -angle_bonds = [ - [["P", "G", "G"], [120.0, 25.0]], - [["P", "G", "C"], [180.0, 25.0]], - [["G", "C", "C"], [180.0, 25.0]], - [["C", "C", "C"], [180.0, 25.0]], -] diff --git a/docs/buildDocs.sh b/docs/buildDocs.sh index 3c65542f..0cfa02b8 100755 --- a/docs/buildDocs.sh +++ b/docs/buildDocs.sh @@ -20,7 +20,7 @@ set -e sudo apt-get update sudo apt-get -y install git make rsync wget pkg-config libhdf5-serial-dev python3-numpy python3-h5py python3-mpi4py python3-pip python3-git -python3 -m pip install -U cython numpy mpi4py +python3 -m pip install -U "cython<3" numpy mpi4py python3 -m pip install -r requirements.txt python3 -m pip install -r docs/docs_requirements.txt python3 -m pip install . diff --git a/pyproject.toml b/pyproject.toml index 6df138ba..4e5c4931 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ [build-system] -requires = ["setuptools<60", "wheel", "numpy<1.25", "cython", "mpi4py"] +requires = ["setuptools<60", "wheel", "numpy<1.25", "mpi4py", "cython<3"] [tool.black] exclude = "\\(./)" diff --git a/requirements.txt b/requirements.txt index b3d5bb39..5ecd86be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -cython h5py mpi4py -mpsort @ git+https://github.com/rainwoodman/MP-sort networkx numpy<1.25 -pfft-python @ git+https://github.com/rainwoodman/pfft-python -pmesh @ git+https://github.com/rainwoodman/pmesh sympy tomli +cython<3 +mpsort +pfft-python +pmesh @ git+https://github.com/rainwoodman/pmesh diff --git a/setup.py b/setup.py index 64c33fd7..c1bfbe0e 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def find_version(path): version=find_version("hymd/version.py"), ext_modules=[force_kernels], setup_requires=[ - "cython", + "cython<3", "numpy", "mpi4py", ],