Install the software#
We recommend using the latest version of Python and Java, jp²rt
is tested
under Python 3.10 and Java 17; the Python package includes a precompiled version
of the Java package, so you don’t need to install it separately.
Virtual environments#
It’s suggested to use a virtual environment to manage Python dependencies: virtual environments are independent groups of Python libraries, one for each project; packages installed for one project will not affect other projects or the operating system’s packages.
Create an environment#
Python 3 comes bundled with the :mod:venv
module to create virtual
environments. Create a project folder and a :file:venv
folder within:
$ mkdir myproject
$ cd myproject
$ python3 -m venv venv
On Windows:
> py -3 -m venv venv
Activate the environment#
Every time you decide to use the library, activate the environment:
$ . venv/bin/activate
On Windows:
> venv\Scripts\activate
Install the package#
Within the activated environment, use the following command to install the full version of the package:
$ pip install jp2rt[plot]
If you plan to use the package on a system with no graphic support (for instance, on an headless high-performance computing cluster), you can install the package without the optional dependencies for plotting as:
$ pip install jp2rt
To check the installation just run
$ jp2rt --help
it should print the help message, including the list of available subcommands:
Usage: jp2rt [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
compute-descriptors Computes molecular descriptions.
estimate-model Estimates a model using the given ensemble regressor.
list-descriptors List the known molecular descriptors.
list-models List the known ensemble models.
predict-rt Uses the model to predict the retention time.
Install just the Java library#
If you need to run just the descriptors computation on a system where it would be difficult to setup a Python environment (for instance, on a high performance computing cluster), you can install just the Java library as follows:
manually downloading a fat jar (containing all the dependencies) from the Releases page of the
jp²rt
repository, orusing the GitHub Apache Maven registry of the
jp²rt
repository; beware that authentication is needed, so please check the instructions.