Skip to content

Commit

Permalink
Improve README with more details about venv, the path to espresso. So…
Browse files Browse the repository at this point in the history
…ften dependency on pint-pandas to 0.3
  • Loading branch information
pm-blanco committed Mar 7, 2024
1 parent 92411a0 commit 02f7795
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A deprecated version of pyMBE compatible with ESPResSo v4.1.4 (under the histori

## Usage

### Set up the pyMBE environment
### Set up the pyMBE virtual environment

To use pyMBE in your simulations, first clone this repository locally:

Expand All @@ -44,22 +44,35 @@ git clone git@github.com:pm-blanco/pyMBE.git
```

Please, be aware that pyMBE is intended to be a supporting tool to setup simulations with ESPResSo.
Thus, for most of its functionalities ESPResSo must also be available.
Thus, for most of its functionalities ESPResSo must also be available. Following the NEP29 guidelines, we recommend the users of pyMBE to use Python3.10+ when using our module.

Create a virtual environment to install Python dependencies and configure
the path to the ESPResSo build folder:
The pyMBE module uses its own Python virtual enviroment to avoid incompatibility issues when loading its requierements from other libraries.
The Python module (`venv`)[https://docs.python.org/3/library/venv.html#module-venv] from the Python Standard Library (starting with Python 3.3) is needed to set up pyMBE.
If `venv` is not in the Python distribution of the user, the user will need to first install 'venv' before setting up pyMBE.
For Ubuntu users, this can be done as follows:

```sh
sudo apt install python3-venv
```

To set up pyMBE, the users need to install its virtual environment, install its Python dependencies and configure the path to the ESPResSo build folder as follows:

```sh
python3 -m venv pymbe
source pymbe/bin/activate
python3 maintainer/configure_venv.py --espresso_path=~/espresso/build # adapt path
python3 maintainer/configure_venv.py --espresso_path=/home/user/espresso/build # adapt path
python3 -m pip install -r requirements.txt
deactivate
```

We highlight that the path `~/espresso/build` is just an example of a possible
We highlight that the path `/home/user/espresso/build` is just an example of a possible
path to the ESPResSo build folder. The user should change this path to match
the local path were ESPResSo was installed.
the local absolute path were ESPResSo was installed.

The pyMBE virtual enviroment can be deactivated at any moment:
```sh
deactivate
```

Cluster users who rely on module files to load dependencies should opt for the
following alternative:
Expand Down Expand Up @@ -123,7 +136,7 @@ You can run the interactive tutorial of pyMBE with the command:

```sh
source pymbe/bin/activate
jupyter lab tutorials/pyMBE_tutorial.ipynb
jupyter-lab tutorials/pyMBE_tutorial.ipynb
deactivate
```

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy>=1.23
pandas>=1.5.3
pint>=0.20.01
pint-pandas==0.5
pint-pandas>=0.3
biopandas==0.5.1.dev0
scipy
matplotlib
Expand Down

0 comments on commit 02f7795

Please sign in to comment.