PyOCL
Description
The PyOCL (Python OpenChemLib) is a python wrapper for the Java-based OpenChemLib.
Prerequisites
Environment variable JAVA_HOME must point to a Java 21 or newer runtime.
The bundled PyOCL helper classes require Java 21. E.g.
export JAVA_HOME=/path/to/jdk-21
Dependencies
Some functionalities of PyOCL require RDKit or pandas to be installed (conversion between OCL StereoMolecules and RDKit molecules, conversion between DataWarrior dwar files and pandas dataframes).
If you need these functionalities, you have to install RDKit and/or pandas separately:
pip install pandas==2.2.3
pip install rdkit==2024.3.6
Installation
- Generate and activate virtual environment:
# Conda
conda create -n pyocl python=3.10
conda activate pyocl
# Python venv
python -m venv venv
. venv/bin/activate # Command for Linux
.\venv\Scripts\activate # Command for Windows
- Install PyOCL:
# From PyPI
python -m pip install pyocl-idor
# From cloned repository
git clone https://github.com/actelion/pyocl.git
python -m pip install pyocl/
# Directly from GitHub with pip
python -m pip install git+https://github.com/actelion/pyocl.git
The PyPI distribution is named pyocl-idor; Python imports use pyocl, for
example from pyocl.chem import StereoMolecule.
Documentation
You can build a local version of the full PyOCL documentation:
# Create environment and install dependencies
conda create -n pyocl python=3.10
conda activate pyocl
git clone https://github.com/actelion/pyocl.git
python -m pip install pyocl/ sphinx==8.1.3 sphinx-rtd-theme==3.0.2 pandas==2.2.3 rdkit==2024.3.6
# Build documentation
cd pyocl/docs/
sphinx-apidoc -o . ../pyocl
make html # Command for Linux
.\make.bat html # Command for Windows
This creates the directory docs/_build/html in which you can find a file called index.html. You can open this file in your browser to access the documentation.
This package also contains tutorials about specific functionalities of PyOCL. While they are covered in the html version of the documentation, there is also a Python script and a Jupyter notebook for each of the tutorials. These files can be found in docs/tutorials.
CI and PyPI releases
The GitHub Actions workflow in .github/workflows/release.yml builds a wheel and
source distribution on branch pushes and pull requests. It checks package
metadata and bundled Java files, then tests the installed wheel on Linux,
Windows, and macOS with Python 3.10 and 3.12 and Java 21. The Java setup action
sets JAVA_HOME and adds Java to PATH in every test job.
Pushing a version tag such as v0.8.2 also publishes the tested distributions to
PyPI under the distribution name pyocl-idor. Branch pushes, pull requests, and
manual workflow runs run the checks
without publishing. Versions are derived from Git tags by setuptools_scm;
the release build must match the pushed tag.
Metadata
Release files for pyocl-idor 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyocl_idor-0.8.2.tar.gz | 8.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyocl_idor-0.8.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 MB
Release files / pyocl_idor-0.8.2.tar.gz
| Download URL | pyocl_idor-0.8.2.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afeb2ac5f94fba1e2e433f7fc3f0a9e598608e9e7d05b513064f6e53e320301d
|
|
BLAKE2b-256 checksum How to use checksums |
3da4a87091dbcc1b2d55be5598385c45a7d3b744bedc9678bc3494938bf8ca5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / pyocl_idor-0.8.2-py3-none-any.whl
| Download URL | pyocl_idor-0.8.2-py3-none-any.whl |
|---|---|
| Size | 8.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fdb1f2ef32e77fa9ad64758263ef9a27e8b1aea056e7c28abc97ce8cc34e561
|
|
BLAKE2b-256 checksum How to use checksums |
de8c9da9e5c997153735c37ee7ee1d8bf4d5383f337d04b381b062a14f857d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency log