Quickstart

In this section, you will find information on how to quickly run this module after a few simple steps.

In order to use the most up-to-date function version of the Partial Pressures EoS module, replace <TAG> in the following instructions by the version indicated on the CE modules registry webpage.

On the Calculation Engine (CE)

In order to run the Partial Pressures module on the MUSES CE, refer to the user manual’s Quick Start Guide to find instructions and exemples on how to submit jobs and retrieve the run outputs.

Partial Pressures module’s characteristics to know when running on CE:

Locally

Using Docker

The quickest way to run the Partial Pressures module on your machine is by using the Docker container. First, make sure that you have Docker locally installed on your machine.

1. Pull Docker image

The recommended way to obtain the Partial Pressures Docker container is to pull the latest version from the GitLab Container Registry:

docker pull registry.gitlab.com/nsf-muses/partial-pressures:{TAG}

2. Run the module from the container

In order to run this container, you must at least have a minimal project directory, with an input/ folder containing a config.yaml file that is used to define the module’s parameters for the run, and and output/ folder. More information about the content of the config.yaml file can be found in the module’s OpenAPI specifications and can be changed based on the user’s requirements. A code block for how the config.yaml file is also provided below.

chis_input_directory: input/New_chis/
chis_file_extension: _30-2000.dT1
output_format: csv

Once you have defined the parameters of your choice, you can run the container:

export DOCKER_IMAGE_NAME=registry.gitlab.com/nsf-muses/partial_pressures
export DOCKER_IMAGE_TAG=<TAG>
docker run -it --rm --name Part_Press \
   -v "${PWD}/input:/opt/input" \
   -v "${PWD}/output:/opt/output" \
   $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG python MUSES_Wrapper.py input/config.yaml

The output files will appear in the output/ directory upon completion.

Without Docker

In order to run the module without Docker, one has to copy the Partial Pressures repository on their local machine, and install the required libraries listed in requirements.txt.

Start by downloading the Partial Pressures repository on your machine, either by going to the webpage and downloading it, or by using the command line:

git clone --depth 1 --branch <TAG> https://gitlab.com/nsf-muses/partial-pressures.git

1. Install required packages

If you are willing to run the module locally, you need an up-to-date version of python3 installed, including the following packages (listed in requirements.txt):

  • numpy

  • pyyaml

  • openapi-core

  • muses_porter

    Note: we do recommend the use of a Python virtual environment to avoid potential conflicts with your local package installation. To create and activate a virtual environment, execute the following commands:

    python3 -m venv .venv
    source .venv/bin/activate
    

    Whenever you need to deactivate the virtual environment, simply type deactivate.

These libraries can all be easily installed using the pip package manager. Moreover, one can proceed by calling directly requirements.txt, using:

pip install --user -r partial-pressures/requirements.txt

If the installation of the Porter fails by this method, see more detailed instructions in the Porter README.

2. Run the module

1. Once all of the dependencies are successfully installed, all that’s left to do is run the module.

First make sure that you have created a config.yaml file containing the module configuration in the input/ directory. Then run:

python3 MUSES_Wrapper.py input/config.yaml

The output files will appear in the output/ directory upon completion.

  1. Alternatively, you can run the source code directly using the source code:

    python src/Partial_Pressure_Equations.py ./input/Chis/ ./output extension –output_format_extension csv