Setup & Installation#

Installation#

To use PyOPERA, first install it using pip:

(.venv) $ pip install pyopera

PyOPERA is written on top of a Python package generated from a MATLAB project. It requires a MATLAB Runtime installation to work properly. MATLAB Runtime can be installed in Windows, Linux, MacOS (however Windows is not currently supported in this version). It can also be installed from the command line using silent mode. For more information head over to the MATLAB Runtime docs. Download files can be found here. This package was tested on MATLAB Runtime 9.12.

Note

PyOPERA is not currently directly supported on Windows due to the base package not running on Windows. You can run it on Windows with WSL 2 or Docker but not directly on Windows.

Usage#

you can use the easy_opera() function:

pyopera.opera.opera.easy_opera(smi_file: str, output_file: str, endpoints: list) dict#

Wrapper function to run the OPERA MATLAB model with ease.

Args:

smi_file (str - path): .smi file containing molecular structures output_file (str - path): output file for prediction results endpoints (list): List of endpoints to calculate

Returns:

dict: key/value pairs of predictions